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

Upgrade Playwright to the latest version 1.49.1 #1154

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
9 changes: 8 additions & 1 deletion .github/workflows/browser-js-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@ jobs:
uses: ./.github/actions/build
with:
NODE_VERSION: ${{ matrix.node-version }}
- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' ./internal/e2e-js/package.json)
PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION#^}
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "playwright_version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Install Playwright
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1' # TODO: Read from deps ?
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.playwright_version }}
- name: Test
run: npm run -w=@sw-internal/e2e-js dev -- --project ${{ matrix.project }}
env:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/browser-js-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ jobs:
uses: ./.github/actions/build
with:
NODE_VERSION: ${{ matrix.node-version }}
- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' ./internal/e2e-js/package.json)
PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION#^}
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "playwright_version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Install Playwright
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1' # TODO: Read from deps ?
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.playwright_version }}
- name: Test
run: npm run -w=@sw-internal/e2e-js dev -- --project ${{ matrix.project }}
env:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/realtime-api-production-euswcom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@ jobs:
uses: ./.github/actions/build
with:
NODE_VERSION: ${{ matrix.node-version }}
- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' ./internal/e2e-realtime-api/package.json)
PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION#^}
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "playwright_version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Install Playwright
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1' # TODO: Read from deps ?
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.playwright_version }}
- name: Test
id: run-tests
run: npm run -w=@sw-internal/e2e-realtime-api dev
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/realtime-api-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ jobs:
uses: ./.github/actions/build
with:
NODE_VERSION: ${{ matrix.node-version }}
- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' ./internal/e2e-realtime-api/package.json)
PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION#^}
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "playwright_version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Install Playwright
if: matrix.test_command == 'dev:playwright'
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1'
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.playwright_version }}
- name: Test
run: 'npm run -w=@sw-internal/e2e-realtime-api ${{ matrix.test_command }}'
env:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/realtime-api-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ jobs:
uses: ./.github/actions/build
with:
NODE_VERSION: ${{ matrix.node-version }}
- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(jq -r '.devDependencies["@playwright/test"]' ./internal/e2e-realtime-api/package.json)
PLAYWRIGHT_VERSION=${PLAYWRIGHT_VERSION#^}
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "playwright_version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT
- name: Install Playwright
if: matrix.test_command == 'dev:playwright'
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1'
PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.playwright_version }}
- name: Test
run: 'npm run -w=@sw-internal/e2e-realtime-api ${{ matrix.test_command }}'
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/v2-webrtc-calling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Install Playwright
uses: ./.github/actions/playwright
with:
PLAYWRIGHT_VERSION: '1.35.1' # TODO: Read from deps ?
PLAYWRIGHT_VERSION: '1.49.1' # TODO: Read from deps ?
- name: Run test for ${{ matrix.region.name }}
id: run-tests
run: npm run -w=@sw-internal/e2e-js dev -- v2WebrtcFromRest.spec.ts webrtcCalling.spec.ts
Expand Down
4 changes: 4 additions & 0 deletions internal/e2e-js/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.env
node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
4 changes: 2 additions & 2 deletions internal/e2e-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"vite": "^5.4.10"
},
"devDependencies": {
"@playwright/test": "^1.35.1",
"playwrigth-ws-inspector": "^1.0.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to remove this dependency because the Playwright failed with the latest version. @jpsantosbh, could you please check if we need this package anymore? It seems this dependency itself is using the Playwright, which is incompatible with the latest version.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's used in one test
I'll update the Playwright version in that package and do a new release

Copy link
Collaborator

Choose a reason for hiding this comment

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

done, just update it to [email protected] it's using the same Playwrigth version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Which test is using it? I couldn't find the error in the CI related to this dependency.

Also, is it a private package? Redirecting to the GitHub page mentioned on NPM leads me to the 404 page. https://www.npmjs.com/package/playwrigth-ws-inspector

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just update it to [email protected] it's using the same Playwrigth version.

Done, but now the CI is red again with the same error. @jpsantosbh

Copy link
Collaborator

Choose a reason for hiding this comment

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

something is weird...
Playwrigth is just a dev dependency on playwrigth-ws-inspector

It should not clash...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the test that uses it:
https://github.com/signalwire/signalwire-js/blob/main/internal/e2e-js/tests/callfabric/websocket_reconnect.spec.ts#L41

Ah, this whole test suite is skipped, and that's why the CI wasn't showing any error.

It's public

The GitHub home page for this package is giving me 404: https://github.com/signalwire/playwright-ws-inspector

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

something is weird...
Playwrigth is just a dev dependency on playwrigth-ws-inspector

Can I remove it for now? Since the test suite is already skipped, it won't affect the CI.

I am also unsure about the reasoning behind that specific test and its usage. If we want to simulate the network down/up in the e2e test, we already do this in the Video SDK tests, we can use the same thing in the CF testing as well, if needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, this whole test suite is skipped, and that's why the CI wasn't showing any error.

Something is weird cause the dependence is on the Playwrite fixture that all tests use.
So even with that test skipped it should error.

I'm checking the test results it's not a version clash. It's a missing dependency.
Maybe the package-lock is pinning an M1 build.

Copy link
Collaborator Author

@iAmmar7 iAmmar7 Dec 27, 2024

Choose a reason for hiding this comment

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

Something is weird cause the dependence is on the Playwrite fixture that all tests use.
So even with that test skipped it should error.

I removed the whole usage of this package, that's how I was able to make the CI green. Without affecting any tests since the only test that relies on this package is skipped.

"@playwright/test": "^1.49.1",
"playwrigth-ws-inspector": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion internal/e2e-realtime-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": ""
},
"devDependencies": {
"@playwright/test": "^1.35.1",
"@playwright/test": "^1.49.1",
"@types/tap": "^15.0.8",
"esbuild-register": "^3.4.2"
},
Expand Down
90 changes: 63 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading