address review comments
Signed-off-by: Kashish Mittal <kmittal@redhat.com>
This commit is contained in:
@@ -161,16 +161,6 @@ describe('OngoingTask', () => {
|
||||
await expect(rendered.findByText('Hide Logs')).resolves.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('should render not found error page when user does not have permission to read the task', async () => {
|
||||
const permissionApi = mockApis.permission({
|
||||
authorize: AuthorizeResult.DENY,
|
||||
});
|
||||
|
||||
await expect(render(permissionApi)).rejects.toThrow(
|
||||
'Reached NotFound Page',
|
||||
);
|
||||
});
|
||||
|
||||
it('should have cancel button be disabled when user has read permission but lacks cancel permission', async () => {
|
||||
const permissionApi = mockApis.permission({
|
||||
authorize: request => {
|
||||
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
TaskSteps,
|
||||
} from '@backstage/plugin-scaffolder-react/alpha';
|
||||
import { useAsync } from '@react-hookz/web';
|
||||
import { usePermission} from '@backstage/plugin-permission-react';
|
||||
import { usePermission } from '@backstage/plugin-permission-react';
|
||||
import {
|
||||
taskCancelPermission,
|
||||
taskCreatePermission,
|
||||
|
||||
Reference in New Issue
Block a user