it('should always be able to render the open issue', async () => {
renderProjectIssuesApp('project/issues?issueStatuses=CONFIRMED&open=issue2&id=myproject&why=1');
- expect(await ui.conciseIssueTotal.find()).toHaveTextContent('4');
+ expect(await ui.conciseIssueTotal.find(undefined, { timeout: 10_000 })).toHaveTextContent('4');
expect(ui.conciseIssueItem4.get()).toBeInTheDocument();
expect(ui.conciseIssueItem2.get()).toBeInTheDocument();
});
mockCurrentUser(),
[Feature.BranchSupport, Feature.FixSuggestions],
);
- expect(await ui.issueCodeTab.find()).toBeInTheDocument();
+ expect(await ui.issueCodeTab.find(undefined, { timeout: 10_000 })).toBeInTheDocument();
expect(ui.getFixSuggestion.query()).not.toBeInTheDocument();
expect(ui.issueCodeFixTab.query()).not.toBeInTheDocument();
});
mockCurrentUser(),
[Feature.BranchSupport, Feature.FixSuggestions],
);
- expect(await ui.issueCodeTab.find()).toBeInTheDocument();
+ expect(await ui.issueCodeTab.find(undefined, { timeout: 10_000 })).toBeInTheDocument();
expect(ui.getFixSuggestion.query()).not.toBeInTheDocument();
expect(ui.issueCodeFixTab.query()).not.toBeInTheDocument();
});
[Feature.BranchSupport, Feature.FixSuggestions],
);
- await user.click(await ui.issueCodeFixTab.find());
+ await user.click(await ui.issueCodeFixTab.find(undefined, { timeout: 10_000 }));
await user.click(ui.getAFixSuggestion.get());
expect(await ui.noFixAvailable.find()).toBeInTheDocument();
renderProjectIssuesApp('project/issues?issues=issue2&open=issue2&id=myproject&why=1');
expect(
- await screen.findByRole('tab', {
- name: `coding_rules.description_section.title.root_cause`,
- }),
+ await screen.findByRole(
+ 'tab',
+ { name: `coding_rules.description_section.title.root_cause` },
+ { timeout: 10_000 },
+ ),
).toHaveAttribute('aria-current', 'true');
expect(byText(/Introduction to this rule/).get()).toBeInTheDocument();
const user = userEvent.setup();
renderProjectIssuesApp('project/issues?id=myproject');
- await user.click(await ui.issueItemAction2.find());
+ await user.click(await ui.issueItemAction2.find(undefined, { timeout: 10_000 }));
expect(await screen.findByLabelText('list_of_issues')).toBeInTheDocument();
const user = userEvent.setup();
renderProjectIssuesApp('project/issues?issues=issue2&open=issue2&id=myproject');
await user.click(
- await screen.findByRole('tab', { name: `coding_rules.description_section.title.more_info` }),
+ await screen.findByRole(
+ 'tab',
+ { name: `coding_rules.description_section.title.more_info` },
+ { timeout: 10_000 },
+ ),
);
expect(screen.getByRole('heading', { name: 'Defense-In-Depth', level: 3 })).toBeInTheDocument();
});
renderProjectIssuesApp('project/issues?issues=issue2&open=issue2&id=myproject');
await user.click(
- await screen.findByRole('tab', { name: 'coding_rules.description_section.title.root_cause' }),
+ await screen.findByRole(
+ 'tab',
+ { name: 'coding_rules.description_section.title.root_cause' },
+ { timeout: 10_000 },
+ ),
);
expect(await screen.findByRole('heading', { name: 'CVE-2021-12345' })).toBeInTheDocument();
renderProjectIssuesApp('project/issues?issues=issue2&open=issue2&id=myproject');
await user.click(
- await screen.findByRole('tab', { name: 'coding_rules.description_section.title.root_cause' }),
+ await screen.findByRole(
+ 'tab',
+ { name: 'coding_rules.description_section.title.root_cause' },
+ { timeout: 10_000 },
+ ),
);
expect(await screen.findByRole('heading', { name: 'CVE-2021-12345' })).toBeInTheDocument();
renderIssueApp();
// Get a specific issue list item
- const listItem = within(await screen.findByLabelText('Fix that'));
+ const listItem = within(
+ await screen.findByLabelText('Fix that', undefined, { timeout: 10_000 }),
+ );
expect(listItem.getByText('issue.issue_status.OPEN')).toBeInTheDocument();
renderIssueApp();
// Get a specific issue list item
- const listItem = within(await screen.findByLabelText('Fix that'));
+ const listItem = within(
+ await screen.findByLabelText('Fix that', undefined, { timeout: 10_000 }),
+ );
// Assign issue to a different user
await user.click(listItem.getByLabelText('issue.assign.unassigned_click_to_assign'));
await user.click(screen.getByLabelText('search.search_for_users'));
renderIssueApp();
// Get a specific issue list item
- const listItem = within(await screen.findByLabelText('Fix that'));
+ const listItem = within(
+ await screen.findByLabelText('Fix that', undefined, { timeout: 10_000 }),
+ );
// Change tags
expect(listItem.getByText('issue.no_tag')).toBeInTheDocument();
const user = userEvent.setup();
renderIssueApp();
- await user.click(await ui.issueItem4.find());
+ await user.click(await ui.issueItem4.find(undefined, { timeout: 10_000 }));
expect(
screen.queryByRole('button', {
renderIssueApp();
// Select an issue with an advanced rule
- await user.click(await ui.issueItemAction5.find());
+ await user.click(await ui.issueItemAction5.find(undefined, { timeout: 10_000 }));
// Open status popup on key press 'f'
await user.keyboard('f');
renderIssueApp();
// Select an issue with an advanced rule
- await user.click(await ui.issueItem5.find());
+ await user.click(await ui.issueItem5.find(undefined, { timeout: 10_000 }));
// open status popup on key press 'f'
await user.keyboard('f');
const user = userEvent.setup();
renderIssueApp();
- await user.click(await ui.issueItemAction4.find());
+ await user.click(await ui.issueItemAction4.find(undefined, { timeout: 10_000 }));
expect(screen.getByRole('button', { name: 'location 1' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'location 2' })).toBeInTheDocument();
renderIssueApp();
// Select an issue with quick fix available
- await user.click(await ui.issueItemAction7.find());
+ await user.click(await ui.issueItemAction7.find(undefined, { timeout: 10_000 }));
await expect(screen.getByText('issue.quick_fix')).toHaveATooltipWithContent(
'issue.quick_fix_available_with_sonarlint',