Skip to content

Commit

Permalink
test(Button): unuse regression
Browse files Browse the repository at this point in the history
  • Loading branch information
itwillwork committed Jul 4, 2024
1 parent 67a299a commit 1f69dda
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build && npm pkg delete engines",
"playwright:install": "playwright install --with-deps",
"playwright": "playwright test --config=playwright/playwright.config.ts --grep-invert=@regression",
"playwright": "playwright test --config=playwright/playwright.config.ts",
"playwright:update": "npm run playwright -- -u",
"playwright:docker": "./scripts/playwright-docker.sh 'npm run playwright'",
"playwright:docker:update": "./scripts/playwright-docker.sh 'npm run playwright:update'",
Expand Down
18 changes: 0 additions & 18 deletions src/components/Button/__tests__/Button.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';

import {test} from '~playwright/core';

import {createRegressionScenarios} from '../../../stories/tests-factory/create-regression-scenarios';
import {createSmokeScenarios} from '../../../stories/tests-factory/create-smoke-scenarios';
import {Button} from '../Button';

Expand Down Expand Up @@ -106,21 +105,4 @@ test.describe('Button', {tag: '@Button'}, () => {
await expectScreenshot();
});
});

const regressionScenarios = createRegressionScenarios(defaultProps, {
size: sizeCases,
selected: selectedCases,
disabled: disabledCases,
loading: loadingCases,
view: viewsCases,
pin: pinsCases,
});

regressionScenarios.forEach(([title, details, props]) => {
test(title, details, async ({mount, expectScreenshot}) => {
await mount(<Button {...props} />);

await expectScreenshot();
});
});
});

0 comments on commit 1f69dda

Please sign in to comment.