-
Notifications
You must be signed in to change notification settings - Fork 31
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
e2e test rework #173
e2e test rework #173
Changes from all commits
1f699de
4645da0
d18d16c
2fd3230
ebf141e
84ea290
b76e01f
ed1c2d4
0bdc33a
b7fd13e
fa8eb9b
4d0b467
e22c1ed
4946324
48ec59c
6d10f8a
1b50e7d
c4a66f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
e2e | ||
lib | ||
example/dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,16 @@ jobs: | |
setup: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/ios/Pods | ||
example/ios/build | ||
example/node_modules | ||
key: ${{ runner.os }}-setup-cache-2 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
@@ -28,16 +28,16 @@ jobs: | |
runs-on: macos-latest | ||
needs: setup | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/ios/Pods | ||
example/ios/build | ||
example/node_modules | ||
key: ${{ runner.os }}-setup-cache-2 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
@@ -49,16 +49,16 @@ jobs: | |
runs-on: macos-latest | ||
needs: setup | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/ios/Pods | ||
example/ios/build | ||
example/node_modules | ||
key: ${{ runner.os }}-setup-cache-2 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
@@ -68,16 +68,16 @@ jobs: | |
runs-on: macos-latest | ||
needs: [lint, test] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/ios/Pods | ||
example/ios/build | ||
example/node_modules | ||
key: ${{ runner.os }}-setup-cache-2 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
example/ios/build | ||
|
@@ -91,7 +91,7 @@ jobs: | |
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
|
||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
@@ -105,16 +105,16 @@ jobs: | |
runs-on: macos-latest | ||
needs: [lint, test] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
node_modules | ||
example/ios/Pods | ||
example/ios/build | ||
example/node_modules | ||
key: ${{ runner.os }}-setup-cache-2 | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
android/build | ||
|
@@ -144,17 +144,18 @@ jobs: | |
$ANDROID_HOME/platform-tools/adb devices | ||
echo "emulator started" | ||
|
||
- uses: actions/setup-java@v3 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: gradle | ||
|
||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'yarn' | ||
|
||
- run: yarn add [email protected] -D | ||
- run: yarn e2e:build:android:release | ||
- run: yarn e2e:test:android:release | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.20.0 | ||
18.19.0 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* eslint-env detox/detox, jest/globals */ | ||
import { | ||
afterAllTestPlan, | ||
beforeAllTestPlan, | ||
waitForClearLogs, | ||
waitForTestPlan, | ||
waitForLogLabel, | ||
waitForTap, | ||
} from './testPlan'; | ||
|
||
describe('Basic Props', () => { | ||
beforeAll(beforeAllTestPlan); | ||
afterAll(afterAllTestPlan); | ||
|
||
it('paused controls playback state', async () => { | ||
await waitForTestPlan(` | ||
inputs: | ||
- paused: true | ||
events: | ||
- onPlayerStateChange | ||
`); | ||
await waitForTap(by.id('paused')); | ||
await waitForLogLabel('onPlayerStateChange ::: Playing'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a similar way, a DSL around validating outputs could also be useful. I think having separate test setup, execution and validation snippets can be useful, which I think it where this is going. Ideally we're not verifying directly via logs, but collected output with post-execution validation (along with a more defined interface for the collected output) could work well. |
||
}); | ||
|
||
it('paused controls playback state', async () => { | ||
await waitForTestPlan(` | ||
inputs: | ||
- paused: false | ||
events: | ||
- onPlayerStateChange | ||
`); | ||
await waitForLogLabel('onPlayerStateChange ::: Playing'); | ||
await waitForTap(by.id('paused')); | ||
await waitForLogLabel('onPlayerStateChange ::: Idle'); | ||
}); | ||
|
||
it('autoMaxQuality controls highest quality picked on auto', async () => { | ||
await waitForTestPlan(` | ||
inputs: | ||
- autoMaxQuality | ||
events: | ||
- onQualityChange | ||
`); | ||
await waitForLogLabel('onQualityChange ::: name ::: 720p', 24); | ||
await waitForClearLogs(); | ||
// bump down | ||
await waitForTap(by.id('autoMaxQuality:480p')); | ||
await waitForLogLabel('onQualityChange ::: name ::: 480p', 24); | ||
await waitForClearLogs(); | ||
// back to max | ||
await waitForTap(by.id('autoMaxQuality:720p')); | ||
await waitForLogLabel('onQualityChange ::: name ::: 720p', 24); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a future pass, maybe something like a fluent DSL would be useful here. We could likely achieve similar readability, without the need to parse. Would also make it simpler to extend for more nuanced cases.