From e168163f7ade07eb63015d32dd1300e418bb0222 Mon Sep 17 00:00:00 2001 From: Henning Hall Date: Tue, 12 Dec 2023 18:58:13 +0100 Subject: [PATCH] chore: e2e tests for iOS (#717) --- .github/workflows/build-android.yml | 52 +++ .github/workflows/build-ios.yml | 77 ++++ .github/workflows/e2e-tests.yml | 39 -- .github/workflows/pr.yml | 38 ++ .github/workflows/{main.yml => publish.yml} | 0 .github/workflows/test-android-e2e.yml | 42 ++ .github/workflows/test-android-unit.yml | 26 ++ .github/workflows/test-ios-e2e.yml | 54 +++ .github/workflows/test-js.yml | 24 ++ .github/workflows/unit-tests.yml | 53 --- .gitignore | 2 + .maestro/display-text.yml | 4 +- .maestro/ios.yml | 23 ++ ...zone-offset-in-minutes-daylight-saving.yml | 72 ++++ .maestro/timezone-offset-in-minutes.yml | 74 +--- .maestro/utils/change-prop.yml | 2 +- .maestro/utils/launch.yml | 2 +- .maestro/utils/reset.yml | 2 +- .maestro/utils/swipe-wheel-1-modal.yml | 5 + .maestro/utils/swipe-wheel-1.yml | 2 +- .maestro/utils/swipe-wheel-2.yml | 2 +- .maestro/utils/swipe-wheel-3.yml | 2 +- .maestro/utils/swipe-wheel-4.yml | 2 +- .xcode-version | 1 + examples/Rn071/.ruby-version | 1 + examples/Rn071/App.tsx | 131 ------- examples/Rn071/index.js | 2 +- examples/Rn071/ios/Podfile.lock | 368 +++++++++++++++++- .../Rn071/ios/Rn071.xcodeproj/project.pbxproj | 4 +- examples/Rn071/src/App.js | 89 +++++ examples/Rn071/src/CustomPropValue.js | 59 +++ examples/Rn071/src/PropButton.js | 6 + examples/Rn071/src/PropSlider.js | 64 +++ examples/Rn071/src/exampleKeys.js | 6 + examples/Rn071/src/examples.js | 29 ++ examples/Rn071/src/examples/Advanced.js | 230 +++++++++++ examples/Rn071/src/examples/DateMode.js | 14 + examples/Rn071/src/examples/Minimal.js | 13 + examples/Rn071/src/examples/Modal.js | 31 ++ examples/Rn071/src/examples/TimeMode.js | 14 + examples/Rn071/src/locales.js | 212 ++++++++++ examples/Rn071/src/propPickers/DateChange.js | 43 ++ examples/Rn071/src/propPickers/FadeToColor.js | 11 + .../Rn071/src/propPickers/LocalePicker.js | 39 ++ .../Rn071/src/propPickers/MinMaxDateChange.js | 55 +++ .../Rn071/src/propPickers/MinuteInterval.js | 18 + examples/Rn071/src/propPickers/ModePicker.js | 18 + examples/Rn071/src/propPickers/Scroll.js | 40 ++ examples/Rn071/src/propPickers/TextColor.js | 8 + .../propPickers/TimeZoneOffsetInMinutes.js | 20 + examples/Rn071/src/propPickers/Variant.js | 18 + examples/Rn071/src/utils.js | 13 + package.json | 4 +- 53 files changed, 1849 insertions(+), 311 deletions(-) create mode 100644 .github/workflows/build-android.yml create mode 100644 .github/workflows/build-ios.yml delete mode 100644 .github/workflows/e2e-tests.yml create mode 100644 .github/workflows/pr.yml rename .github/workflows/{main.yml => publish.yml} (100%) create mode 100644 .github/workflows/test-android-e2e.yml create mode 100644 .github/workflows/test-android-unit.yml create mode 100644 .github/workflows/test-ios-e2e.yml create mode 100644 .github/workflows/test-js.yml delete mode 100644 .github/workflows/unit-tests.yml create mode 100644 .maestro/ios.yml create mode 100644 .maestro/timezone-offset-in-minutes-daylight-saving.yml create mode 100644 .maestro/utils/swipe-wheel-1-modal.yml create mode 100644 .xcode-version create mode 100644 examples/Rn071/.ruby-version delete mode 100644 examples/Rn071/App.tsx create mode 100644 examples/Rn071/src/App.js create mode 100644 examples/Rn071/src/CustomPropValue.js create mode 100644 examples/Rn071/src/PropButton.js create mode 100644 examples/Rn071/src/PropSlider.js create mode 100644 examples/Rn071/src/exampleKeys.js create mode 100644 examples/Rn071/src/examples.js create mode 100644 examples/Rn071/src/examples/Advanced.js create mode 100644 examples/Rn071/src/examples/DateMode.js create mode 100644 examples/Rn071/src/examples/Minimal.js create mode 100644 examples/Rn071/src/examples/Modal.js create mode 100644 examples/Rn071/src/examples/TimeMode.js create mode 100644 examples/Rn071/src/locales.js create mode 100644 examples/Rn071/src/propPickers/DateChange.js create mode 100644 examples/Rn071/src/propPickers/FadeToColor.js create mode 100644 examples/Rn071/src/propPickers/LocalePicker.js create mode 100644 examples/Rn071/src/propPickers/MinMaxDateChange.js create mode 100644 examples/Rn071/src/propPickers/MinuteInterval.js create mode 100644 examples/Rn071/src/propPickers/ModePicker.js create mode 100644 examples/Rn071/src/propPickers/Scroll.js create mode 100644 examples/Rn071/src/propPickers/TextColor.js create mode 100644 examples/Rn071/src/propPickers/TimeZoneOffsetInMinutes.js create mode 100644 examples/Rn071/src/propPickers/Variant.js create mode 100644 examples/Rn071/src/utils.js diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml new file mode 100644 index 0000000..3224727 --- /dev/null +++ b/.github/workflows/build-android.yml @@ -0,0 +1,52 @@ +name: Build + +on: + workflow_call: + workflow_dispatch: + +env: + APP_PATH: examples/Rn071/android/app/build/outputs/apk/release/app-release.apk + PROJECT_NAME: Rn071 + EXAMPLE_SRC: ./examples/Rn071/src/** + +jobs: + build-android: + name: Android + runs-on: ubuntu-latest + outputs: + app: app/build/outputs/apk/release + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: cache-android + with: + path: ${{ env.APP_PATH }} + key: ${{ runner.os }}-${{ hashFiles('src/**', 'android/**', env.EXAMPLE_SRC, env.APP_PATH ) }} + + - uses: actions/setup-node@v3 + if: steps.cache-android.outputs.cache-hit != 'true' + with: + node-version: 14.18.1 + cache: 'yarn' + + - name: Install npm dependencies (example project) + if: steps.cache-android.outputs.cache-hit != 'true' + working-directory: ./examples/${{ env.PROJECT_NAME }}/ + run: yarn install --frozen-lockfile + + - name: Install npm dependencies (root) + if: steps.cache-android.outputs.cache-hit != 'true' + working-directory: ./ + run: yarn install --frozen-lockfile + + - uses: actions/setup-java@v3 + if: steps.cache-android.outputs.cache-hit != 'true' + with: + java-version: 11 + distribution: 'temurin' + + - name: build + if: steps.cache-android.outputs.cache-hit != 'true' + working-directory: ./examples/${{ env.PROJECT_NAME }}/android + run: ./gradlew assembleRelease diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml new file mode 100644 index 0000000..70ddcad --- /dev/null +++ b/.github/workflows/build-ios.yml @@ -0,0 +1,77 @@ +name: Build + +on: + workflow_call: + workflow_dispatch: + +env: + APP_PATH: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app + PROJECT_NAME: Rn071 + EXAMPLE_SRC: ./examples/Rn071/src/** + +jobs: + build-ios: + name: iOS + runs-on: macos-13 + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: cache + with: + path: | + ${{ env.APP_PATH }} + ${{ env.APP_PATH }}.dSYM + key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', env.EXAMPLE_SRC, env.APP_PATH ) }} + + - uses: actions/setup-node@v3 + if: steps.cache.outputs.cache-hit != 'true' + with: + node-version: 14.18.1 + cache: 'yarn' + + - name: Install npm dependencies (example project) + if: steps.cache.outputs.cache-hit != 'true' + working-directory: ./examples/${{ env.PROJECT_NAME }}/ + run: yarn install --frozen-lockfile + + - name: Install npm dependencies (root) + if: steps.cache.outputs.cache-hit != 'true' + working-directory: ./ + run: yarn install --frozen-lockfile + + - name: Setup Ruby + if: steps.cache.outputs.cache-hit != 'true' + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + working-directory: ./examples/${{ env.PROJECT_NAME }}/ + + - name: setup-cocoapods + if: steps.cache.outputs.cache-hit != 'true' + uses: maxim-lobanov/setup-cocoapods@v1 + with: + version: 1.11.3 + + - name: Install CocoaPods + if: steps.cache.outputs.cache-hit != 'true' + working-directory: ./examples/${{ env.PROJECT_NAME }}/ + run: | + yarn pods + + - name: Select Xcode + if: steps.cache.outputs.cache-hit != 'true' + run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer + + - name: Build + if: steps.cache.outputs.cache-hit != 'true' + working-directory: ./examples/${{ env.PROJECT_NAME }}/ios/ + run: | + set -o pipefail && xcodebuild \ + -workspace "${{ env.PROJECT_NAME }}.xcworkspace" \ + -scheme "${{ env.PROJECT_NAME }}" \ + -destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \ + -derivedDataPath "DerivedData" \ + -configuration "Release" \ + | tee xcodebuild.log diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml deleted file mode 100644 index 3f33259..0000000 --- a/.github/workflows/e2e-tests.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: E2E tests (maestro) - -on: - workflow_dispatch: - -jobs: - e2e-maestro: - runs-on: ubuntu-latest - outputs: - app: app/build/outputs/apk/release - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: 14.18.1 - cache: 'yarn' - - - name: Install npm dependencies (example project) - working-directory: ./examples/Rn069/ - run: yarn install --frozen-lockfile - - - name: Install npm dependencies (root) - working-directory: ./ - run: yarn install --frozen-lockfile - - - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: 'temurin' - - - name: build - working-directory: ./examples/Rn069/android - run: ./gradlew assembleRelease - - - uses: mobile-dev-inc/action-maestro-cloud@v1.1.1 - with: - api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} - app-file: examples/Rn069/android/app/build/outputs/apk/release/app-release.apk diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..2b16a97 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,38 @@ +name: PR + +on: + workflow_dispatch: + pull_request: + +jobs: + build-ios: + name: Build + uses: ./.github/workflows/build-ios.yml + secrets: inherit + + build-android: + name: Build + uses: ./.github/workflows/build-android.yml + secrets: inherit + + test-ios-e2e: + name: Test + uses: ./.github/workflows/test-ios-e2e.yml + secrets: inherit + needs: [build-ios] + + test-android-e2e: + name: Test + uses: ./.github/workflows/test-android-e2e.yml + secrets: inherit + needs: [build-android] + + test-js: + name: Test + uses: ./.github/workflows/test-js.yml + secrets: inherit + + test-android-unit: + name: Test + uses: ./.github/workflows/test-android-unit.yml + secrets: inherit diff --git a/.github/workflows/main.yml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/publish.yml diff --git a/.github/workflows/test-android-e2e.yml b/.github/workflows/test-android-e2e.yml new file mode 100644 index 0000000..d905c77 --- /dev/null +++ b/.github/workflows/test-android-e2e.yml @@ -0,0 +1,42 @@ +name: Test Android e2e + +on: + workflow_call: + workflow_dispatch: + +env: + APP_PATH: examples/Rn071/android/app/build/outputs/apk/release/app-release.apk + EXAMPLE_SRC: ./examples/Rn071/src/** + +jobs: + test-android-e2e: + name: Android - e2e + runs-on: ubuntu-latest + environment: e2e Android + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: cache-android + with: + path: ${{ env.APP_PATH }} + key: ${{ runner.os }}-${{ hashFiles('src/**', 'android/**', env.EXAMPLE_SRC, env.APP_PATH ) }} + + - uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 + id: upload + with: + api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} + app-file: ${{ env.APP_PATH }} + include-tags: android + + # Step can be removed when this is fixed: + # https://github.com/mobile-dev-inc/action-maestro-cloud/issues/28 + - name: Check for maestro errors + run: | + if [[ "$MAESTRO_CLOUD_FLOW_RESULTS" == *"ERROR"* || "$MAESTRO_CLOUD_FLOW_RESULTS" == *"CANCELED"* ]]; then + echo "One or more tests failed or were canceled." + exit 1 + fi + env: + MAESTRO_CLOUD_FLOW_RESULTS: ${{ steps.upload.outputs.MAESTRO_CLOUD_FLOW_RESULTS }} diff --git a/.github/workflows/test-android-unit.yml b/.github/workflows/test-android-unit.yml new file mode 100644 index 0000000..f90b772 --- /dev/null +++ b/.github/workflows/test-android-unit.yml @@ -0,0 +1,26 @@ +name: Test Android Unit + +on: + workflow_call: + workflow_dispatch: + +jobs: + test-android-unit: + name: Android - Unit + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: 'temurin' + + - name: Install npm dependencies + working-directory: ./examples/Rn072 + run: yarn install --frozen-lockfile + + - name: Run unit tests + working-directory: ./examples/Rn072/android + run: ./gradlew testDebugUnitTest diff --git a/.github/workflows/test-ios-e2e.yml b/.github/workflows/test-ios-e2e.yml new file mode 100644 index 0000000..f6b01ed --- /dev/null +++ b/.github/workflows/test-ios-e2e.yml @@ -0,0 +1,54 @@ +name: E2E tests (ios) + +on: + workflow_call: + workflow_dispatch: + +env: + APP_PATH: ./examples/Rn071/ios/DerivedData/Build/Products/Release-iphonesimulator/Rn071.app + EXAMPLE_SRC: ./examples/Rn071/src/** + +jobs: + test-ios-e2e: + name: iOS - e2e + runs-on: macos-13 + environment: e2e iOS + + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + id: cache + with: + path: | + ${{ env.APP_PATH }} + ${{ env.APP_PATH }}.dSYM + key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', env.EXAMPLE_SRC, env.APP_PATH ) }} + + - uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 + id: upload + with: + api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} + app-file: ${{ env.APP_PATH }} + mapping-file: ${{ env.APP_PATH }}.dSYM + include-tags: ios + + - name: Upload logs when workflow failed + uses: actions/upload-artifact@v3 + if: failure() + with: + name: BuildLogs + path: | + xcodebuild.log + DerivedData/Logs/Test/*.xcresult + + # Step can be removed when this is fixed: + # https://github.com/mobile-dev-inc/action-maestro-cloud/issues/28 + - name: Check for maestro errors + run: | + if [[ "$MAESTRO_CLOUD_FLOW_RESULTS" == *"ERROR"* || "$MAESTRO_CLOUD_FLOW_RESULTS" == *"CANCELED"* ]]; then + echo "One or more tests failed or were canceled." + exit 1 + fi + env: + MAESTRO_CLOUD_FLOW_RESULTS: ${{ steps.upload.outputs.MAESTRO_CLOUD_FLOW_RESULTS }} diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml new file mode 100644 index 0000000..50c6788 --- /dev/null +++ b/.github/workflows/test-js.yml @@ -0,0 +1,24 @@ +name: Test js + +on: + workflow_call: + workflow_dispatch: + +jobs: + test-js: + name: Javascript + runs-on: macos-latest + timeout-minutes: 5 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Node + uses: actions/setup-node@v3 + + - name: Install npm dependencies + run: yarn install --frozen-lockfile + + - name: Run unit tests + run: yarn test diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index b7e8d87..0000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: 'Build & Test' - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - javascript_unit_tests: - name: Unit tests - javascript - runs-on: macos-latest - timeout-minutes: 5 - - steps: - - name: Checkout - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - - name: Node - uses: actions/setup-node@v3 - - - name: Install npm dependencies - run: | - yarn install --frozen-lockfile - - - name: Run unit tests - run: | - yarn test - - java_unit_tests: - name: Unit tests - java - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: 'temurin' - - - name: Install npm dependencies - working-directory: ./examples/Rn072 - run: | - yarn install --frozen-lockfile - - - name: Run unit tests - working-directory: ./examples/Rn072/android - run: ./gradlew testDebugUnitTest diff --git a/.gitignore b/.gitignore index 5b537a0..a71d8cf 100644 --- a/.gitignore +++ b/.gitignore @@ -356,3 +356,5 @@ Temporary Items # End of https://www.gitignore.io/api/xcode,android,reactnative,androidstudio + +**/ios/output \ No newline at end of file diff --git a/.maestro/display-text.yml b/.maestro/display-text.yml index e6d4de9..51e8c42 100644 --- a/.maestro/display-text.yml +++ b/.maestro/display-text.yml @@ -1,4 +1,6 @@ -appId: com.rn069 +appId: com.rn071 +tags: + - android --- - runFlow: file: utils/set-timezone.yml diff --git a/.maestro/ios.yml b/.maestro/ios.yml new file mode 100644 index 0000000..764c4a9 --- /dev/null +++ b/.maestro/ios.yml @@ -0,0 +1,23 @@ +appId: com.rn071 +tags: + - ios +--- +# test: can use inline picker +- runFlow: utils/launch.yml +- runFlow: + file: utils/change-prop.yml + env: + PROP: locale + VALUE: vi-VN +- runFlow: utils/swipe-wheel-1.yml +- assertVisible: + text: '2000-01-01 01:00:00' + +# test: can use modal +- launchApp +- tapOn: Modal +- tapOn: Select date +- runFlow: utils/swipe-wheel-1-modal.yml +- tapOn: Confirm +- assertVisible: + text: '2000-01-02' diff --git a/.maestro/timezone-offset-in-minutes-daylight-saving.yml b/.maestro/timezone-offset-in-minutes-daylight-saving.yml new file mode 100644 index 0000000..3549260 --- /dev/null +++ b/.maestro/timezone-offset-in-minutes-daylight-saving.yml @@ -0,0 +1,72 @@ +appId: com.rn071 +tags: + - android +--- +########## describe: DAYLIGHT SAVING +- runFlow: + file: utils/set-timezone.yml + env: + REGION: Sweden + GMT: GMT+02:00 + STATE: '' + +- runFlow: utils/launch.yml + +# test: timezone offset undefined +- runFlow: + file: utils/change-prop.yml + env: + PROP: maximumDate + VALUE: '2000-07-01T00:00:00' +- runFlow: + file: utils/change-prop.yml + env: + PROP: date + VALUE: '2000-06-01T00:00:00+02:00' +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-06-01 00:01:00' +- assertVisible: 'Thu Jun 11201 AM ' + +- runFlow: utils/reset.yml + +# # test: timezone offset 0 +- runFlow: + file: utils/change-prop.yml + env: + PROP: maximumDate + VALUE: '2000-07-01T00:00:00' +- runFlow: + file: utils/change-prop.yml + env: + PROP: date + VALUE: '2000-06-01T00:00:00+02:00' +- runFlow: + file: utils/change-prop.yml + env: + PROP: timeZoneOffsetInMinutes + VALUE: 0 +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-06-01 00:01:00' +- assertVisible: 'Wed May 311001 PM ' + +- runFlow: utils/reset.yml + +# test: timezone offset 180 +- runFlow: + file: utils/change-prop.yml + env: + PROP: maximumDate + VALUE: '2000-07-01T00:00:00' +- runFlow: + file: utils/change-prop.yml + env: + PROP: date + VALUE: '2000-06-01T00:00:00+02:00' +- runFlow: + file: utils/change-prop.yml + env: + PROP: timeZoneOffsetInMinutes + VALUE: 180 +- runFlow: utils/swipe-wheel-3.yml +- assertVisible: '2000-06-01 00:01:00' +- assertVisible: 'Thu Jun 1101 AM ' diff --git a/.maestro/timezone-offset-in-minutes.yml b/.maestro/timezone-offset-in-minutes.yml index ccae728..9ef3d29 100644 --- a/.maestro/timezone-offset-in-minutes.yml +++ b/.maestro/timezone-offset-in-minutes.yml @@ -1,4 +1,6 @@ -appId: com.rn069 +appId: com.rn071 +tags: + - android --- - runFlow: file: utils/set-timezone.yml @@ -49,76 +51,6 @@ appId: com.rn069 - runFlow: utils/swipe-wheel-3.yml - assertVisible: '2000-01-01 00:01:00' - assertVisible: 'Fri Dec 31801 PM ' - -########## describe: DAYLIGHT SAVING -- runFlow: - file: utils/set-timezone.yml - env: - REGION: Sweden - GMT: GMT+02:00 - STATE: '' - -- runFlow: utils/launch.yml - -# test: timezone offset undefined -- runFlow: - file: utils/change-prop.yml - env: - PROP: maximumDate - VALUE: '2000-07-01T00:00:00' -- runFlow: - file: utils/change-prop.yml - env: - PROP: date - VALUE: '2000-06-01T00:00:00+02:00' -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-06-01 00:01:00' -- assertVisible: 'Thu Jun 11201 AM ' - -- runFlow: utils/reset.yml - -# # test: timezone offset 0 -- runFlow: - file: utils/change-prop.yml - env: - PROP: maximumDate - VALUE: '2000-07-01T00:00:00' -- runFlow: - file: utils/change-prop.yml - env: - PROP: date - VALUE: '2000-06-01T00:00:00+02:00' -- runFlow: - file: utils/change-prop.yml - env: - PROP: timeZoneOffsetInMinutes - VALUE: 0 -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-06-01 00:01:00' -- assertVisible: 'Wed May 311001 PM ' - -- runFlow: utils/reset.yml - -# test: timezone offset 180 -- runFlow: - file: utils/change-prop.yml - env: - PROP: maximumDate - VALUE: '2000-07-01T00:00:00' -- runFlow: - file: utils/change-prop.yml - env: - PROP: date - VALUE: '2000-06-01T00:00:00+02:00' -- runFlow: - file: utils/change-prop.yml - env: - PROP: timeZoneOffsetInMinutes - VALUE: 180 -- runFlow: utils/swipe-wheel-3.yml -- assertVisible: '2000-06-01 00:01:00' -- assertVisible: 'Thu Jun 1101 AM ' - - runFlow: utils/reset.yml # test: timezoneOffsetInMinutes combined with maximumDate/minimumDate in another timezone than current device. diff --git a/.maestro/utils/change-prop.yml b/.maestro/utils/change-prop.yml index 556ed01..fb811bf 100644 --- a/.maestro/utils/change-prop.yml +++ b/.maestro/utils/change-prop.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - tapOn: clear - tapOn: diff --git a/.maestro/utils/launch.yml b/.maestro/utils/launch.yml index aed90f5..1dd39f6 100644 --- a/.maestro/utils/launch.yml +++ b/.maestro/utils/launch.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - launchApp: stopApp: true diff --git a/.maestro/utils/reset.yml b/.maestro/utils/reset.yml index 1b7b8fe..4d32958 100644 --- a/.maestro/utils/reset.yml +++ b/.maestro/utils/reset.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - tapOn: 'Go back' - tapOn: Advanced diff --git a/.maestro/utils/swipe-wheel-1-modal.yml b/.maestro/utils/swipe-wheel-1-modal.yml new file mode 100644 index 0000000..b491116 --- /dev/null +++ b/.maestro/utils/swipe-wheel-1-modal.yml @@ -0,0 +1,5 @@ +appId: com.rn071 +--- +- swipe: + start: 25%, 80% + end: 25%, 75% diff --git a/.maestro/utils/swipe-wheel-1.yml b/.maestro/utils/swipe-wheel-1.yml index 044f45f..d98a596 100644 --- a/.maestro/utils/swipe-wheel-1.yml +++ b/.maestro/utils/swipe-wheel-1.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - swipe: start: 25%, 40% diff --git a/.maestro/utils/swipe-wheel-2.yml b/.maestro/utils/swipe-wheel-2.yml index 4fa9848..5372db7 100644 --- a/.maestro/utils/swipe-wheel-2.yml +++ b/.maestro/utils/swipe-wheel-2.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - swipe: start: 50%, 40% diff --git a/.maestro/utils/swipe-wheel-3.yml b/.maestro/utils/swipe-wheel-3.yml index 63e6f44..2553933 100644 --- a/.maestro/utils/swipe-wheel-3.yml +++ b/.maestro/utils/swipe-wheel-3.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - swipe: start: 63%, 40% diff --git a/.maestro/utils/swipe-wheel-4.yml b/.maestro/utils/swipe-wheel-4.yml index 8191aa9..071e087 100644 --- a/.maestro/utils/swipe-wheel-4.yml +++ b/.maestro/utils/swipe-wheel-4.yml @@ -1,4 +1,4 @@ -appId: com.rn069 +appId: com.rn071 --- - swipe: start: 75%, 40% diff --git a/.xcode-version b/.xcode-version new file mode 100644 index 0000000..7ea95c2 --- /dev/null +++ b/.xcode-version @@ -0,0 +1 @@ +14.3.1 \ No newline at end of file diff --git a/examples/Rn071/.ruby-version b/examples/Rn071/.ruby-version new file mode 100644 index 0000000..a603bb5 --- /dev/null +++ b/examples/Rn071/.ruby-version @@ -0,0 +1 @@ +2.7.5 diff --git a/examples/Rn071/App.tsx b/examples/Rn071/App.tsx deleted file mode 100644 index b472daf..0000000 --- a/examples/Rn071/App.tsx +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * @format - */ - -import type {PropsWithChildren} from 'react'; -import React, {useState} from 'react'; -import { - Button, - SafeAreaView, - ScrollView, - StatusBar, - StyleSheet, - Text, - useColorScheme, - View, -} from 'react-native'; - -import DatePicker from 'react-native-date-picker'; -import { - Colors, - Header, - LearnMoreLinks, -} from 'react-native/Libraries/NewAppScreen'; - -type SectionProps = PropsWithChildren<{ - title: string; -}>; - -function Section({children, title}: SectionProps): JSX.Element { - const isDarkMode = useColorScheme() === 'dark'; - const [date, setDate] = useState(new Date()); - const [open, setOpen] = useState(false); - return ( - -