diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7f4cc23069..b0c2364f58 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,7 +25,15 @@ jobs: - uses: gradle/actions/setup-gradle@v4 - run: ./scripts/enforce_git_lfs.sh - - run: ./gradlew kotlinUpgradeYarnLock build -PredwoodNoApps -x dokkaHtml +# - run: ./gradlew kotlinUpgradeYarnLock build -PredwoodNoApps -x dokkaHtml --continue + - run: ./gradlew :redwood-widget:iosSimulatorArm64Test -PredwoodNoApps -x dokkaHtml --continue + + - uses: actions/upload-artifact@v4 + if: ${{ always() }} + with: + name: test-report + path: '**/build/reports/tests/**' + retention-days: 1 emulator-tests: runs-on: ubuntu-latest diff --git a/redwood-widget/src/iosTest/kotlin/app/cash/redwood/widget/RedwoodUIViewTest.kt b/redwood-widget/src/iosTest/kotlin/app/cash/redwood/widget/RedwoodUIViewTest.kt index 2d051d98a8..6fb9e3b15e 100644 --- a/redwood-widget/src/iosTest/kotlin/app/cash/redwood/widget/RedwoodUIViewTest.kt +++ b/redwood-widget/src/iosTest/kotlin/app/cash/redwood/widget/RedwoodUIViewTest.kt @@ -31,16 +31,16 @@ import platform.UIKit.UIWindow import platform.UIKit.additionalSafeAreaInsets class RedwoodUIViewTest { - @Test - fun widgetsAddChildViews() { - val redwoodUIView = RedwoodUIView() - - val label = UILabel() - redwoodUIView.children.insert(0, UIViewWidget(label)) - - assertThat(redwoodUIView.value.subviews).containsExactly(label) - } - +// @Test +// fun widgetsAddChildViews() { +// val redwoodUIView = RedwoodUIView() +// +// val label = UILabel() +// redwoodUIView.children.insert(0, UIViewWidget(label)) +// +// assertThat(redwoodUIView.value.subviews).containsExactly(label) +// } +// /** * Confirm we accept and propagates insets through [RedwoodUIView.uiConfiguration]. * @@ -49,26 +49,29 @@ class RedwoodUIViewTest { */ @Test fun viewInsets() { - val redwoodUIView = RedwoodUIView() - val viewController = object : UIViewController(null, null) { - override fun loadView() { - view = redwoodUIView.value - } - } - +// val redwoodUIView = RedwoodUIView() +// val viewController = object : UIViewController(null, null) { +// override fun loadView() { +// view = redwoodUIView.value +// } +// } +// + println("MAKING A WINDOW") val window = UIWindow( CGRectMake(0.0, 0.0, 390.0, 844.0), // iPhone 14. ) - window.makeKeyAndVisible() - window.rootViewController = viewController - - assertThat(redwoodUIView.uiConfiguration.value.viewInsets) - .isEqualTo(Margin.Zero) - - viewController.additionalSafeAreaInsets = UIEdgeInsetsMake(10.0, 20.0, 30.0, 40.0) - - assertThat(redwoodUIView.uiConfiguration.value.viewInsets) - .isEqualTo(Margin(top = 10.0.dp, start = 20.0.dp, bottom = 30.0.dp, end = 40.0.dp)) + println("setHidden(false)") + window.setHidden(false) + println("SUCCESS") +// window.rootViewController = viewController +// +// assertThat(redwoodUIView.uiConfiguration.value.viewInsets) +// .isEqualTo(Margin.Zero) +// +// viewController.additionalSafeAreaInsets = UIEdgeInsetsMake(10.0, 20.0, 30.0, 40.0) +// +// assertThat(redwoodUIView.uiConfiguration.value.viewInsets) +// .isEqualTo(Margin(top = 10.0.dp, start = 20.0.dp, bottom = 30.0.dp, end = 40.0.dp)) } class UIViewWidget(