some more progress toward ubiquitous eslint-plugin-testing-library
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -76,7 +76,7 @@ describe('AuditListTable', () => {
|
||||
if (!website)
|
||||
throw new Error('https://anchor.fm must be present in fixture');
|
||||
expect(
|
||||
rendered.queryByText(formatTime(website.lastAudit.timeCreated)),
|
||||
rendered.getByText(formatTime(website.lastAudit.timeCreated)),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('AuditView', () => {
|
||||
|
||||
websiteResponse.audits.forEach(a => {
|
||||
expect(
|
||||
rendered.queryByText(formatTime(a.timeCreated)),
|
||||
rendered.getByText(formatTime(a.timeCreated)),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -199,7 +199,7 @@ describe('AuditView', () => {
|
||||
|
||||
await rendered.findByTestId('audit-sidebar');
|
||||
|
||||
expect(rendered.queryByTestId('progress')).toBeInTheDocument();
|
||||
expect(rendered.getByTestId('progress')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -219,7 +219,7 @@ describe('AuditView', () => {
|
||||
|
||||
await rendered.findByTestId('audit-sidebar');
|
||||
|
||||
expect(rendered.queryByText(/This audit failed/)).toBeInTheDocument();
|
||||
expect(rendered.getByText(/This audit failed/)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('LighthouseIntro', () => {
|
||||
it('renders successfully', () => {
|
||||
const rendered = render(wrapInTestApp(<LighthouseIntro />));
|
||||
expect(
|
||||
rendered.queryByText('Welcome to Lighthouse in Backstage!'),
|
||||
rendered.getByText('Welcome to Lighthouse in Backstage!'),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('LighthouseIntro', () => {
|
||||
|
||||
it('selects the first text element', () => {
|
||||
const rendered = render(wrapInTestApp(<LighthouseIntro />));
|
||||
expect(rendered.queryByText(firstTabRe)).toBeInTheDocument();
|
||||
expect(rendered.getByText(firstTabRe)).toBeInTheDocument();
|
||||
expect(rendered.queryByText(secondTabRe)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('LighthouseIntro', () => {
|
||||
const rendered = render(wrapInTestApp(<LighthouseIntro />));
|
||||
fireEvent.click(rendered.getByText('Setup'));
|
||||
expect(rendered.queryByText(firstTabRe)).not.toBeInTheDocument();
|
||||
expect(rendered.queryByText(secondTabRe)).toBeInTheDocument();
|
||||
expect(rendered.getByText(secondTabRe)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user