diff --git a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/project.pbxproj b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/project.pbxproj index cc0e5702c..8e7841eab 100644 --- a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/project.pbxproj +++ b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/project.pbxproj @@ -26,7 +26,6 @@ 567C3E7A2520BB650011F6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 567C3E772520BB650011F6E9 /* LaunchScreen.storyboard */; }; 56B6D1092619EC1B003CC455 /* PlayerRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B6D1082619EC1B003CC455 /* PlayerRequest.swift */; }; 56F8A13527359A5A0011ACBE /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 56F8A13427359A5A0011ACBE /* GRDB */; }; - 78E2F9E6261EEC22005D1F7F /* GRDBAsyncDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E2F9E5261EEC22005D1F7F /* GRDBAsyncDemoUITests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,13 +36,6 @@ remoteGlobalIDString = 567C3E152520B6DE0011F6E9; remoteInfo = GRDBAsyncDemo; }; - 78E2F9E8261EEC22005D1F7F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 567C3E0E2520B6DE0011F6E9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 567C3E152520B6DE0011F6E9; - remoteInfo = GRDBAsyncDemo; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -82,9 +74,6 @@ 567C3E782520BB650011F6E9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 56B6D1082619EC1B003CC455 /* PlayerRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerRequest.swift; sourceTree = ""; }; 56F8A12E27359A350011ACBE /* GRDB.swift */ = {isa = PBXFileReference; lastKnownFileType = folder; name = GRDB.swift; path = ../../..; sourceTree = ""; }; - 78E2F9E3261EEC22005D1F7F /* GRDBAsyncDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRDBAsyncDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 78E2F9E5261EEC22005D1F7F /* GRDBAsyncDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GRDBAsyncDemoUITests.swift; sourceTree = ""; }; - 78E2F9E7261EEC22005D1F7F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -104,13 +93,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9E0261EEC22005D1F7F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -140,7 +122,6 @@ children = ( 567C3E182520B6DE0011F6E9 /* GRDBAsyncDemo */, 56026C9925B8A7D000D1DF3F /* GRDBAsyncDemoTests */, - 78E2F9E4261EEC22005D1F7F /* GRDBAsyncDemoUITests */, 567C3E172520B6DE0011F6E9 /* Products */, 567C3E4D2520B70E0011F6E9 /* Frameworks */, 56F8A12E27359A350011ACBE /* GRDB.swift */, @@ -152,7 +133,6 @@ children = ( 567C3E162520B6DE0011F6E9 /* GRDBAsyncDemo.app */, 56026C9825B8A7D000D1DF3F /* GRDBAsyncDemoTests.xctest */, - 78E2F9E3261EEC22005D1F7F /* GRDBAsyncDemoUITests.xctest */, ); name = Products; sourceTree = ""; @@ -200,15 +180,6 @@ path = Views; sourceTree = ""; }; - 78E2F9E4261EEC22005D1F7F /* GRDBAsyncDemoUITests */ = { - isa = PBXGroup; - children = ( - 78E2F9E5261EEC22005D1F7F /* GRDBAsyncDemoUITests.swift */, - 78E2F9E7261EEC22005D1F7F /* Info.plist */, - ); - path = GRDBAsyncDemoUITests; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -253,24 +224,6 @@ productReference = 567C3E162520B6DE0011F6E9 /* GRDBAsyncDemo.app */; productType = "com.apple.product-type.application"; }; - 78E2F9E2261EEC22005D1F7F /* GRDBAsyncDemoUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E2F9F3261EEC22005D1F7F /* Build configuration list for PBXNativeTarget "GRDBAsyncDemoUITests" */; - buildPhases = ( - 78E2F9DF261EEC22005D1F7F /* Sources */, - 78E2F9E0261EEC22005D1F7F /* Frameworks */, - 78E2F9E1261EEC22005D1F7F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 78E2F9E9261EEC22005D1F7F /* PBXTargetDependency */, - ); - name = GRDBAsyncDemoUITests; - productName = GRDBAsyncDemoUITests; - productReference = 78E2F9E3261EEC22005D1F7F /* GRDBAsyncDemoUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -287,10 +240,6 @@ 567C3E152520B6DE0011F6E9 = { CreatedOnToolsVersion = 12.0; }; - 78E2F9E2261EEC22005D1F7F = { - CreatedOnToolsVersion = 12.5; - TestTargetID = 567C3E152520B6DE0011F6E9; - }; }; }; buildConfigurationList = 567C3E112520B6DE0011F6E9 /* Build configuration list for PBXProject "GRDBAsyncDemo" */; @@ -311,7 +260,6 @@ targets = ( 567C3E152520B6DE0011F6E9 /* GRDBAsyncDemo */, 56026C9725B8A7D000D1DF3F /* GRDBAsyncDemoTests */, - 78E2F9E2261EEC22005D1F7F /* GRDBAsyncDemoUITests */, ); }; /* End PBXProject section */ @@ -335,13 +283,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9E1261EEC22005D1F7F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -372,14 +313,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9DF261EEC22005D1F7F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 78E2F9E6261EEC22005D1F7F /* GRDBAsyncDemoUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -392,11 +325,6 @@ isa = PBXTargetDependency; productRef = 56F8A13027359A540011ACBE /* GRDB */; }; - 78E2F9E9261EEC22005D1F7F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 567C3E152520B6DE0011F6E9 /* GRDBAsyncDemo */; - targetProxy = 78E2F9E8261EEC22005D1F7F /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -617,44 +545,6 @@ }; name = Release; }; - 78E2F9EA261EEC22005D1F7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GRDBAsyncDemoUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.groue.GRDBAsyncDemoUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = GRDBAsyncDemo; - }; - name = Debug; - }; - 78E2F9EB261EEC22005D1F7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GRDBAsyncDemoUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.groue.GRDBAsyncDemoUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = GRDBAsyncDemo; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -685,15 +575,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 78E2F9F3261EEC22005D1F7F /* Build configuration list for PBXNativeTarget "GRDBAsyncDemoUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E2F9EA261EEC22005D1F7F /* Debug */, - 78E2F9EB261EEC22005D1F7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/xcshareddata/xcschemes/GRDBAsyncDemo.xcscheme b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/xcshareddata/xcschemes/GRDBAsyncDemo.xcscheme index 2cc6c09fb..42aed0aa2 100644 --- a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/xcshareddata/xcschemes/GRDBAsyncDemo.xcscheme +++ b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/xcshareddata/xcschemes/GRDBAsyncDemo.xcscheme @@ -38,16 +38,6 @@ ReferencedContainer = "container:GRDBAsyncDemo.xcodeproj"> - - - - XCUIApplication { - // UI tests must launch the application that they test. - let app = XCUIApplication() - // We enforce a fresh database to ensure 8 random players. - app.launchArguments = ["-reset", "-fixedTestData"] - app.launch() - return app - } - - // This test, introduced in 481f6e93, tests the @Query fix added in - // 68874412. The fix expresses itself when a view defines an @Query - // property that is replaced in the view initializer, as in 481f6e93. - // - // It happens that I did not find that this particular view setup was suited - // for a demo app. The demo has to find a delicate balance, not too trivial, - // but without gratuitous complexity. - // - // I simplified the demo app in a5ffc52d, and we no longer have any view - // that defines an @Query property which is replaced in the view - // initializer. This means that this test no longer checks against - // 68874412 regressions! - // - // Whenever the @Query property wrapper ships with GRDB itself, make sure - // we test for those regressions! - func testInitialSortingIsByScore() throws { - let app = runApp() - - let getFirstCell = { () -> XCUIElement in - app.tables.element(boundBy: 0).cells.element(boundBy: 0) - } - - // Given default sorting, Henriette must be on top - XCTAssertEqual(getFirstCell().label, "Craig, 8 points") - - // Reverse sorting will bring Arthur on top (sort by name) - app.buttons["Score"].tap() - XCTAssertEqual(getFirstCell().label, "Arthur, 5 points") - } - - func testListAndAddPlayer() throws { - let app = runApp() - - // Ensure we have 8 players visible - XCTAssert(app.tables.cells.count == 8) - - // add a player - app.buttons["New Player"].tap() - - let playerNameField = app.textFields["Player Name"] - playerNameField.tap() - playerNameField.typeText("Tim Apple") - - app.buttons["Save"].tap() - - // This is suboptimal, but we need to wait for the animation to finish - // A better way could be to disable animations globally, - // and/or a hook to detect when the async fetch completes. - sleep(2) - - XCTAssert(app.tables.cells.count == 9) - } -} diff --git a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemoUITests/Info.plist b/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemoUITests/Info.plist deleted file mode 100644 index 64d65ca49..000000000 --- a/Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemoUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/project.pbxproj b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/project.pbxproj index dec7b276c..ccdf36191 100644 --- a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/project.pbxproj +++ b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/project.pbxproj @@ -26,7 +26,6 @@ 567C3E7A2520BB650011F6E9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 567C3E772520BB650011F6E9 /* LaunchScreen.storyboard */; }; 56B6D1092619EC1B003CC455 /* PlayerRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B6D1082619EC1B003CC455 /* PlayerRequest.swift */; }; 56F8A1202735989D0011ACBE /* GRDB in Frameworks */ = {isa = PBXBuildFile; productRef = 56F8A11F2735989D0011ACBE /* GRDB */; }; - 78E2F9E6261EEC22005D1F7F /* GRDBCombineDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78E2F9E5261EEC22005D1F7F /* GRDBCombineDemoUITests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,13 +36,6 @@ remoteGlobalIDString = 567C3E152520B6DE0011F6E9; remoteInfo = GRDBCombineDemo; }; - 78E2F9E8261EEC22005D1F7F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 567C3E0E2520B6DE0011F6E9 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 567C3E152520B6DE0011F6E9; - remoteInfo = GRDBCombineDemo; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -82,9 +74,6 @@ 567C3E782520BB650011F6E9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 56B6D1082619EC1B003CC455 /* PlayerRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerRequest.swift; sourceTree = ""; }; 56F8A11C2735988F0011ACBE /* GRDB.swift */ = {isa = PBXFileReference; lastKnownFileType = folder; name = GRDB.swift; path = ../../..; sourceTree = ""; }; - 78E2F9E3261EEC22005D1F7F /* GRDBCombineDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRDBCombineDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 78E2F9E5261EEC22005D1F7F /* GRDBCombineDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GRDBCombineDemoUITests.swift; sourceTree = ""; }; - 78E2F9E7261EEC22005D1F7F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -104,13 +93,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9E0261EEC22005D1F7F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -140,7 +122,6 @@ children = ( 567C3E182520B6DE0011F6E9 /* GRDBCombineDemo */, 56026C9925B8A7D000D1DF3F /* GRDBCombineDemoTests */, - 78E2F9E4261EEC22005D1F7F /* GRDBCombineDemoUITests */, 567C3E172520B6DE0011F6E9 /* Products */, 567C3E4D2520B70E0011F6E9 /* Frameworks */, 56F8A11C2735988F0011ACBE /* GRDB.swift */, @@ -152,7 +133,6 @@ children = ( 567C3E162520B6DE0011F6E9 /* GRDBCombineDemo.app */, 56026C9825B8A7D000D1DF3F /* GRDBCombineDemoTests.xctest */, - 78E2F9E3261EEC22005D1F7F /* GRDBCombineDemoUITests.xctest */, ); name = Products; sourceTree = ""; @@ -200,15 +180,6 @@ path = Views; sourceTree = ""; }; - 78E2F9E4261EEC22005D1F7F /* GRDBCombineDemoUITests */ = { - isa = PBXGroup; - children = ( - 78E2F9E5261EEC22005D1F7F /* GRDBCombineDemoUITests.swift */, - 78E2F9E7261EEC22005D1F7F /* Info.plist */, - ); - path = GRDBCombineDemoUITests; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -253,24 +224,6 @@ productReference = 567C3E162520B6DE0011F6E9 /* GRDBCombineDemo.app */; productType = "com.apple.product-type.application"; }; - 78E2F9E2261EEC22005D1F7F /* GRDBCombineDemoUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E2F9F3261EEC22005D1F7F /* Build configuration list for PBXNativeTarget "GRDBCombineDemoUITests" */; - buildPhases = ( - 78E2F9DF261EEC22005D1F7F /* Sources */, - 78E2F9E0261EEC22005D1F7F /* Frameworks */, - 78E2F9E1261EEC22005D1F7F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 78E2F9E9261EEC22005D1F7F /* PBXTargetDependency */, - ); - name = GRDBCombineDemoUITests; - productName = GRDBCombineDemoUITests; - productReference = 78E2F9E3261EEC22005D1F7F /* GRDBCombineDemoUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -287,10 +240,6 @@ 567C3E152520B6DE0011F6E9 = { CreatedOnToolsVersion = 12.0; }; - 78E2F9E2261EEC22005D1F7F = { - CreatedOnToolsVersion = 12.5; - TestTargetID = 567C3E152520B6DE0011F6E9; - }; }; }; buildConfigurationList = 567C3E112520B6DE0011F6E9 /* Build configuration list for PBXProject "GRDBCombineDemo" */; @@ -311,7 +260,6 @@ targets = ( 567C3E152520B6DE0011F6E9 /* GRDBCombineDemo */, 56026C9725B8A7D000D1DF3F /* GRDBCombineDemoTests */, - 78E2F9E2261EEC22005D1F7F /* GRDBCombineDemoUITests */, ); }; /* End PBXProject section */ @@ -335,13 +283,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9E1261EEC22005D1F7F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -372,14 +313,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78E2F9DF261EEC22005D1F7F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 78E2F9E6261EEC22005D1F7F /* GRDBCombineDemoUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -392,11 +325,6 @@ isa = PBXTargetDependency; productRef = 56F8A11D273598960011ACBE /* GRDB */; }; - 78E2F9E9261EEC22005D1F7F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 567C3E152520B6DE0011F6E9 /* GRDBCombineDemo */; - targetProxy = 78E2F9E8261EEC22005D1F7F /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -615,44 +543,6 @@ }; name = Release; }; - 78E2F9EA261EEC22005D1F7F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GRDBCombineDemoUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.groue.GRDBCombineDemoUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = GRDBCombineDemo; - }; - name = Debug; - }; - 78E2F9EB261EEC22005D1F7F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = GRDBCombineDemoUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.groue.GRDBCombineDemoUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = GRDBCombineDemo; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -683,15 +573,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 78E2F9F3261EEC22005D1F7F /* Build configuration list for PBXNativeTarget "GRDBCombineDemoUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 78E2F9EA261EEC22005D1F7F /* Debug */, - 78E2F9EB261EEC22005D1F7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ diff --git a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/xcshareddata/xcschemes/GRDBCombineDemo.xcscheme b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/xcshareddata/xcschemes/GRDBCombineDemo.xcscheme index 1bd57e218..6eadb0a3a 100644 --- a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/xcshareddata/xcschemes/GRDBCombineDemo.xcscheme +++ b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/xcshareddata/xcschemes/GRDBCombineDemo.xcscheme @@ -38,16 +38,6 @@ ReferencedContainer = "container:GRDBCombineDemo.xcodeproj"> - - - - XCUIApplication { - // UI tests must launch the application that they test. - let app = XCUIApplication() - // We enforce a fresh database to ensure 8 random players. - app.launchArguments = ["-reset", "-fixedTestData"] - app.launch() - return app - } - - // This test, introduced in 481f6e93, tests the @Query fix added in - // 68874412. The fix expresses itself when a view defines an @Query - // property that is replaced in the view initializer, as in 481f6e93. - // - // It happens that I did not find that this particular view setup was suited - // for a demo app. The demo has to find a delicate balance, not too trivial, - // but without gratuitous complexity. - // - // I simplified the demo app in a5ffc52d, and we no longer have any view - // that defines an @Query property which is replaced in the view - // initializer. This means that this test no longer checks against - // 68874412 regressions! - // - // Whenever the @Query property wrapper ships with GRDB itself, make sure - // we test for those regressions! - func testInitialSortingIsByScore() throws { - let app = runApp() - - let getFirstCell = { () -> XCUIElement in - app.tables.element(boundBy: 0).cells.element(boundBy: 0) - } - - // Given default sorting, Henriette must be on top - XCTAssertEqual(getFirstCell().label, "Craig, 8 points") - - // Reverse sorting will bring Arthur on top (sort by name) - app.buttons["Score"].tap() - XCTAssertEqual(getFirstCell().label, "Arthur, 5 points") - } - - func testListAndAddPlayer() throws { - let app = runApp() - - // Ensure we have 8 players visible - XCTAssert(app.tables.cells.count == 8) - - // add a player - app.buttons["New Player"].tap() - - let playerNameField = app.textFields["Player Name"] - playerNameField.tap() - playerNameField.typeText("Tim Apple") - - app.buttons["Save"].tap() - - // This is suboptimal, but we need to wait for the animation to finish - // A better way could be to disable animations globally, - // and/or a hook to detect when the async fetch completes. - sleep(2) - - XCTAssert(app.tables.cells.count == 9) - } -} diff --git a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemoUITests/Info.plist b/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemoUITests/Info.plist deleted file mode 100644 index 64d65ca49..000000000 --- a/Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemoUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - -