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

feat(tests): add Playwright for e2e testing #3297

Merged
merged 3 commits into from
Oct 15, 2024
Merged

Conversation

olgapod
Copy link
Contributor

@olgapod olgapod commented Oct 10, 2024

Description

-Setup Playwright testing framework for e2e tests

Testing

  • run npm run playwright:install
  • run npm run playwright:watch

@CLAassistant
Copy link

CLAassistant commented Oct 10, 2024

CLA assistant check
All committers have signed the CLA.

@rdig rdig added qa For fixes found during a qa session enhancement New feature or request and removed qa For fixes found during a qa session labels Oct 11, 2024
@olgapod olgapod force-pushed the feat/add-playwright branch 2 times, most recently from 07d945c to fa5f1d8 Compare October 11, 2024 16:46
@olgapod olgapod marked this pull request as ready for review October 11, 2024 16:49
@olgapod olgapod requested review from a team as code owners October 11, 2024 16:49
@olgapod olgapod force-pushed the feat/add-playwright branch from fa5f1d8 to 9cf08ce Compare October 11, 2024 16:53
@chmanie
Copy link
Member

chmanie commented Oct 11, 2024

Nice to see that you're adding playwright! I haven't used it but it seems quite promising!
I assume we won't be running these tests locally and only on CI?

iamsamgibbs
iamsamgibbs previously approved these changes Oct 14, 2024
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Congratulations on your first PR 🎉

Nice job, this is all working as expected. Able to test in Playwright's UI:

Screenshot 2024-10-14 at 08 42 23

Tests are also passing in headless mode:

Screenshot 2024-10-14 at 08 46 36

Looking forward to this being expanded to include wallet connection etc and some proper tests! :)

Comment on lines 7 to 9
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this will be uncommented for something later on?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will remove them for now

Comment on lines 52 to 70
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, guessing these will be uncommented when sorting out mobile tests?

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Please also remove all the cypress stuff in this PR

@rdig
Copy link
Member

rdig commented Oct 14, 2024

Nice to see that you're adding playwright! I haven't used it but it seems quite promising! I assume we won't be running these tests locally and only on CI?

@chmanie I mean I also want us to retain the ability to run them locally, however, my main plan is to run them via nightlies, and with time, maybe on merged into master

(I say with time, since I expect we're going to have a lot of tests which will take some time run)

@olgapod
Copy link
Contributor Author

olgapod commented Oct 14, 2024

Please also remove all the cypress stuff in this PR

done

@rdig rdig mentioned this pull request Oct 15, 2024
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

All good here. Nice work!

And congratulations on your very first PR 🎉

Screenshot from 2024-10-15 13-50-59

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Still all good!

Screenshot 2024-10-15 at 12 34 40

@olgapod olgapod merged commit 8807a96 into master Oct 15, 2024
4 of 6 checks passed
@olgapod olgapod deleted the feat/add-playwright branch October 15, 2024 13:13
@rdig
Copy link
Member

rdig commented Oct 16, 2024

@olgapod please wait for 3 approvals before merging (even though the enforced rule is just two)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants