-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tomasz Wylężek <tomwylezek@gmail.com>
- Loading branch information
1 parent
df1a32d
commit 0afba53
Showing
14 changed files
with
531 additions
and
451 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import renderWithVuex from '@/testUtils/renderWithVuex' | ||
import userEvent from '@testing-library/user-event' | ||
import { screen } from '@testing-library/vue' | ||
import DeploymentTypes from './DeploymentTypes.vue' | ||
|
||
describe('DeploymentTypes.vue', () => { | ||
const customStore = { modules: { config: { state: { tagline: 'Kuma' } } } } | ||
|
||
it('renders snapshot', async () => { | ||
const { container } = renderWithVuex(DeploymentTypes, { | ||
store: customStore, | ||
}) | ||
|
||
expect(container).toMatchSnapshot() | ||
}) | ||
|
||
it('changes selected graph', async () => { | ||
renderWithVuex(DeploymentTypes, { store: customStore }) | ||
|
||
await userEvent.click(screen.getByText(/Multi-Zone deployment/)) | ||
|
||
expect(screen.getByText('Multizone 1')).toBeInTheDocument() | ||
}) | ||
|
||
it('hoverable section disappear on hover', async () => { | ||
jest.useFakeTimers() | ||
|
||
renderWithVuex(DeploymentTypes, { store: customStore }) | ||
|
||
await userEvent.hover( | ||
<HTMLElement>screen.queryByTestId('hoverable-overlay'), | ||
) | ||
|
||
jest.advanceTimersByTime(1000) | ||
|
||
expect(screen.queryByTestId('hoverable-overlay')).not.toBeInTheDocument() | ||
}) | ||
}) |
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 was deleted.
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
Oops, something went wrong.