-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added initial playwright configuration #49
Added initial playwright configuration #49
Conversation
ee4a948
to
4efbf80
Compare
@leecalcote Let's prototype the Playwright configuration here. |
- Created the `playwright-action` directory. - Added basic playwright configuration in the playwright-action directory. - Created a new playwright workflow to run playwright tests. Signed-off-by: VaibhavMalik4187 <[email protected]>
4efbf80
to
a48947e
Compare
.github/workflows/playwright.yml
Outdated
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [main, master] |
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.
We don’t use main.
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies |
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.
Are there no playwright github actions?
.github/workflows/playwright.yml
Outdated
with: | ||
name: /playwright-action/playwright-report | ||
path: /playwright-action/playwright-report/ | ||
retention-days: 1 |
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.
Will need a bump up.
.github/workflows/playwright.yml
Outdated
branches: [main, master] | ||
jobs: | ||
test: | ||
timeout-minutes: 10 |
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.
Not necessary and will only inevitably need a bump up.
}, | ||
|
||
{ | ||
name: "firefox", |
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.
Replace with Safari
await page.goto("https://playground.meshery.io/extension/meshmap"); | ||
|
||
// Expect a title "to contain" a substring. | ||
await expect(page).toHaveTitle( |
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.
This sort of thing is too fragile.
Updated the playwright config to: - Capture the screenshot of the test. - Record a video of execution of the test. - Enabled the headless mode (i.e. playwright will open the browser while executing the tests). However, it is not useful for CI environments. - Updated the timout values for the tests, and the retention period of the reports. Added the test script in package json. Added the "Login and logout test": - It'll visit playground website. - Login using the given creds. - Click on the hamburger menu on the top-right corner. - And log out. Signed-off-by: VaibhavMalik4187 <[email protected]>
a48947e
to
bf94885
Compare
Notes for Reviewers
This PR fixes #