Skip to content

Commit

Permalink
fix(e2e): fix eslint playwright/expect-expect rule and configure as e…
Browse files Browse the repository at this point in the history
…rror (#1030)
  • Loading branch information
divdavem authored Nov 20, 2024
1 parent de19c38 commit bedfbb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/modal/modal.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,20 @@ Close`,
await modalDemoPO.locatorRoot.waitFor();
await modalDemoPO.locatorLaunchDemoModalButton.click();
await modalPO.locatorDisableBackdropButton.click();
await modalPO.locatorBackdrop.waitFor({state: 'hidden'});
await expect(modalPO.locatorBackdrop).toBeHidden();
await modalPO.locatorEnableBackdropButton.click();
await modalPO.locatorBackdrop.waitFor();
await modalPO.locatorRoot.waitFor();
await modalPO.locatorLaunchOtherModalButton.click();
await otherModalPO.waitLoaded();
await otherModalPO.locatorDisableBackdropButton.click();
await otherModalPO.locatorBackdrop.waitFor({state: 'hidden'});
await expect(otherModalPO.locatorBackdrop).toBeHidden();
await otherModalPO.locatorEnableBackdropButton.click();
await otherModalPO.locatorBackdrop.waitFor();
await otherModalPO.locatorCloseButton.click();
await otherModalPO.locatorRoot.waitFor({state: 'hidden'});
await expect(otherModalPO.locatorRoot).toBeHidden();
await modalPO.locatorCloseButton.click();
await modalPO.locatorRoot.waitFor({state: 'hidden'});
await expect(modalPO.locatorRoot).toBeHidden();
});

test.describe.parallel(`Modal customizability`, () => {
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default tseslint.config(
rules: {
...playwright.configs['flat/recommended'].rules,
'playwright/no-conditional-in-test': 'off',
'playwright/expect-expect': 'error',
},
},
{
Expand Down

0 comments on commit bedfbb2

Please sign in to comment.