-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update webcomponents to latest (#2598)
* update webcomponents to latest * bumps * fix unit tests * fix unit tests * potenital fix of Namespacesettings unit test * Use chromium (#2601) * Try using chromium * fix local * fix unit tests * fix jobs test --------- Co-authored-by: chriskari <chriskari@gmx.de> Co-authored-by: Piotr Halama <piotr.halama@sap.com>
- Loading branch information
1 parent
4c8cb2f
commit ba686c1
Showing
9 changed files
with
160 additions
and
139 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
17 changes: 5 additions & 12 deletions
17
src/components/Preferences/test/NamespaceSettings.test.tsx
This file contains 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,23 +1,16 @@ | ||
import { showHiddenNamespacesState } from 'state/preferences/showHiddenNamespacesAtom'; | ||
import { render, fireEvent, waitFor } from 'testing/reactTestingUtils'; | ||
import { render } from 'testing/reactTestingUtils'; | ||
import NamespaceSettings from '../NamespaceSettings'; | ||
|
||
describe('NamespaceSettings', () => { | ||
it('Sends custom message on toggle', async () => { | ||
const { getByLabelText } = render(<NamespaceSettings />, { | ||
it('Check ui5 switch checked', () => { | ||
const { container } = render(<NamespaceSettings />, { | ||
initializeState: snapshot => | ||
snapshot.set(showHiddenNamespacesState, true), | ||
}); | ||
|
||
const toggle = getByLabelText('settings.clusters.showHiddenNamespaces'); | ||
const toggleSwitch = toggle.shadowRoot?.querySelector('[role="switch"]'); | ||
const toggle = container.querySelector('ui5-switch'); | ||
|
||
expect(toggleSwitch).toHaveAttribute('aria-checked', 'true'); | ||
|
||
if (toggleSwitch) fireEvent.click(toggleSwitch); | ||
|
||
await waitFor(() => { | ||
expect(toggleSwitch).toHaveAttribute('aria-checked', 'false'); | ||
}); | ||
expect(toggle).toHaveAttribute('checked', 'true'); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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