-
Notifications
You must be signed in to change notification settings - Fork 53
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
test(playwright): Convert Cypress tests to Playwright - 2 #1246
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
c17848d
to
a98fb39
Compare
a98fb39
to
7b913de
Compare
7b913de
to
1d4b620
Compare
1d4b620
to
a2a4a6c
Compare
a2a4a6c
to
e852adf
Compare
e852adf
to
099feb3
Compare
099feb3
to
dc9a343
Compare
dc9a343
to
10ca9af
Compare
10ca9af
to
20bfcfd
Compare
20bfcfd
to
c0e623c
Compare
c0e623c
to
dfced22
Compare
dfced22
to
8e69332
Compare
8e69332
to
1daa3bd
Compare
65dd763
to
9db8cb4
Compare
9db8cb4
to
c19c699
Compare
c19c699
to
0ecd40d
Compare
0ecd40d
to
f2cc98b
Compare
f2cc98b
to
1d2f9f5
Compare
1d2f9f5
to
0eb97bd
Compare
0eb97bd
to
6397b02
Compare
6397b02
to
94e6306
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.
Looks good to me! I just had a few questions I left as comments throughout the code.
Could you explain how we are able to remove the loggedIn
test config? Should we be mocking manager responses for anything that requires authentication?
/** | ||
* Static locators | ||
*/ | ||
this.messageTextarea = this.dialog.getByPlaceholder("Tell us more...", { |
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.
Do we have a label to use instead of placeholder? If we do, could we use getByLabel()
instead of getByPlaceholder()
?
If not, it's something we may want to raise as an accessibility issue.
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.
Sadly there is no label and that's not great. It's an old component and when we will redo it we need to change it.
|
||
import { generateRandomId } from "../utils"; | ||
|
||
type GenerateTypesArgs = { nbSlices: number }; |
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.
What does nbSlices
mean? "nb" is unclear - is there a clearer name?
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.
Yes sorry my bad here, slicesCount
is better!
playwright/mocks/generateTypes.ts
Outdated
import { generateRandomId } from "../utils"; | ||
|
||
type GenerateTypesArgs = { | ||
nbTypes: number; |
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.
Same comment as above: is there a clearer name than "nb"?
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.
typesCount
, thanks, you're right
import { test } from "../../fixtures"; | ||
import { generateLibraries, generateTypes } from "../../mocks"; | ||
|
||
test.describe("Side nav", () => { |
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 isn't a comment specific to this PR: Do you think the describe
groups are necessary?
We seem to have one describe
per .spec.ts
file. The Playwright UI list could be shallower if we removed the describe
groups.
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.
YESSSS! I had the same thought and I want to remove them ALL!
Because we prefer to have a small file, and so create another file instead of another describe, we can and should remove them.
I will do it right after the two PRs, or just before merging the second one so I don't have conflict with myself 😅
Yes, for standalone test at the moment. It finally set a common ground for all standalone tests that we are writing now. We mock everything that query the outside world that we want to test for a specific test. So if you test something related to an authentication in wroom, yes mock. DX is much nicer like that since you don't care about anything external, email, password, etc... Let me know what you think and we could come back to something different. |
198cf40
to
dabecf2
Compare
dabecf2
to
3126c5d
Compare
3126c5d
to
56cf806
Compare
Context
The Solution
Sorry for the big PR 😬
This PR include:
Impact / Dependencies
Checklist before requesting a review