This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(viz): Avoid displaying the MiniCatalog if there are no steps or b…
…ranches available At this moment, trying to append an additional step after a step that has a custom extension, causes to display the MiniCatalog with both tabs disabled and showing the Add branch button enabled. This is problematic because for those steps, a special configuration is required and its provided via its extension, hence disabling the branch tab from the MiniCatalog. This commit disables the plus icon to avoid displaying a non interactive popup to the user and providing a tooltip instead explaining what to do in order to configure the step. This commit also target small improvements in related tests, like changing the api signature of one of the services to only receive a step instead of a whole node. fixes #1473
- Loading branch information
Showing
10 changed files
with
105 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,23 @@ | ||
import { act, render, screen, waitFor } from '@testing-library/react'; | ||
import { AlertProvider } from '../layout'; | ||
import { MiniCatalog } from './MiniCatalog'; | ||
import { screen } from '@testing-library/dom'; | ||
import { render } from '@testing-library/react'; | ||
|
||
describe('MiniCatalog.tsx', () => { | ||
test('component renders correctly', () => { | ||
render( | ||
<AlertProvider> | ||
<MiniCatalog /> | ||
</AlertProvider> | ||
); | ||
test('component renders correctly', async () => { | ||
act(() => { | ||
render( | ||
<AlertProvider> | ||
<MiniCatalog /> | ||
</AlertProvider> | ||
); | ||
}); | ||
|
||
const element = screen.getByTestId('miniCatalog'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
test('component renders correctly', () => { | ||
render( | ||
<AlertProvider> | ||
<MiniCatalog /> | ||
</AlertProvider> | ||
); | ||
await waitFor(() => { | ||
const element = screen.getByTestId('miniCatalog'); | ||
expect(element).toBeInTheDocument(); | ||
|
||
const element = screen.getByText('start'); | ||
expect(element).toBeInTheDocument(); | ||
const startButton = screen.getByText('start'); | ||
expect(startButton).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 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
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