Sidebar logo update (#814)
* Testing logo ux * Updated logo on sidebar * removed unused vars * adjusted types on icon components
This commit is contained in:
@@ -49,7 +49,7 @@ describe('AuditView', () => {
|
||||
apis = ApiRegistry.from([
|
||||
[lighthouseApiRef, new LighthouseRestApi('https://lighthouse')],
|
||||
]);
|
||||
id = websiteResponse.audits.find((a) => a.status === 'COMPLETED')
|
||||
id = websiteResponse.audits.find(a => a.status === 'COMPLETED')
|
||||
?.id as string;
|
||||
useParams.mockReturnValue({ id });
|
||||
});
|
||||
@@ -101,7 +101,7 @@ describe('AuditView', () => {
|
||||
|
||||
await rendered.findByTestId('audit-sidebar');
|
||||
|
||||
websiteResponse.audits.forEach((a) => {
|
||||
websiteResponse.audits.forEach(a => {
|
||||
expect(
|
||||
rendered.queryByText(formatTime(a.timeCreated)),
|
||||
).toBeInTheDocument();
|
||||
@@ -119,14 +119,14 @@ describe('AuditView', () => {
|
||||
|
||||
await rendered.findByTestId('audit-sidebar');
|
||||
|
||||
const audit = websiteResponse.audits.find((a) => a.id === id) as Audit;
|
||||
const audit = websiteResponse.audits.find(a => a.id === id) as Audit;
|
||||
const auditElement = rendered.getByText(formatTime(audit.timeCreated));
|
||||
expect(auditElement.parentElement?.parentElement?.className).toContain(
|
||||
'selected',
|
||||
);
|
||||
|
||||
const notSelectedAudit = websiteResponse.audits.find(
|
||||
(a) => a.id !== id,
|
||||
a => a.id !== id,
|
||||
) as Audit;
|
||||
const notSelectedAuditElement = rendered.getByText(
|
||||
formatTime(notSelectedAudit.timeCreated),
|
||||
@@ -147,7 +147,7 @@ describe('AuditView', () => {
|
||||
|
||||
await rendered.findByTestId('audit-sidebar');
|
||||
|
||||
websiteResponse.audits.forEach((a) => {
|
||||
websiteResponse.audits.forEach(a => {
|
||||
expect(
|
||||
rendered.getByText(formatTime(a.timeCreated)).parentElement
|
||||
?.parentElement,
|
||||
@@ -186,7 +186,7 @@ describe('AuditView', () => {
|
||||
|
||||
describe.skip('when a loading audit is accessed', () => {
|
||||
it('shows a loading view', async () => {
|
||||
id = websiteResponse.audits.find((a) => a.status === 'RUNNING')
|
||||
id = websiteResponse.audits.find(a => a.status === 'RUNNING')
|
||||
?.id as string;
|
||||
useParams.mockReturnValueOnce({ id });
|
||||
|
||||
@@ -206,7 +206,7 @@ describe('AuditView', () => {
|
||||
|
||||
describe.skip('when a failed audit is accessed', () => {
|
||||
it('shows an error message', async () => {
|
||||
id = websiteResponse.audits.find((a) => a.status === 'FAILED')
|
||||
id = websiteResponse.audits.find(a => a.status === 'FAILED')
|
||||
?.id as string;
|
||||
useParams.mockReturnValueOnce({ id });
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ describe('CreateAudit', () => {
|
||||
fireEvent.click(rendered.getByText(/Create Audit/));
|
||||
|
||||
await wait(() => expect(rendered.getByLabelText(/URL/)).toBeEnabled());
|
||||
await new Promise((r) => setTimeout(r, 0));
|
||||
await new Promise(r => setTimeout(r, 0));
|
||||
|
||||
expect(errorApi.post).toHaveBeenCalledWith(expect.any(Error));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user