@@ -388,8 +388,8 @@ it('should correctly show new VS overall measures for Portfolios', async () => { | |||
function getPageObject(user: UserEvent) { | |||
const ui = { | |||
componentName: (name: string) => byText(name), | |||
childComponent: (name: string | RegExp) => byRole('cell', { name, exact: false }), | |||
searchResult: (name: string | RegExp) => byRole('link', { name, exact: false }), | |||
childComponent: (name: string | RegExp) => byRole('cell', { name }), | |||
searchResult: (name: string | RegExp) => byRole('link', { name }), | |||
componentIsEmptyTxt: (qualifier: ComponentQualifier) => | |||
byText(`code_viewer.no_source_code_displayed_due_to_empty_analysis.${qualifier}`), | |||
searchInput: byRole('searchbox'), |
@@ -203,9 +203,7 @@ describe('issues app', () => { | |||
expect(screen.getByRole('link', { name: 'simpleRuleId' })).toBeInTheDocument(); | |||
// The "Where is the issue" tab should be selected by default. Check its content | |||
expect(screen.getAllByRole('button', { name: 'Issue on file', exact: false })).toHaveLength( | |||
2, | |||
); // there will be 2 buttons one in concise issue and other in code viewer | |||
expect(screen.getAllByRole('button', { name: 'Issue on file' })).toHaveLength(2); // there will be 2 buttons one in concise issue and other in code viewer | |||
expect( | |||
screen.getByRole('row', { | |||
name: '2 * SonarQube', |
@@ -64,7 +64,7 @@ export const ui = { | |||
issueItem7: byRole('region', { name: 'Issue with tags' }), | |||
issueItem8: byRole('region', { name: 'Issue on page 2' }), | |||
issueItem9: byRole('region', { name: 'Issue inside folderA' }), | |||
projectIssueItem6: byRole('button', { name: 'Second issue', exact: false }), | |||
projectIssueItem6: byRole('button', { name: 'Second issue' }), | |||
conciseIssueTotal: byTestId('page-counter-total'), | |||
conciseIssueItem2: byTestId('issues-nav-bar').byRole('button', { name: 'Fix that' }), |
@@ -125,9 +125,7 @@ it('should not show any OAuth providers if none are configured', async () => { | |||
expect(heading).toBeInTheDocument(); | |||
// No OAuth providers, login form display by default. | |||
expect( | |||
screen.queryByRole('link', { name: 'login.login_with_x', exact: false }), | |||
).not.toBeInTheDocument(); | |||
expect(screen.queryByRole('link', { name: 'login.login_with_x' })).not.toBeInTheDocument(); | |||
expect(screen.getByLabelText('login')).toBeInTheDocument(); | |||
}); | |||