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

fix: formassociated and async tests on firefox #4158

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

radium-v
Copy link
Collaborator

@radium-v radium-v commented Dec 2, 2020

Description

  • fix broken FormAssociated tests on Firefox
  • make sure tests are asynchronous and that each scenario cleans up after itself
  • fix a select test that was incorrectly using native browser elements

Motivation & context

All of the FormAssociated tests were working in Chromium but failing in Firefox. There were also some tests that used timeouts and others that didn't utilize async fixture methods. Tests can use the fixture's parent and document to attach elements like forms when needed, and all fixture-based tests should call disconnect() or remove any attached elements at the end of each scenario.

Issue type checklist

  • Chore: A change that does not impact distributed packages.
  • Bug fix: A change that fixes an issue, link to the issue above.
  • New feature: A change that adds functionality.

Is this a breaking change?

  • This change causes current functionality to break.

Adding or modifying component(s) in @microsoft/fast-components checklist

Process & policy checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

- make sure tests are async and clean up after themselves
@radium-v radium-v self-assigned this Dec 2, 2020
@radium-v radium-v added the area:fast-foundation Pertains to fast-foundation label Dec 2, 2020
@EisenbergEffect
Copy link
Contributor

Thanks for putting the work into this! Is there anything you think we can do to improve our test helpers to guide folks into the pit of success in the future? I'm hoping to pull the test helpers out into their own package for community use in the not distant future. We can certainly add docs around these things but I'm wondering if we can make the helpers better as well.

Copy link
Contributor

@EisenbergEffect EisenbergEffect left a comment

Choose a reason for hiding this comment

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

Nice!

@radium-v
Copy link
Collaborator Author

radium-v commented Dec 2, 2020

@EisenbergEffect I think documenting a scenario's cycle (setup, connect, test, disconnect) will be super useful, and making sure that components have general guidelines for what needs to be tested will go a long way for coverage. Just a few different types of tests I'm commonly seeing for our components are connection/disconnection, attributes, properties, user interaction, and form association.

Copy link
Contributor

@nicholasrice nicholasrice left a comment

Choose a reason for hiding this comment

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

Awesome to see this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants