Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/harness e2e tests #176

Merged
merged 33 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
16a4edf
chore: add row tests
GabrieleKaceviciute Sep 19, 2023
37d6d7f
chore: add list tests
GabrieleKaceviciute Sep 20, 2023
ffae391
fix: add fullReset in automation for app to be reinstalled
Sep 21, 2023
1a6c91d
chore: update row tests and organize tests
Sep 25, 2023
7650c2f
chore: update row tests and organize tests
Sep 25, 2023
ce04002
chore: minor updates
Sep 26, 2023
9efbe42
chore: add NF1, PF1, SF1 tests
Sep 26, 2023
b65693f
chore: add grid tests
GabrieleKaceviciute Sep 26, 2023
0f7900a
chore: add DR1 e2e test
Sep 26, 2023
c11aa7b
Merge branch 'chore/harness-e2e-tests' of https://github.com/flexn-io…
Sep 26, 2023
3852b08
chore: integrate G1 into e2e flow
Sep 26, 2023
5a5733d
chore: gha workflowrefactor
Sep 27, 2023
af54b40
Merge branch 'main' into chore/harness-e2e-tests
Sep 27, 2023
c66b9b0
chore: more tests to gha
Sep 27, 2023
acd2a49
fix: add missing app name in build script
Sep 27, 2023
4f61bdb
chore: enable harness tvos and atv tests
Sep 27, 2023
805dfb2
chore: add continue on error to gha
Sep 27, 2023
0f95404
fix tests
Sep 27, 2023
63d37ba
change e2e timeout
Sep 27, 2023
f4e49fd
remove continue on error gha
Sep 27, 2023
7122aef
chore: improve logic on e2e gha
Sep 27, 2023
6c4d779
test1
Sep 27, 2023
77f734b
test2
Sep 27, 2023
f0c9d25
test3
Sep 27, 2023
11d729d
chore: gha e2e cleanup
Sep 27, 2023
57fc648
chore: G1 e2e test cleanup
Sep 27, 2023
7c758e5
chore: skip list tests on tvos in gha
Sep 27, 2023
a431087
chore: e2e test cleanup
Sep 27, 2023
437c871
chore: renaming test
Sep 27, 2023
6b42fe9
chore: optimize row and grid tests
GabrieleKaceviciute Sep 28, 2023
0f7244a
chore: add RFB1 tests
GabrieleKaceviciute Sep 28, 2023
30710b4
chore: 1 more tst in RFB1 spec
Sep 28, 2023
55b7d54
chore: add go back test in RFB1
Sep 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/e2e-harness-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App Android
- name: Build
run: |
yarn e2e-harness-android
cd packages/app-harness && yarn build:android-test
- name: E2E
run: |
cd packages/app-harness && yarn e2e:android
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
59 changes: 48 additions & 11 deletions .github/workflows/e2e-harness-androidtv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ defaults:
shell: zsh -l {0}
on:
workflow_dispatch:
# push:
# branches:
# - main
# - 'release/**'
# paths-ignore:
# - 'docs/**'
# - '**/README.md'
# pull_request:
# types: [labeled]
push:
branches:
- main
- 'release/**'
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
types: [labeled]

jobs:
e2e-harness-androidtv:
Expand All @@ -27,9 +27,46 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App AndroidTV
- name: Build
id: build
run: |
yarn e2e-harness-androidtv
cd packages/app-harness && yarn build:androidtv-test
- name: E2E Dynamic Rows
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/DR1.cjs
- name: E2E Grid
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/G1.cjs
- name: E2E List
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/L1.cjs
- name: E2E Next Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/NF1.cjs
- name: E2E Prefered Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/PF1.cjs
- name: E2E Row
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/R1.cjs
- name: E2E Remote Handler
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/RH1.cjs
- name: E2E Set Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/SF1.cjs
- name: E2E Row on focus blur
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:androidtv --spec ./test/specs/RFB1.cjs
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-harness-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App iOS
- name: Build
run: |
yarn e2e-harness-ios
cd packages/app-harness && yarn build:ios-test
- name: E2E
run: |
cd packages/app-harness && yarn e2e:ios
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-harness-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App macOS
- name: Build
run: |
yarn e2e-harness-macos
cd packages/app-harness && yarn build:macos-test
- name: E2E
run: |
cd packages/app-harness && yarn e2e:macos
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
61 changes: 50 additions & 11 deletions .github/workflows/e2e-harness-tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ defaults:
shell: zsh -l {0}
on:
workflow_dispatch:
# push:
# branches:
# - main
# - 'release/**'
# paths-ignore:
# - 'docs/**'
# - '**/README.md'
# pull_request:
# types: [labeled]
push:
branches:
- main
- 'release/**'
paths-ignore:
- 'docs/**'
- '**/README.md'
pull_request:
types: [labeled]

