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

Copy of #6173 (smoke tests + replay) #6361

Merged
merged 27 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0440f2c
update playwright
jasonLaster Aug 9, 2022
d8045c1
downgrade playwright
jasonLaster Aug 9, 2022
64d5e32
disable matrix
jasonLaster Aug 9, 2022
44464c8
simplify
jasonLaster Aug 10, 2022
04d7905
remove check
jasonLaster Aug 10, 2022
b7419af
remove @replayio/cypress
jasonLaster Aug 16, 2022
16ccc9a
fixes
jasonLaster Aug 16, 2022
9cd4ece
patch args
ryanjduffy Aug 16, 2022
dc4cfe2
add upload action
ryanjduffy Aug 16, 2022
74409f8
HACK: coerce types
ryanjduffy Aug 16, 2022
6ed56c2
Merge remote-tracking branch 'origin/replay' into replay
ryanjduffy Aug 16, 2022
af74422
simplify
ryanjduffy Aug 16, 2022
02cd9d4
Merge remote-tracking branch 'upstream/main' into replay
ryanjduffy Aug 16, 2022
a3b155c
temporary: suppress repo test
ryanjduffy Aug 16, 2022
0113aac
yarn cleanup
ryanjduffy Aug 16, 2022
e49d200
add line reporter
ryanjduffy Aug 17, 2022
4a4863a
Update ci.yml
ryanjduffy Aug 17, 2022
8fc8e0a
Merge remote-tracking branch 'upstream/main' into replay
ryanjduffy Sep 6, 2022
6651618
add test metrics
ryanjduffy Sep 7, 2022
e60431b
remove type coercion
ryanjduffy Sep 7, 2022
944a57f
Merge branch 'main' into replay
ryanjduffy Sep 7, 2022
060df00
revert playwright downgrade and rebuild yarn.lock
jtoar Sep 8, 2022
a7d535f
Update .github/workflows/ci.yml
jtoar Sep 10, 2022
1048976
Merge branch 'main' into copy-of-replay-branch
jtoar Sep 10, 2022
ae98834
Merge branch 'main' into copy-of-replay-branch
jtoar Sep 15, 2022
e1309c4
Merge branch 'main' into copy-of-replay-branch
jtoar Sep 15, 2022
bd3e9d6
Merge branch 'main' into copy-of-replay-branch
jtoar Sep 15, 2022
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
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ jobs:

- name: Run smoke tests on 'rw dev', 'rw serve', 'rw storybook'
working-directory: ./tasks/smoke-test
run: npx playwright test
run: npx playwright test --project replay-chromium --reporter @replayio/playwright/reporter,line
jtoar marked this conversation as resolved.
Show resolved Hide resolved
env:
PROJECT_PATH: ${{ steps.setup_test_project.outputs.test_project_path }}
REDWOOD_DISABLE_TELEMETRY: 1
RECORD_REPLAY_METADATA_TEST_RUN_TITLE: Smoke test / ${{ matrix.os }} / node ${{ matrix.node-version }} latest
RECORD_REPLAY_TEST_METRICS: 1

- name: Run `rw info`
run: |
Expand Down Expand Up @@ -297,6 +299,12 @@ jobs:
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}
continue-on-error: true

- name: Upload Replays
if: always()
uses: replayio/action-upload@v0.4.3
with:
api-key: rwk_cZn4WLe8106j6tC5ygNQxDpxAwCLpFo5oLQftiRN7OP

smoke-test-docs:
needs: only-doc-changes
if: needs.only-doc-changes.outputs.only-doc-changes == 'true'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@babel/runtime-corejs3": "7.18.9",
"@nrwl/nx-cloud": "14.3.0",
"@playwright/test": "1.25.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only officially support playwright v1.19 because newer versions do not work with Firefox. If you stick with chromium, you should be okay but keep an eye out for playwright errors if you continue to update the version.

This story will improve in the coming weeks when we update our Firefox fork to the latest ESR (102.2).

"@replayio/playwright": "0.2.26",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "8.0.1",
Expand Down
22 changes: 21 additions & 1 deletion tasks/smoke-test/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
import type { PlaywrightTestConfig } from '@playwright/test'
import { PlaywrightTestConfig, devices} from '@playwright/test'
import { devices as replayDevices } from "@replayio/playwright";

// See https://playwright.dev/docs/test-configuration#global-configuration
const config: PlaywrightTestConfig = {
timeout: 90_000,
expect: {
timeout: 10 * 1000,
},

// Leaving this here to make debugging easier, by uncommenting
// use: {
// launchOptions: {
// slowMo: 500,
// headless: false,
// },
// },
projects: [
{
name: "replay-firefox",
use: { ...replayDevices["Replay Firefox"] as any },
},
{
name: "replay-chromium",
use: { ...replayDevices["Replay Chromium"] as any },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "chromium",
use: { ...devices["Desktop Chromium"] },
},
],
}

export default config
88 changes: 83 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6797,6 +6797,62 @@ __metadata:
languageName: node
linkType: hard

"@replayio/playwright@npm:0.2.26":
version: 0.2.26
resolution: "@replayio/playwright@npm:0.2.26"
dependencies:
"@replayio/replay": ^0.9.5
"@replayio/test-utils": ^0.1.2
uuid: ^8.3.2
peerDependencies:
"@playwright/test": 1.19.x
bin:
replayio-playwright: bin/replayio-playwright.js
checksum: 24e5529d84105cc8c047ab1ad4ecdea9ff68ab8e69a067e08232256426e8cc8f6f8df90bb3d1646f7215a9febd18a154fda0d73bca53d5e582c7d1c70b92857f
languageName: node
linkType: hard

