-
Notifications
You must be signed in to change notification settings - Fork 8
feat(e2e): initial reimplementation of e2e tests on playwright - new module @exadel/esl-website-e2e created #3596
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f7f39da
feat(e2e): initial reimplementation of e2e tests on playwright - new …
ala-n c4c248f
test(e2e): add base screen snapshots
ala-n 43172e0
chore(e2e): update CI process to use esl-website-e2e
ala-n e3d0856
chore(e2e): fix testing screens
ala-n 23c76e7
chore(e2e): fix timeouts
ala-n b3b064e
chore(e2e): fix timeouts even more
ala-n 6c45fec
chore(e2e): rework full page screener
ala-n 7792de8
test(e2e): update base screens usung WSL Ubuntu
ala-n 1d5dbc1
chore(e2e): make full page screener more stable
ala-n b369a52
chore(e2e): one more try to make full page screener more stable
ala-n b36b4ad
chore(e2e): rework tests, fix run command, update page scroller
ala-n 3e62ea2
test(e2e): update base screens usung WSL Ubuntu
ala-n 0ec0665
chore(e2e): fix 1px diff in full page test
ala-n 6541769
chore(e2e): small optimization of default artifact payload
ala-n f8d9a17
test(e2e): update base screens usung WSL Ubuntu
ala-n fd89f6e
chore(e2e): fix chrome rendering issue
ala-n f694cfa
test(e2e): update base screens usung WSL Ubuntu
ala-n 3337554
chore(e2e): last idea how to fix rendering mismatch
ala-n 716c3d5
Merge remote-tracking branch 'origin/test/vitest-e2e' into test/vites…
ala-n 59839e2
chore(e2e): update playwrite deps, fix typings
ala-n f7eb481
chore(e2e): update screenshot
dshovchko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Playwright artifacts | ||
| playwright-report | ||
| playwright/.cache | ||
| /test-results | ||
|
|
||
| # Only Linux screenshots should be committed | ||
| **/*-win32.png | ||
| **/*-darwin.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type {Page} from '@playwright/test'; | ||
|
|
||
| export async function scrollTillTheEnd(page: Page) { | ||
| for (let i = 0; i < 40; i++) { | ||
| const y = await page.evaluate(() => window.scrollY); | ||
| await page.mouse.wheel(0, 150); | ||
| await page.waitForTimeout(200); | ||
| if (y === await page.evaluate(() => window.scrollY)) break; | ||
| } | ||
| } | ||
|
|
||
| export async function waitForFonts(page: Page) { | ||
| // Fonts can affect rendering; wait for them if the page uses webfonts. | ||
| await page.evaluate(async () => { | ||
| const fonts: FontFaceSet = document.fonts; | ||
| if (fonts?.status !== 'loaded') await fonts.ready; | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "private": true, | ||
| "name": "@exadel/esl-website-e2e", | ||
| "type": "module", | ||
| "version": "6.0.0-beta.5", | ||
| "description": "Snapshot tests for ESL Website", | ||
| "homepage": "https://esl-ui.com/", | ||
| "license": "MIT", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/exadel-inc/esl.git" | ||
| }, | ||
| "scripts": { | ||
| "run": "nx run esl-website-e2e:run", | ||
| "run:update": "nx run esl-website-e2e:run:update", | ||
| "dev:tests": "nx run esl-website-e2e:run --no-autorun", | ||
| "dev:update": "nx run esl-website-e2e:run --no-autorun", | ||
| "run:server": "cross-env-shell PORT=3007 SITE_ENV=e2e nx run esl-website:start" | ||
| }, | ||
| "dependencies": { | ||
| "@exadel/esl-website": "^6.0.0-beta.5", | ||
| "@playwright/test": "^1.58.0", | ||
| "playwright": "^1.58.0", | ||
| "rimraf": "^6.1.2" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The 'update-snapshots' job depends on 'e2e-tests' but will only run when 'needs.e2e-tests.result == failure'' or on manual dispatch. However, if e2e-tests is skipped (when updateSnapshots is true on manual dispatch), the dependency will cause update-snapshots to be skipped as well. The needs dependency should be removed or made conditional.