-
Notifications
You must be signed in to change notification settings - Fork 377
chore: Migrate tests to RTL (3) #7031
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 5 additions & 130 deletions
135
...ges/react-core/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,136 +1,11 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`EmptyState Full height 1`] = ` | ||
| <div> | ||
| <div | ||
| class="pf-c-empty-state pf-m-lg pf-m-full-height" | ||
| > | ||
| <div | ||
| class="pf-c-empty-state__content" | ||
| > | ||
| <h3 | ||
| class="pf-c-title pf-m-md" | ||
| data-ouia-component-id="OUIA-Generated-Title-5" | ||
| data-ouia-component-type="PF4/Title" | ||
| data-ouia-safe="true" | ||
| > | ||
| EmptyState large | ||
| </h3> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `; | ||
| exports[`EmptyState Full height 1`] = `"<div class=\\"pf-c-empty-state pf-m-lg pf-m-full-height\\" data-testid=\\"empty-state-test-id\\"><div class=\\"pf-c-empty-state__content\\"><h3 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-5\\" class=\\"pf-c-title pf-m-md\\">EmptyState large</h3></div></div>"`; | ||
|
|
||
| exports[`EmptyState Main 1`] = ` | ||
| <div> | ||
| <div | ||
| class="pf-c-empty-state" | ||
| > | ||
| <div | ||
| class="pf-c-empty-state__content" | ||
| > | ||
| <h5 | ||
| class="pf-c-title pf-m-lg" | ||
| data-ouia-component-id="OUIA-Generated-Title-1" | ||
| data-ouia-component-type="PF4/Title" | ||
| data-ouia-safe="true" | ||
| > | ||
| HTTP Proxies | ||
| </h5> | ||
| <div | ||
| class="pf-c-empty-state__body" | ||
| > | ||
| Defining HTTP Proxies that exist on your network allows you to perform various actions through those proxies. | ||
| </div> | ||
| <button | ||
| aria-disabled="false" | ||
| class="pf-c-button pf-m-primary" | ||
| data-ouia-component-id="OUIA-Generated-Button-primary-1" | ||
| data-ouia-component-type="PF4/Button" | ||
| data-ouia-safe="true" | ||
| type="button" | ||
| > | ||
| New HTTP Proxy | ||
| </button> | ||
| <div | ||
| class="pf-c-empty-state__secondary" | ||
| > | ||
| <button | ||
| aria-disabled="false" | ||
| aria-label="learn more action" | ||
| class="pf-c-button pf-m-link" | ||
| data-ouia-component-id="OUIA-Generated-Button-link-1" | ||
| data-ouia-component-type="PF4/Button" | ||
| data-ouia-safe="true" | ||
| type="button" | ||
| > | ||
| Learn more about this in the documentation. | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `; | ||
| exports[`EmptyState Main 1`] = `"<div class=\\"pf-c-empty-state\\" data-testid=\\"empty-state-test-id\\"><div class=\\"pf-c-empty-state__content\\"><h5 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-1\\" class=\\"pf-c-title pf-m-lg\\">HTTP Proxies</h5><div class=\\"pf-c-empty-state__body\\">Defining HTTP Proxies that exist on your network allows you to perform various actions through those proxies.</div><button aria-disabled=\\"false\\" class=\\"pf-c-button pf-m-primary\\" type=\\"button\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-primary-1\\">New HTTP Proxy</button><div class=\\"pf-c-empty-state__secondary\\"><button aria-disabled=\\"false\\" aria-label=\\"learn more action\\" class=\\"pf-c-button pf-m-link\\" type=\\"button\\" data-ouia-component-type=\\"PF4/Button\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Button-link-1\\">Learn more about this in the documentation.</button></div></div></div>"`; | ||
|
|
||
| exports[`EmptyState Main variant large 1`] = ` | ||
| <div> | ||
| <div | ||
| class="pf-c-empty-state pf-m-lg" | ||
| > | ||
| <div | ||
| class="pf-c-empty-state__content" | ||
| > | ||
| <h3 | ||
| class="pf-c-title pf-m-md" | ||
| data-ouia-component-id="OUIA-Generated-Title-2" | ||
| data-ouia-component-type="PF4/Title" | ||
| data-ouia-safe="true" | ||
| > | ||
| EmptyState large | ||
| </h3> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `; | ||
| exports[`EmptyState Main variant large 1`] = `"<div class=\\"pf-c-empty-state pf-m-lg\\" data-testid=\\"empty-state-test-id\\"><div class=\\"pf-c-empty-state__content\\"><h3 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-2\\" class=\\"pf-c-title pf-m-md\\">EmptyState large</h3></div></div>"`; | ||
|
|
||
| exports[`EmptyState Main variant small 1`] = ` | ||
| <div> | ||
| <div | ||
| class="pf-c-empty-state pf-m-sm" | ||
| > | ||
| <div | ||
| class="pf-c-empty-state__content" | ||
| > | ||
| <h3 | ||
| class="pf-c-title pf-m-md" | ||
| data-ouia-component-id="OUIA-Generated-Title-3" | ||
| data-ouia-component-type="PF4/Title" | ||
| data-ouia-safe="true" | ||
| > | ||
| EmptyState small | ||
| </h3> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `; | ||
| exports[`EmptyState Main variant small 1`] = `"<div class=\\"pf-c-empty-state pf-m-sm\\" data-testid=\\"empty-state-test-id\\"><div class=\\"pf-c-empty-state__content\\"><h3 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-3\\" class=\\"pf-c-title pf-m-md\\">EmptyState small</h3></div></div>"`; | ||
|
|
||
| exports[`EmptyState Main variant xs 1`] = ` | ||
| <div> | ||
| <div | ||
| class="pf-c-empty-state pf-m-xs" | ||
| > | ||
| <div | ||
| class="pf-c-empty-state__content" | ||
| > | ||
| <h3 | ||
| class="pf-c-title pf-m-md" | ||
| data-ouia-component-id="OUIA-Generated-Title-4" | ||
| data-ouia-component-type="PF4/Title" | ||
| data-ouia-safe="true" | ||
| > | ||
| EmptyState small | ||
| </h3> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| `; | ||
| exports[`EmptyState Main variant xs 1`] = `"<div class=\\"pf-c-empty-state pf-m-xs\\" data-testid=\\"empty-state-test-id\\"><div class=\\"pf-c-empty-state__content\\"><h3 data-ouia-component-type=\\"PF4/Title\\" data-ouia-safe=\\"true\\" data-ouia-component-id=\\"OUIA-Generated-Title-4\\" class=\\"pf-c-title pf-m-md\\">EmptyState small</h3></div></div>"`; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you delete this test? is it testing the 'container' variant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neither of these icon tests made much sense to me. I see now that it is wrapped in a div when "icon" variant isn't specified. I can add it back with something similar.