Short variant for filter texts (#943)

* - added a short variant for filter labels in the filter bar

* - fixed tests
- moved colon to shortoperand

* - fixed formatting
This commit is contained in:
brendanlaschke
2023-07-27 17:45:15 +02:00
committed by GitHub
parent 03b619ebb5
commit e3d5f0b26f
5 changed files with 41 additions and 11 deletions

View File

@ -54,8 +54,10 @@ export const Email: Story = {
expect(await canvas.findByText('Alexandre Prot')).toBeInTheDocument();
await expect(canvas.queryAllByText('John Doe')).toStrictEqual([]);
expect(await canvas.findByText('Email:')).toBeInTheDocument();
expect(await canvas.findByText('Contains al')).toBeInTheDocument();
const emailFilter = canvas.getAllByText('Email').find((item) => {
return item.parentElement?.textContent?.includes('Email: al');
});
expect(emailFilter).toBeInTheDocument();
},
};
@ -99,7 +101,9 @@ export const CompanyName: Story = {
// expect(await canvas.findByText('Alexandre Prot')).toBeInTheDocument();
// await expect(canvas.queryAllByText('John Doe')).toStrictEqual([]);
expect(await canvas.findByText('Company:')).toBeInTheDocument();
expect(await canvas.findByText('Is Qonto')).toBeInTheDocument();
const companyFilter = canvas.getAllByText('Company').find((item) => {
return item.parentElement?.textContent?.includes('Company: Qonto');
});
expect(companyFilter).toBeInTheDocument();
},
};