Skip to content

<commit message>#65

Open
Daryna-91 wants to merge 1 commit into
mate-academy:mainfrom
Daryna-91:task_solution
Open

<commit message>#65
Daryna-91 wants to merge 1 commit into
mate-academy:mainfrom
Daryna-91:task_solution

Conversation

@Daryna-91

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Great job on the overall structure and the Page Object Models! However, this requires a couple of changes. The primary issue is in eslint.config.mjs, where configurations are being merged with a spread operator. This is incorrect for ESLint's flat config and can lead to rules being overwritten; they should be listed as separate objects in the exported array. [CHECKLIST ITEM #1] You'll also need to fix the linting errors this new configuration will find, such as lines exceeding the 80-character limit in tests/signUp/signUpNegative.spec.js and an unused argument in tests/signIn/signInNegative.spec.js. Addressing these points will make your setup fully functional.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread eslint.config.mjs
Comment on lines +8 to +29
{
...pluginJs.configs.recommended,
...playwright.configs['flat/recommended'],
rules: {
...pluginJs.configs.recommended.rules,
'no-unused-vars': 'error',
'max-len': [
'error',
{
code: 80,
comments: 80,
},
],
...playwright.configs['flat/recommended'].rules,
'playwright/expect-expect': 'off',
},
ignores: [
'**/node_modules/*',
'playwright.config.js',
'**/playwright-report/**',
],
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Merging different configurations like pluginJs.configs.recommended and playwright.configs['flat/recommended'] into a single object using the spread operator is not the correct approach for ESLint's flat config. If both configurations have properties with the same name (like rules), the property from the last configuration spread will overwrite the previous ones.

The recommended practice is to list each configuration as a separate object in the exported array. This ensures that all rules and settings are combined correctly.


test("Assert error message for empty email", async ({ page }) => {
await signInPage.fillPasswordField("newpass123!");
test('Assert error message for empty email', async ({}) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This test function includes an empty destructured object {} as an argument, but it's not used within the test. The ESLint configuration includes the no-unused-vars rule, which will report this as an error. To resolve the ESLint error, you can remove the unused argument, changing async ({}) to async ().

test("Assert error message for empty username in Sign up form", async () => {
await signUpPage.fillEmailField("test@gmail.com");
await signUpPage.fillPasswordField("newpass123!");
test('Assert error message for empty username in Sign up form', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line exceeds the 80-character limit configured in eslint.config.mjs. Please refactor the test description to fit within the max-len rule.

Comment on lines 17 to 19
await signUpPage.assertErrorMessageContainsText(
`username:Username must start with a letter, have no spaces, and be 2 - 40 characters.`
`username:Username must start with a letter, have no spaces, and be 2-40`,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line is longer than the 80-character limit set in the ESLint configuration. To resolve this, you could store the long error message string in a variable or constant and pass that to the method.

Comment on lines 27 to 29
await signUpPage.assertErrorMessageContainsText(
`email:This email does not seem valid.`
`email:This email does not seem valid.`,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line exceeds the 80-character limit. Consider moving the long string to a constant to improve readability and adhere to the linting rules.

test("Assert error message for empty password in Sign up form", async () => {
await signUpPage.fillUsernameField("newuser");
await signUpPage.fillEmailField("test@gmail.com");
test('Assert error message for empty password in Sign up form', async () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This line also violates the 80-character max-len rule established in the ESLint configuration. Please shorten the test description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants