mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix tests.
GitOrigin-RevId: 18e4d9e58922aae00e603269c907499da949d27f
This commit is contained in:
parent
a75c191d5b
commit
4f847b35d3
1 changed files with 7 additions and 13 deletions
|
@ -20,7 +20,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', { name: 'View logs' })
|
screen.getByText('View logs')
|
||||||
})
|
})
|
||||||
it('should render a view PDF button when viewing logs', function() {
|
it('should render a view PDF button when viewing logs', function() {
|
||||||
const showLogs = true
|
const showLogs = true
|
||||||
|
@ -31,7 +31,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', { name: 'View PDF' })
|
screen.getByText('View PDF')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
describe('compile status indicator', function() {
|
describe('compile status indicator', function() {
|
||||||
|
@ -50,7 +50,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', { name: 'View logs' })
|
screen.getByText('View logs')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render an error status message when there are errors', function() {
|
it('should render an error status message when there are errors', function() {
|
||||||
|
@ -66,9 +66,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', {
|
screen.getByText(`Your project has errors (${logsState.nErrors})`)
|
||||||
name: `Your project has errors (${logsState.nErrors})`
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render an error status message when there are both errors and warnings', function() {
|
it('should render an error status message when there are both errors and warnings', function() {
|
||||||
|
@ -84,9 +82,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', {
|
screen.getByText(`Your project has errors (${logsState.nErrors})`)
|
||||||
name: `Your project has errors (${logsState.nErrors})`
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render a warning status message when there are warnings but no errors', function() {
|
it('should render a warning status message when there are warnings but no errors', function() {
|
||||||
|
@ -102,9 +98,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', {
|
screen.getByText(`View warnings (${logsState.nWarnings})`)
|
||||||
name: `View warnings (${logsState.nWarnings})`
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should render 9+ errors when there are more than nine errors', function() {
|
it('should render 9+ errors when there are more than nine errors', function() {
|
||||||
|
@ -120,7 +114,7 @@ describe('<PreviewLogsToggleButton />', function() {
|
||||||
onToggle={onToggleLogs}
|
onToggle={onToggleLogs}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
screen.getByRole('button', { name: `Your project has errors (9+)` })
|
screen.getByText('Your project has errors (9+)')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue