-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Playwright tests - stage 1 - login with email and password test #8988
Conversation
Log
|
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.
PR Summary
This PR introduces the initial authentication testing framework using Playwright, implementing email/password login functionality with Page Object Model (POM) pattern and environment configuration.
- Added
tests/authentication/login.spec.ts
implementing basic email/password login test with environment variables - Modified
playwright.config.ts
to set single worker execution and added dedicated "Authentication" project configuration - Created comprehensive
loginPage.ts
POM with locators and methods for all login-related UI elements - Updated
FRONTEND_BASE_URL
in.env.example
to useapp.localhost:3001
and added test credential examples
💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!
4 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile
Also, this test is written with multi workspace feature active so it may not work in CI |
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.
Thank you for your work! I wrote a few questions. Let's discuss them before merging so I don't lose track of the subject 😄
{ | ||
name: 'Authentication', | ||
testMatch: /authentication\/.*\.spec\.ts/, | ||
}, |
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.
I'm unsure about the use of Playwright projects here. To me, this feature is useful to run projects on different environments. Wouldn't it be more straightforward to run authentication tests by specifying the path to the folder where you extracted them? What do you thin?
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.
I use projects to split tests by things being tested, I can change it to tags inside tests so there won't be need to use projects for them but I'll think about it
@@ -1,5 +1,5 @@ | |||
# Note that provide always without trailing forward slash to have expected behaviour | |||
FRONTEND_BASE_URL=http://localhost:3001 | |||
FRONTEND_BASE_URL=http://app.localhost:3001 |
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.
Why did we change the URL to this? Maybe I missed something.
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.
@Devessier it's because of multiworkspace feature now, if I type localhost:3001
it's redirected to app.localhost:3001
so I changed it as there's no need to check redirection in my opinion
Thanks for your explanations, @BOHEUS. We can merge. |
Scenario: #8469 (comment)
To launch this test,
yarn playwright test --project Authentication
must be used inpackages/twenty-e2e-testing
directory (for some reason when launching this test from IDE, be Webstorm or VSCode, it won't fetch the data from .env)