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): Add static state tables for all Button components #469

Merged
merged 6 commits into from
Feb 26, 2020

Conversation

anicholls
Copy link
Contributor

@anicholls anicholls commented Feb 13, 2020

Summary

In preparation for #468, we would like to have static state tables in place so that we can ensure no regressions are introduced in the upcoming button refactor. This PR adds them for Button, DropdownButton, and TextButton. It also moves the existing IconButton static states story to a common folder with the others (I thought this was clearer than having to dive into subfolders for each visual testing story - especially when we start to add multiple stories for theming).

Note: There are actually quite a few issues with some of the prop combinations. Some problems are stylistic, while others make it clear where we've exposed possible prop combinations that shouldn't be available. I would propose we leave them as is for now and try to address them in the refactor. Would love some input on this.

);

storiesOf('Components|Buttons/Button/React/Visual Testing/Button', module)
.addParameters({component: Button})
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 put all of these under a States folder since we might also add a story for theming for each one of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a States story for each component. I went for the following organization.

Visual Testing/
  Button/
    States
    Theming
  IconButton/
    States
    Theming
  ...

If the consensus is to swap the component and states/theming/etc categories, I can do that.

@cypress
Copy link

cypress bot commented Feb 13, 2020



Test summary

155 0 0 0


Run details

Project canvas-kit
Status Passed
Commit dcba3e0
Started Feb 21, 2020 5:37 PM
Ended Feb 21, 2020 5:40 PM
Duration 03:21 💡
OS Linux Ubuntu Linux - 16.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@anicholls
Copy link
Contributor Author

These tables make our button component look pretty buggy. Wondering if we should change the target to the prerelease/v4 branch instead of putting them in master.

@cypress
Copy link

cypress bot commented Feb 21, 2020



Test summary

155 0 0 0


Run details

Project canvas-kit
Status Passed
Commit bcc71a1 ℹ️
Started Feb 26, 2020 5:52 PM
Ended Feb 26, 2020 5:55 PM
Duration 03:44 💡
OS Linux Ubuntu Linux - 16.04
Browser Electron 78

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@lychyi lychyi left a comment

Choose a reason for hiding this comment

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

I think we can merge as soon as they are added to chromatic right?

@anicholls anicholls merged commit a4cd597 into Workday:master Feb 26, 2020
@anicholls anicholls deleted the button-states branch February 26, 2020 18:08
@anicholls anicholls mentioned this pull request Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants