securityPagePath,
);
- await waitFor(() => {
- selectEvent.openMenu(screen.getByRole('combobox', { name: 'users.tokens.type' }));
- });
+ expect(await screen.findByText('users.tokens.generate')).toBeInTheDocument();
+
+ await selectEvent.openMenu(screen.getByRole('combobox', { name: 'users.tokens.type' }));
expect(screen.queryByText(`users.tokens.${TokenType.Project}`)).not.toBeInTheDocument();
});
mockLoggedInUser({ permissions: { global: [Permissions.Scan] } }),
securityPagePath,
);
-
- await waitFor(async () => {
- await selectEvent.select(screen.getByRole('combobox', { name: 'users.tokens.type' }), [
- `users.tokens.${TokenType.Project}`,
- ]);
- });
+ expect(await screen.findByText('users.tokens.generate')).toBeInTheDocument();
+ await selectEvent.select(screen.getByRole('combobox', { name: 'users.tokens.type' }), [
+ `users.tokens.${TokenType.Project}`,
+ ]);
expect(screen.getByText('Project Name 1')).toBeInTheDocument();
});
status: TaskStatuses.InProgress,
startedAt: '2023-06-08T12:00:00Z',
});
- act(() => {
- jest.runOnlyPendingTimers();
- });
+ jest.runOnlyPendingTimers();
expect(await ui.inProgressExport.find()).toBeInTheDocument();
expect(ui.exportBtn.query()).not.toBeInTheDocument();
status: TaskStatuses.InProgress,
startedAt: '2023-06-08T12:00:00Z',
});
- act(() => {
- jest.runOnlyPendingTimers();
- });
+ jest.runOnlyPendingTimers();
expect(await ui.inProgressImport.find()).toBeInTheDocument();
expect(ui.importBtn.query()).not.toBeInTheDocument();