Browse Source

SONAR-21017 Tests: 'exact' has been removed from options for 'byRole' queries

tags/10.4.0.87286
David Cho-Lerat 7 months ago
parent
commit
54ea811223

+ 2
- 2
server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts View File

@@ -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'),

+ 1
- 3
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx View File

@@ -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',

+ 1
- 1
server/sonar-web/src/main/js/apps/issues/test-utils.tsx View File

@@ -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' }),

+ 1
- 3
server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx View File

@@ -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();
});


Loading…
Cancel
Save