|
|
@@ -186,7 +186,8 @@ it('should show SCM information', async () => { |
|
|
|
).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' |
|
|
|
}) |
|
|
|
); |
|
|
|
|
|
|
@@ -210,48 +211,49 @@ it('should show SCM information', async () => { |
|
|
|
// 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 |