jobs:
e2e-harness-tvos:
Expand All @@ -28,9 +28,48 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App tvOS
- name: Build
id: build
run: |
yarn e2e-harness-tvos
cd packages/app-harness && yarn build:tvos-test
- name: E2E Dynamic Rows
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/DR1.cjs
- name: E2E Grid
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/G1.cjs
# skipped because on tvos list tests take 12 minutes
# - name: E2E List
# if: (success() || failure()) && steps.build.outcome == 'success'
# run: |
# cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/L1.cjs
- name: E2E Next Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/NF1.cjs
- name: E2E Prefered Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/PF1.cjs
- name: E2E Row
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/R1.cjs
- name: E2E Remote Handler
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/RH1.cjs
- name: E2E Set Focus
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/SF1.cjs
# skipped because on tvos Row on focus blur tests take 10 minutes
# - name: E2E Row on focus blur
# if: (success() || failure()) && steps.build.outcome == 'success'
# run: |
# cd packages/app-harness && yarn e2e:tvos --spec ./test/specs/RFB1.cjs
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-harness-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Harness App Web
- name: Host
run: |
yarn e2e-harness-web
cd packages/app-harness && yarn start:web-test & sleep 60
- name: E2E
run: |
cd packages/app-harness && yarn e2e:web && kill $(lsof -t -i:8080)
# Commented because e2e tests would fail due to harness builds not working and minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App Android
- name: Build
run: |
yarn e2e-template-android
cd packages/template-starter && yarn build:android-test
- name: E2E
run: |
cd packages/template-starter && yarn e2e:android
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-androidtv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App AndroidTV
- name: Build
run: |
yarn e2e-template-androidtv
cd packages/template-starter && yarn build:androidtv-test
- name: E2E
run: |
cd packages/template-starter && yarn e2e:androidtv
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App iOS
- name: Build
run: |
yarn e2e-template-ios
cd packages/template-starter && yarn build:ios-test
- name: E2E
run: |
cd packages/template-starter && yarn e2e:ios
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App macOS
- name: Build
run: |
yarn e2e-template-macos
cd packages/template-starter && yarn build:macos-test
- name: E2E
run: |
cd packages/template-starter && yarn e2e:macos
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App tvOS
- name: Build
run: |
yarn e2e-template-tvos
cd packages/template-starter && yarn build:tvos-test
- name: E2E
run: |
cd packages/template-starter && yarn e2e:tvos
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/e2e-template-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
- name: Bootstrap
run: |
yarn bootstrap-clean
- name: E2E Template App Web
- name: Host
run: |
yarn e2e-template-web
cd packages/template-starter && yarn start:web-test & sleep 60
- name: E2E
run: |
cd packages/template-starter && yarn e2e:web && kill $(lsof -t -i:8080)
# Commented because e2e tests would fail due to minion issues
# - name: Post message to Slack via Webhook
# if: ${{ github.event_name == 'push' && failure() }}
Expand Down
12 changes: 0 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@
"deploy-template-firetv-canary": "cd packages/template-starter && npx rnv build -p firetv -s canary -c template --packageManager yarn --ci && yarn deploy:firetv-canary",
"deploy-template-web": "cd packages/template-starter && npx rnv export -p web -s production -c template --packageManager yarn --ci && yarn deploy:web-prod",
"deploy-template-web-canary": "cd packages/template-starter && npx rnv export -p web -s canary -c template --packageManager yarn --ci && yarn deploy:web-canary",
"e2e-harness-ios": "cd packages/app-harness && npx rnv build -p ios -s test --packageManager yarn --ci && yarn e2e:ios",
"e2e-harness-android": "cd packages/app-harness && npx rnv build -p android -s test --packageManager yarn --ci && yarn e2e:android",
"e2e-harness-tvos": "cd packages/app-harness && npx rnv build -p tvos -s test --packageManager yarn --ci && yarn e2e:tvos",
"e2e-harness-androidtv": "cd packages/app-harness && npx rnv build -p androidtv -s test --packageManager yarn --ci && yarn e2e:androidtv",
"e2e-harness-macos": "cd packages/app-harness && npx rnv build -p macos -s test --packageManager yarn --ci && yarn e2e:macos",
"e2e-harness-web": "cd packages/app-harness && npx rnv start -p web -s test --packageManager yarn --ci & sleep 60 && cd packages/app-harness && yarn e2e:web && kill $(lsof -t -i:8080)",
"e2e-template-ios": "cd packages/template-starter && npx rnv build -p ios -s test -c template --packageManager yarn --ci && yarn e2e:ios",
"e2e-template-android": "cd packages/template-starter && npx rnv build -p android -s test -c template --packageManager yarn --ci && yarn e2e:android",
"e2e-template-tvos": "cd packages/template-starter && npx rnv build -p tvos -s test -c template --packageManager yarn --ci && yarn e2e:tvos",
"e2e-template-androidtv": "cd packages/template-starter && npx rnv build -p androidtv -s test -c template --packageManager yarn --ci && yarn e2e:androidtv",
"e2e-template-macos": "cd packages/template-starter && npx rnv build -p macos -s test -c template --packageManager yarn --ci && yarn e2e:macos",
"e2e-template-web": "cd packages/template-starter && npx rnv start -p web -s test -c template --packageManager yarn --ci & sleep 60 && cd packages/template-starter && yarn e2e:web && kill $(lsof -t -i:8080)",
"prepare-harness-nightly": "cd packages/app-harness && npx rnv hooks run -x prepareNightlyBuild --only",
"prepare-template-nightly": "cd packages/template-starter && npx rnv hooks run -x prepareNightlyBuild -c template --only",
"clean-harness-post-nightly": "cd packages/app-harness && npx rnv hooks run -x cleanupPostNightly --only",
Expand Down
7 changes: 6 additions & 1 deletion packages/app-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
"deploy:tvos-prod": "npx rnv deploy -p tvos -s production --only --hooks",
"deploy:web-alpha": "npx rnv deploy -p web -s canary --only --hooks",
"deploy:web-prod": "npx rnv deploy -p web -s production --only --hooks",
"e2e:all": "yarn e2e:ios ; yarn e2e:tvos ; yarn e2e:android ; yarn e2e:androidtv ; yarn e2e:macos ; yarn e2e:web",
"build:ios-test": "npx rnv build -p ios -s test --packageManager yarn --ci",
"build:android-test": "npx rnv build -p android -s test --packageManager yarn --ci",
"build:tvos-test": "npx rnv build -p tvos -s test --packageManager yarn --ci",
"build:androidtv-test": "npx rnv build -p androidtv -s test --packageManager yarn --ci",
"build:macos-test": "npx rnv build -p macos -s test --packageManager yarn --ci",
"start:web-test": "npx rnv start -p web -s test --packageManager yarn --ci",
"e2e:android": "APPIUM_HOME=./ PLATFORM=android JAVA_HOME=$(/usr/libexec/java_home) npx wdio wdio.conf.cjs",
"e2e:androidtv": "APPIUM_HOME=./ PLATFORM=androidtv JAVA_HOME=$(/usr/libexec/java_home) npx wdio wdio.conf.cjs",
"e2e:ios": "APPIUM_HOME=./ PLATFORM=ios npx wdio wdio.conf.cjs",
Expand Down
9 changes: 6 additions & 3 deletions packages/app-harness/src/screens/tests/dynamicRows.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { useState } from 'react';
import { StyleSheet } from 'react-native';
import { View, FlashList, Pressable, Image, CreateListRenderItemInfo } from '@flexn/create';
import { View, FlashList, Image, CreateListRenderItemInfo } from '@flexn/create';
import type { NavigationProps } from '../../navigation';
import Screen from './../screen';
import { Ratio } from '../../utils';
import Pressable from '../../components/Pressable';

