-
Notifications
You must be signed in to change notification settings - Fork 84
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(switch): convert tests to playwright #6470
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 67dfa18:
|
src/components/switch/switch.pw.tsx
Outdated
}); | ||
|
||
([SIZE.SMALL, SIZE.LARGE] as SwitchProps["size"][]).forEach((size) => { | ||
test(`check accessibility with size sets to ${size}`, async ({ |
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.
test(`check accessibility with size sets to ${size}`, async ({ | |
test(`check accessibility with size set to ${size}`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
}); | ||
|
||
test("should verify with data-component", async ({ mount, page }) => { |
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.
test("should verify with data-component", async ({ mount, page }) => { | |
test("should render with data-component", async ({ mount, page }) => { |
src/components/switch/switch.pw.tsx
Outdated
); | ||
}); | ||
|
||
test("should verify with data-element", async ({ mount, page }) => { |
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.
test("should verify with data-element", async ({ mount, page }) => { | |
test("should render with data-element", async ({ mount, page }) => { |
src/components/switch/switch.pw.tsx
Outdated
); | ||
}); | ||
|
||
test("should verify with data-role", async ({ mount, page }) => { |
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.
test("should verify with data-role", async ({ mount, page }) => { | |
test("should render with data-role", async ({ mount, page }) => { |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
|
||
[true, false].forEach((boolVal) => { | ||
test(`should render when fieldHelpInline sets to ${boolVal}`, async ({ |
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.
test(`should render when fieldHelpInline sets to ${boolVal}`, async ({ | |
test(`should render with fieldHelpInline set to ${boolVal}`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
|
||
["error", "warning", "info"].forEach((validation) => { | ||
test(`should render with ${validation} validation icon`, async ({ |
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.
test(`should render with ${validation} validation icon`, async ({ | |
test(`should render with ${validation} validation icon`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
[SIZE.LARGE, 82, 44], | ||
] as [SwitchProps["size"], number, number][]).forEach( | ||
([size, width, height]) => { | ||
test(`should render with size sets to ${size}`, async ({ |
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.
test(`should render with size sets to ${size}`, async ({ | |
test(`should render with size set to ${size}`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
|
||
[true, false].forEach((boolVal) => { | ||
test(`check accessibility with loading prop is ${boolVal}`, async ({ |
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.
test(`check accessibility with loading prop is ${boolVal}`, async ({ | |
test(`check accessibility when loading prop is ${boolVal}`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
}); | ||
|
||
test("check accessibility with data-component prop sets", async ({ |
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.
test("check accessibility with data-component prop sets", async ({ | |
test("check accessibility with data-component prop set", async ({ |
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 comment can be applied to each test which has prop sets
src/components/switch/switch.pw.tsx
Outdated
}); | ||
|
||
[true, false].forEach((boolVal) => { | ||
test(`check accessibility with defaultChecked is ${boolVal}`, async ({ |
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.
test(`check accessibility with defaultChecked is ${boolVal}`, async ({ | |
test(`check accessibility when defaultChecked is ${boolVal}`, async ({ |
src/components/switch/switch.pw.tsx
Outdated
}); | ||
}); | ||
|
||
test("check accessibility for with Margin example", async ({ |
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.
test("check accessibility for with Margin example", async ({ | |
test("check accessibility for WithMargin example", async ({ |
b4b83a9
to
960490c
Compare
38e5cb2
to
67dfa18
Compare
🎉 This PR is included in version 124.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Proposed behaviour
Reactor tests to use Playwright.
Current behaviour
Tests currently use Cypress.
Checklist
d.ts
file added or updated if requiredQA
Additional context
N/A
Testing instructions
N/A