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 CSVEditor test #793

Closed
vnugent opened this issue Apr 22, 2023 · 3 comments · Fixed by #799
Closed

Fix CSVEditor test #793

vnugent opened this issue Apr 22, 2023 · 3 comments · Fixed by #799
Labels
Difficulty: Medium help wanted Extra attention is needed
Milestone

Comments

@vnugent
Copy link
Contributor

vnugent commented Apr 22, 2023

The CSVEditor test fails randomly. The highlighted code checks to see if the OK button is disabled when there's an error in the editor.

expect(await (screen.findByRole('button', { name: 'Submit' }))).toBeDisabled()

We're currently exclude the test suite.

To do:

  • Reenable the test suite
  • Reproduce the failure
  • Come up with a more reliable test

Steps to Reproduce

  1. Fork open-tacos
  2. Make sure you can build the project locally
  3. Reenable the test suite: change xdescribe -> describe
    xdescribe('Inplace CSV editor tests', () => {
  4. Run yarn test csveditor (you might have to re-run a few times to see the error)
@vnugent vnugent added the help wanted Extra attention is needed label Apr 22, 2023
@vnugent vnugent added this to the v0.9 milestone Apr 22, 2023
@musoke
Copy link
Contributor

musoke commented Apr 24, 2023

I wonder if it's actually a real bug in CSVEditor? I sporadically see odd errors when using it, but haven't been able to pin them down well enough to file a specific bug report.

@actuallyyun
Copy link
Collaborator

actuallyyun commented Apr 24, 2023

I played with it a bit and passed the test by changing the user input from 5f to 5hf

await user.type(editor, '{arrowleft>4}{backspace}hf')
await user.type(editor, '{arrowleft>4}{backspace}{backspace}b')

Somehow in the test, just changing 5c=>5f does not disable the button, 5hf does.

btw, I have not had problem with the csv editor so far.

@vnugent
Copy link
Contributor Author

vnugent commented Apr 25, 2023

Somehow in the test, just changing 5c=>5f does not disable the button, 5hf does.

Interesting. The failure is sporadically. Often times it passes in local dev env, but would fail in GitHub action.

@musoke could be related to #796

clintonlunn added a commit that referenced this issue Apr 25, 2023
@clintonlunn clintonlunn linked a pull request Apr 25, 2023 that will close this issue
vnugent pushed a commit that referenced this issue Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants