-
Notifications
You must be signed in to change notification settings - Fork 39
Playwright #1153
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
Playwright #1153
Changes from 22 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
6c6f66e
Initialise playwright
microbit-grace e4a67b0
Downgrade to @playwright/test v1.30.0
microbit-grace 3b1e7f4
Configure Playwright
microbit-grace dadd592
Upgrade playwright/test to v1.32.0
microbit-grace 0f212a5
Add settings.spec.ts
microbit-grace be55bc4
Add reset.spec.ts
microbit-grace 09f20ab
Add more test files WIP
microbit-grace cdd14bf
Add rest of playwright tests
microbit-grace c7a9bc0
Add accessibility.spec.ts
microbit-grace 3c61a54
Rename *.spec.ts -> *.test.ts
microbit-grace 83f8bf6
Remove playwright test match for *.spec.ts
microbit-grace bf32765
Update README.md
microbit-grace db74dbc
Add navigation to app into fixture
microbit-grace 9a58c4e
Update package-lock.json
microbit-grace abc1a3e
Remove test examples from playwright init
microbit-grace 9d15e4d
Refactoring (renaming and tidying) WIP
microbit-grace a6c75dd
Update package-lock.json
microbit-grace 627a0e0
Replace app.ts with app-playwright.ts
microbit-grace 499e1b2
Use `npm run serve` to serve editor
microbit-grace cadbe54
Configure webServer for CI
microbit-grace 373dd28
Upgrade playwright to 1.33
microbit-grace 32519c5
Refactoring
microbit-grace 1cb5d93
Make playwright versions the same in package.json
microbit-grace d560992
Update build.yml
microbit-grace b86d830
Fix build.yml
microbit-grace 731fe3e
Rerun CI
microbit-grace 6a98602
Upgrade to playwright@latest
microbit-grace 918d530
Upgrade to v1.42.1-jammy
microbit-grace be59f1d
Tweak tests to be less flaky
microbit-grace 89c6abb
Add timeout minutes to build time
microbit-grace c580a85
Remove puppeteer and pptr-testing-library
microbit-grace 179e918
Rename last `findXXX` to `expectXXX`
microbit-grace 8c5684f
Use playwright instead of vitest for E2E
microbit-grace d6ea1ee
Remove playwright from package.json
microbit-grace 55117e1
Refactor getSimulatorIframe
microbit-grace 2339e62
Refactor typeInEditor
microbit-grace 8962bb4
Tweak typeInEditor comment
microbit-grace 4a7c055
Add playwright to dev
microbit-grace 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,7 @@ __pycache__ | |
*.pyc | ||
/reports/* | ||
/crowdin/* | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
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,38 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: "./src/e2e", | ||
fullyParallel: true, | ||
forbidOnly: !!process.env.CI, | ||
retries: process.env.CI ? 2 : 0, | ||
workers: process.env.CI ? 1 : undefined, | ||
reporter: "html", | ||
use: { | ||
trace: "on-first-retry", | ||
}, | ||
|
||
/* Configure projects for major browsers */ | ||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
webServer: { | ||
...(process.env.CI | ||
? { | ||
command: `npx vite preview --port 3000 --base ${process.env.BASE_URL}`, | ||
url: `http://localhost:3000${process.env.BASE_URL}`, | ||
} | ||
: { | ||
command: "npm run start", | ||
url: "http://localhost:3000", | ||
}), | ||
reuseExistingServer: !process.env.CI, | ||
}, | ||
}); |
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,35 @@ | ||
import { test as base } from "@playwright/test"; | ||
import { App } from "./app.js"; | ||
|
||
type MyFixtures = { | ||
app: App; | ||
}; | ||
|
||
export const test = base.extend<MyFixtures>({ | ||
app: async ({ page, context }, use) => { | ||
const app = new App(page, context); | ||
await context.grantPermissions(["clipboard-read", "clipboard-write"]); | ||
await context.addCookies([ | ||
{ | ||
// See corresponding code in App.tsx. | ||
name: "mockDevice", | ||
value: "1", | ||
url: app.baseUrl, | ||
}, | ||
// Don't show compliance notice for Foundation builds | ||
{ | ||
name: "MBCC", | ||
value: encodeURIComponent( | ||
JSON.stringify({ | ||
version: 1, | ||
analytics: false, | ||
functional: true, | ||
}) | ||
), | ||
url: app.baseUrl, | ||
}, | ||
]); | ||
await app.goto(); | ||
await use(app); | ||
}, | ||
}); |
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.
Uh oh!
There was an error while loading. Please reload this page.