-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improvements in Playwright setup and added tests for running bruno-testbench #4694
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
Conversation
7a60e3f
to
b612655
Compare
13a8a93
to
6b380dc
Compare
CLI Test Results 1 files 113 suites 36s ⏱️ Results for commit a006fe8. ♻️ This comment has been updated with latest results. |
36778ec
to
b8feedd
Compare
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.
if time permits, please add the following eslint config
...
const playwright = require('eslint-plugin-playwright');
...
{
files: ["e2e-tests/**/*.{js,ts}"],
ignores: ["**/*.config.js"],
extends: [playwright.configs['flat/recommended']],
languageOptions: {
globals: {
...globals.node
}
},
rules: {
"no-undef": "error",
"indent": ["error", 2],
"no-unused-vars": "error",
// Common test-friendly rules
"no-unused-expressions": "off",
"max-lines-per-function": "off",
"no-await-in-loop": "off", // Playwright tests often need sequential awaits
"no-restricted-syntax": "off", // Allow for...of loops which are common in Playwright
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0, "maxBOF": 0 }],
"padding-line-between-statements": [
"error",
// Add blank line before return statements
{ blankLine: "always", prev: "*", next: "return" },
]
}
}
…vements - Trace will capture snapshots now - Added ability to add init Electron user-data, preferences and other app settings. - Improved test Fixtures - Use tempdir for Electron user-data - Ability to reuse app instance for a given init user-data by placing them in a folder(`pageWithUserData` Fixture) - Ability to create tests with fresh user-data(`newPage` Fixture) - Improved logging - Improved the env vars to customize the Electron user-data-path
Currently the test-results and annotations form jobs are getting added to random Workflow and there is no fix for it right now Ref: EnricoMi/publish-unit-test-result-action#12 Also Playwright tests have the same triggers as Tests, so no need to keep it separate.
b8feedd
to
a006fe8
Compare
skipping this since its not in the scope of this PR |
userData
for all instances of the app during test run.pageWithUserData
Fixture.e2e-tests
, if there is a folder namedinit-user-data
, all the files within it will get copied to theuserData
location of a dedicated Bruno Electron app instance.pageWithUserData
fixture({pageWithUserData: page}
).{{projectRoot}}
(literal text) within those files(e.g.preferences.json
) will get replaced with the absolute path of the current project/repo's path. This will be useful to make it env agnostic whether its between contributors or its running in CI.createTmpDir
Fixture can be used to create temporary folder which can be provided as Location to create collections.newPage
Fixture).[Electron #<worker id>] |
to differentiate the logs.userData
path.ELECTRON_USER_DATA_PATH
env var can now be used modify the ElectronuserData
path.