).toBeInTheDocument();
await user.click(
firstRowScreen.getByRole('button', {
- name: 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info'
+ name:
+ 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info.1'
})
);
// SCM with no date
row = await screen.findByRole('row', { name: /\* mailto:info AT sonarsource DOT com$/ });
expect(row).toBeInTheDocument();
- const thirdRowScreen = within(row);
+ const fourthRowScreen = within(row);
await user.click(
- thirdRowScreen.getByRole('button', {
- name: 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info'
+ fourthRowScreen.getByRole('button', {
+ name:
+ 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info.4'
})
);
expect(
- await thirdRowScreen.findByRole('heading', { level: 4, name: 'author' })
+ await fourthRowScreen.findByRole('heading', { level: 4, name: 'author' })
).toBeInTheDocument();
expect(
- thirdRowScreen.queryByRole('heading', {
+ fourthRowScreen.queryByRole('heading', {
level: 4,
name: 'source_viewer.tooltip.scm.commited_on'
})
).not.toBeInTheDocument();
expect(
- thirdRowScreen.getByRole('heading', { level: 4, name: 'source_viewer.tooltip.scm.revision' })
+ fourthRowScreen.getByRole('heading', { level: 4, name: 'source_viewer.tooltip.scm.revision' })
).toBeInTheDocument();
// SCM with no date no author
row = await screen.findByRole('row', { name: /\* 5$/ });
expect(row).toBeInTheDocument();
- const fourthRowScreen = within(row);
- expect(fourthRowScreen.getByText('…')).toBeInTheDocument();
+ const fithRowScreen = within(row);
+ expect(fithRowScreen.getByText('…')).toBeInTheDocument();
await user.click(
- fourthRowScreen.getByRole('button', {
- name: 'source_viewer.click_for_scm_info'
+ fithRowScreen.getByRole('button', {
+ name: 'source_viewer.click_for_scm_info.5'
})
);
expect(
- fourthRowScreen.queryByRole('heading', { level: 4, name: 'author' })
+ fithRowScreen.queryByRole('heading', { level: 4, name: 'author' })
).not.toBeInTheDocument();
expect(
- fourthRowScreen.queryByRole('heading', {
+ fithRowScreen.queryByRole('heading', {
level: 4,
name: 'source_viewer.tooltip.scm.commited_on'
})
).not.toBeInTheDocument();
expect(
- fourthRowScreen.getByRole('heading', { level: 4, name: 'source_viewer.tooltip.scm.revision' })
+ fithRowScreen.getByRole('heading', { level: 4, name: 'source_viewer.tooltip.scm.revision' })
).toBeInTheDocument();
// No SCM Popup
import * as React from 'react';
import Dropdown from '../../../components/controls/Dropdown';
import { PopupPlacement } from '../../../components/ui/popups';
-import { translate, translateWithParameters } from '../../../helpers/l10n';
+import { translateWithParameters } from '../../../helpers/l10n';
import { SourceLine } from '../../../types/types';
import { ButtonPlain } from '../../controls/buttons';
import SCMPopup from './SCMPopup';
);
if (hasPopup) {
- let ariaLabel = translate('source_viewer.click_for_scm_info');
+ let ariaLabel = translateWithParameters('source_viewer.click_for_scm_info', line.line);
if (line.scmAuthor) {
ariaLabel = `${translateWithParameters(
'source_viewer.author_X',