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

[fxa-settings] Fix uncalled .toBeInTheDocument references in tests #12978

Closed
pdehaan opened this issue May 20, 2022 · 0 comments · Fixed by #13240
Closed

[fxa-settings] Fix uncalled .toBeInTheDocument references in tests #12978

pdehaan opened this issue May 20, 2022 · 0 comments · Fixed by #13240
Labels
maintenance qa- This is not something that should be tested by QA

Comments

@pdehaan
Copy link
Contributor

pdehaan commented May 20, 2022

The other half of #12868

Description

We have tests in the following files that use .toBeInTheDocument instead of .toBeInTheDocument(), making these tests look like they’re passing instead of failing:

Steps to reproduce

git grep -n ".toBe" packages | grep -Ev "\.toBe.*\("

packages/fxa-settings/src/components/BentoMenu/index.test.tsx:26:    expect(dropDown).toBeInTheDocument;
packages/fxa-settings/src/components/BentoMenu/index.test.tsx:38:    expect(dropDown).toBeInTheDocument;
packages/fxa-settings/src/components/BentoMenu/index.test.tsx:54:    expect(dropDown).toBeInTheDocument;
packages/fxa-settings/src/components/DropDownAvatarMenu/index.test.tsx:64:    expect(dropDown).toBeInTheDocument;
packages/fxa-settings/src/components/DropDownAvatarMenu/index.test.tsx:95:    expect(dropDown).toBeInTheDocument;
packages/fxa-settings/src/components/DropDownAvatarMenu/index.test.tsx:113:    expect(dropDown).toBeInTheDocument;

Expected result

.toBeInTheDocument()

Actual result

.toBeInTheDocument (which is wrong)

Environment

What browser and operating system are you using?

┆Issue is synchronized with this Jira Task

sardesam pushed a commit that referenced this issue Jun 10, 2022
Because:

* We want to ensure our tests are written correctly so they don't fail or pass by mistake

This commit:

* Corrects toBeInTheDocument to toBeInTheDocument()
* Replaces expect value with the query directly, as opposed to a constant that was only holding the initial state of the query

Closes #12978
sardesam pushed a commit that referenced this issue Jun 11, 2022
Because:

* We want to ensure our tests are written correctly so they don't fail or pass by mistake

This commit:

* Corrects toBeInTheDocument to toBeInTheDocument()
* Replaces expect value with the query directly, as opposed to a constant that was only holding the initial state of the query

Closes #12978
sardesam pushed a commit that referenced this issue Jun 11, 2022
Because:

* We want to ensure our tests are written correctly so they don't fail or pass by mistake

This commit:

* Corrects toBeInTheDocument to toBeInTheDocument()
* Replaces expect value with the query directly, as opposed to a constant that was only holding the initial state of the query

Closes #12978
sardesam pushed a commit that referenced this issue Jun 11, 2022
Because:

* We want to ensure our tests are written correctly so they don't fail or pass by mistake

This commit:

* Corrects toBeInTheDocument to toBeInTheDocument()
* Replaces expect value with the query directly, as opposed to a constant that was only holding the initial state of the query

Closes #12978
@data-sync-user data-sync-user added the qa- This is not something that should be tested by QA label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance qa- This is not something that should be tested by QA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants