Skip to content
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(accordion): migrate component tests to playwright #6255

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

robinzigmond
Copy link
Contributor

Proposed behaviour

The Accordion component should have in-browser tests using the Playwright framework

Current behaviour

Accordion currently has Cypress tests instead of Playwright tests

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Cypress automation tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in CodeSandbox/storybook
  • Add new Cypress test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

The following CodeSandbox is an example of the broken behaviour.
You can see the new behaviour by looking at the version in the comment by codesandbox[bot].

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 11, 2023

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 4e64dbe:

Sandbox Source
carbon-quickstart Configuration
carbon-quickstart-typescript Configuration
carbon-quickstart PR


([
["white", "rgb(255, 255, 255)", "be.visible"],
["transparent", "rgba(0, 0, 0, 0)", "be.visible"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Should third parameter "be.visible" be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good spot, thanks. Looks like I forgot to remove this from the Cypress test even though we're not using it.

page,
}) => {
await mount(<AccordionComponent />, {
hooksConfig: { focusRedesignOptOut: true },
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we import HooksConfig from playwright and use it here like: "await mount("

mount,
page,
}) => {
await mount(<AccordionGroupComponent />, {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

page,
}) => {
await mount(<AccordionGroupComponent />, {
hooksConfig: { focusRedesignOptOut: true },
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

page,
}) => {
await mount(<AccordionGroupComponent />, {
hooksConfig: { focusRedesignOptOut: true },
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@nineteen88
Copy link
Contributor

Nothing further to add

nineteen88
nineteen88 previously approved these changes Aug 22, 2023
@robinzigmond robinzigmond marked this pull request as ready for review August 22, 2023 13:03
@robinzigmond robinzigmond requested a review from a team as a code owner August 22, 2023 13:03
@robinzigmond robinzigmond merged commit 0183a35 into master Aug 22, 2023
@robinzigmond robinzigmond deleted the FE-6091-accordion-playwright branch August 22, 2023 13:16
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 119.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants