diff --git a/.github/workflows/pr_ci.yaml b/.github/workflows/pr_ci.yaml index fb22e326..4e036248 100644 --- a/.github/workflows/pr_ci.yaml +++ b/.github/workflows/pr_ci.yaml @@ -21,7 +21,7 @@ jobs: uses: actions/cache@v3 with: path: ~/Library/Developer/Xcode/DerivedData - key: ${{ runner.os }}-xcode-${{ hashFiles('**/*.swift', '**/project.pbxproj') }} + key: ${{ runner.os }}-xcode-${{ hashFiles('**/project.pbxproj') }} restore-keys: | ${{ runner.os }}-xcode- - name: Build diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 7160bbb5..4b29debc 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -127,6 +127,7 @@ 5A0A4C2E2C207C34003ADE27 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 5A0A4C2B2C207C34003ADE27 /* Localizable.xcstrings */; }; 5A8FFB6B2C5A9D9C00F4B571 /* English.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = D1AFDF3D29CA66D00033BF27 /* English.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 5A8FFB702C5E5A6F00F4B571 /* ENLanguageData.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 5A8FFB6E2C5E575B00F4B571 /* ENLanguageData.sqlite */; }; + 693150472C881DCE005F99E8 /* BaseTableViewControllerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */; }; 69B81EBC2BFB8C77008CAB85 /* TipCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */; }; 84AF4D882C3575EA009AE0D2 /* UIDeviceExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */; }; CE1378C428F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; @@ -925,6 +926,7 @@ 38DD94F022D6A40000FF8845 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 5A0A4C2B2C207C34003ADE27 /* Localizable.xcstrings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; 5A8FFB6E2C5E575B00F4B571 /* ENLanguageData.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; path = ENLanguageData.sqlite; sourceTree = ""; }; + 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewControllerTest.swift; sourceTree = ""; }; 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipCardView.swift; sourceTree = ""; }; 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDeviceExtensions.swift; sourceTree = ""; }; CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScribeColor.swift; sourceTree = ""; }; @@ -1310,6 +1312,22 @@ path = German; sourceTree = ""; }; + 693150442C881DAB005F99E8 /* Scribe */ = { + isa = PBXGroup; + children = ( + 693150452C881DB5005F99E8 /* Views */, + ); + path = Scribe; + sourceTree = ""; + }; + 693150452C881DB5005F99E8 /* Views */ = { + isa = PBXGroup; + children = ( + 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */, + ); + path = Views; + sourceTree = ""; + }; 69B81EBA2BFB8C60008CAB85 /* TipCard */ = { isa = PBXGroup; children = ( @@ -1358,6 +1376,7 @@ D13E0DC72C86530E007F00AF /* Tests */ = { isa = PBXGroup; children = ( + 693150442C881DAB005F99E8 /* Scribe */, D13E0DD02C86531C007F00AF /* Keyboards */, ); path = Tests; @@ -2413,6 +2432,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 693150472C881DCE005F99E8 /* BaseTableViewControllerTest.swift in Sources */, D13E0DC92C86530E007F00AF /* TestExtensions.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Tests/Scribe/Views/BaseTableViewControllerTest.swift b/Tests/Scribe/Views/BaseTableViewControllerTest.swift new file mode 100644 index 00000000..921426fd --- /dev/null +++ b/Tests/Scribe/Views/BaseTableViewControllerTest.swift @@ -0,0 +1,30 @@ +// +// BaseTableViewControllerTest.swift +// Tests +// +// Created by Kailash Bora on 04/09/24. +// + +import Foundation +@testable import Scribe +import XCTest + +final class BaseTableViewControllerTest: XCTestCase { + private var sut: BaseTableViewController! + + override func setUp() { + super.setUp() + sut = BaseTableViewController() + } + + override func tearDown() { + sut = nil + super.tearDown() + } + + func testNumberOfSectionsZero() { + let result = sut.numberOfSections(in: sut.tableView) + + XCTAssertEqual(result, 0) + } +}