const kittyNames = ['Abby', 'Angel', 'Annie', 'Baby', 'Bailey', 'Bandit'];

Expand All @@ -28,7 +29,7 @@ const DynamicRows = ({ route }: NavigationProps) => {
const [data] = useState(generateData(200, 200, 5));
const [data2, setData2] = useState(generateData(200, 200, 5));

const rowRenderer = ({ item, focusRepeatContext }: CreateListRenderItemInfo<any>) => {
const rowRenderer = ({ item, focusRepeatContext, index }: CreateListRenderItemInfo<any>) => {
return (
<Pressable
style={styles.packshot}
Expand All @@ -45,13 +46,14 @@ const DynamicRows = ({ route }: NavigationProps) => {
onPress={() => {
setData2(generateData(interval(201, 210), interval(201, 210), interval(5, 10)));
}}
testID={`DR1-0-${index}`}
>
<Image source={{ uri: item.backgroundImage }} style={styles.image} />
</Pressable>
);
};

const rowRenderer2 = ({ item, focusRepeatContext }: CreateListRenderItemInfo<any>) => {
const rowRenderer2 = ({ item, focusRepeatContext, index }: CreateListRenderItemInfo<any>) => {
return (
<Pressable
style={styles.packshot}
Expand All @@ -65,6 +67,7 @@ const DynamicRows = ({ route }: NavigationProps) => {
},
},
}}
testID={`DR1-1-${index}`}
>
<Image source={{ uri: item.backgroundImage }} style={styles.image} />
</Pressable>
Expand Down
2 changes: 1 addition & 1 deletion packages/app-harness/src/screens/tests/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function generateData(width: number, height: number, items = 30) {
}

const Grid = ({ route }: NavigationProps) => {
const [data] = useState(generateData(200, 200, 200));
const [data] = useState(generateData(200, 200, 75));

const rowRenderer = ({ item, focusRepeatContext, index }: CreateListRenderItemInfo<any>) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/app-harness/src/screens/tests/row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function generateData(width: number, height: number, items = 30) {
}

const Row = ({ route }: NavigationProps) => {
const [data] = useState(generateData(200, 200, 500));
const [data] = useState(generateData(200, 200, 20));

const rowRenderer = ({ item, focusRepeatContext, index }: CreateListRenderItemInfo<any>) => {
return (
Expand Down
Loading
Loading