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(button): typescript refactor #6180

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

stephenogorman
Copy link
Contributor

@stephenogorman stephenogorman commented Jul 6, 2023

Proposed behaviour

  • Rename the button.cy.js to button.cy.tsx file in ./cypress/components/button/ folder.
  • Refactor tests to Typescript.

Current behaviour

Button tests are in js not ts.

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
  • 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

  • Run npx cypress open --component to check if the button.cy.tsx file passed
  • Run npx cypress run --component to check none of the other *.cy.tsx files have regressed

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 6, 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 b980489:

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

@cypress
Copy link

cypress bot commented Jul 6, 2023

Passing run #16881 ↗︎

0 5489 40 0 Flakiness 0

Details:

test(button): typescript refactor
Project: carbon Commit: b980489c88
Status: Passed Duration: 06:39 💡
Started: Jul 12, 2023 9:03 AM Ended: Jul 12, 2023 9:10 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

);

if (booleanState === true) {
buttonDataComponent()
.children()
.children()
.should("have.value", cssValue, "wrap");
.should("have.css", "text-wrap", cssValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

same values in if and else blocks :)

Copy link
Contributor

Choose a reason for hiding this comment

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

and tests failed

cypress/components/button/button.cy.tsx Outdated Show resolved Hide resolved
@stephenogorman stephenogorman force-pushed the cypress_typescript_button branch from 26a8624 to 0cec508 Compare July 10, 2023 22:31
@stephenogorman stephenogorman force-pushed the cypress_typescript_button branch from 9f348f4 to b980489 Compare July 11, 2023 10:59
@stephenogorman stephenogorman marked this pull request as ready for review July 12, 2023 09:00
@stephenogorman stephenogorman requested review from a team as code owners July 12, 2023 09:00
@stephenogorman stephenogorman merged commit 6a62b3f into master Jul 12, 2023
@stephenogorman stephenogorman deleted the cypress_typescript_button branch July 12, 2023 09:16
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 119.6.1 🎉

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.

4 participants