"@replayio/replay@npm:^0.9.5":
version: 0.9.5
resolution: "@replayio/replay@npm:0.9.5"
dependencies:
"@replayio/sourcemap-upload": ^1.0.3
commander: ^7.2.0
is-uuid: ^1.0.2
jsonata: ^1.8.6
superstruct: ^0.15.4
text-table: ^0.2.0
ws: ^7.5.0
bin:
replay: bin/replay.js
checksum: aa2a7ec8fd149fb42ab8c5bd6a7d6a7b75f683e6db9bdbc5a4e9b968f5924108b5ea0f51fb2c990cbbfc415b87926a317925cf19811922e33d1f53cfee7e2098
languageName: node
linkType: hard

"@replayio/sourcemap-upload@npm:^1.0.3":
version: 1.0.3
resolution: "@replayio/sourcemap-upload@npm:1.0.3"
dependencies:
commander: ^7.2.0
debug: ^4.3.1
glob: ^7.1.6
node-fetch: ^2.6.1
string.prototype.matchall: ^4.0.5
checksum: a359eeef1dc33fb28d75682731862fa693b91b4b0e37fd7a04b0f87ebe00db840bee1c027eefb38f8ef75754957e746b53ba888d8a27027f383ff36f1001405e
languageName: node
linkType: hard

"@replayio/test-utils@npm:^0.1.2":
version: 0.1.2
resolution: "@replayio/test-utils@npm:0.1.2"
dependencies:
"@replayio/replay": ^0.9.5
node-fetch: ^2.6.7
uuid: ^8.3.2
checksum: 372abec60189491a197aac3c71310508438ef674cd7396b2ff318f83e70d91910c4599e089ce32842b8d9689c5c04eec414957e251e108b31a40fd61f1909266
languageName: node
linkType: hard

"@samverschueren/stream-to-observable@npm:^0.3.0":
version: 0.3.1
resolution: "@samverschueren/stream-to-observable@npm:0.3.1"
Expand Down Expand Up @@ -19674,6 +19730,13 @@ __metadata:
languageName: node
linkType: hard

"is-uuid@npm:^1.0.2":
version: 1.0.2
resolution: "is-uuid@npm:1.0.2"
checksum: 9e39508b97c724668da7011f77c2f53485784b84a7b9c54fadb6369ebff236caf1912324e3390d0a0495fcddf5f19caa7a55e6cdd0f5b528a1e3210d51d8bd54
languageName: node
linkType: hard

"is-weakref@npm:^1.0.2":
version: 1.0.2
resolution: "is-weakref@npm:1.0.2"
Expand Down Expand Up @@ -20789,6 +20852,13 @@ __metadata:
languageName: node
linkType: hard

"jsonata@npm:^1.8.6":
version: 1.8.6
resolution: "jsonata@npm:1.8.6"
checksum: 27577a8fbc80063a468d06f2b3cfd96685aac3cf1ad8c4aeb1d12b0c9bdcb2d9a21a39ed4f69e2ef1d3853dddd45a27bdec9173fc4efccdbb42296b3b3db890b
languageName: node
linkType: hard

"jsonc-parser@npm:3.0.0":
version: 3.0.0
resolution: "jsonc-parser@npm:3.0.0"
Expand Down Expand Up @@ -27111,6 +27181,7 @@ __metadata:
"@babel/runtime-corejs3": 7.18.9
"@nrwl/nx-cloud": 14.3.0
"@playwright/test": 1.25.1
"@replayio/playwright": 0.2.26
"@testing-library/jest-dom": 5.16.5
"@testing-library/react": 12.1.5
"@testing-library/react-hooks": 8.0.1
Expand Down Expand Up @@ -28575,7 +28646,7 @@ __metadata:
languageName: node
linkType: hard

"string.prototype.matchall@npm:^4.0.0 || ^3.0.1, string.prototype.matchall@npm:^4.0.7":
"string.prototype.matchall@npm:^4.0.0 || ^3.0.1, string.prototype.matchall@npm:^4.0.5, string.prototype.matchall@npm:^4.0.7":
version: 4.0.7
resolution: "string.prototype.matchall@npm:4.0.7"
dependencies:
Expand Down Expand Up @@ -28859,6 +28930,13 @@ __metadata:
languageName: node
linkType: hard

"superstruct@npm:^0.15.4":
version: 0.15.5
resolution: "superstruct@npm:0.15.5"
checksum: 73ae2043443dcc7868da6e8b4e4895410c79a88e021b514c665161199675ee920d5eadd85bb9dee5a9f515817e62f4b65a67ccb82d29f73259d012afcbcd3ce4
languageName: node
linkType: hard

"supertokens-auth-react@npm:0.24.4":
version: 0.24.4
resolution: "supertokens-auth-react@npm:0.24.4"
Expand Down Expand Up @@ -31683,9 +31761,9 @@ __metadata:
languageName: node
linkType: hard

"ws@npm:^7.3.1":
version: 7.5.7
resolution: "ws@npm:7.5.7"
"ws@npm:^7.3.1, ws@npm:^7.5.0":
version: 7.5.9
resolution: "ws@npm:7.5.9"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
Expand All @@ -31694,7 +31772,7 @@ __metadata:
optional: true
utf-8-validate:
optional: true
checksum: f856382d94dfa8d722337d79117fe4f16d48ef7d7f77a58e94af7d7f32e863fce8403c00992ddddbf1efd5a334c581c2a987aea66255f7ee368680e59f78ae15
checksum: aec4ef4eb65821a7dde7b44790f8699cfafb7978c9b080f6d7a98a7f8fc0ce674c027073a78574c94786ba7112cc90fa2cc94fc224ceba4d4b1030cff9662494
languageName: node
linkType: hard

Expand Down