✅(app-desk) improve sorting teams test e2e
This tests was becoming very flaky because we create teams in parallel with the other tests. We use another approch, we checks the aria are changing according to the sort, we check as well the api request and that the response is ok.
This commit is contained in:
@@ -13,6 +13,8 @@ export const PanelActions = () => {
|
||||
const { changeOrdering, ordering } = useTeamStore();
|
||||
const { colorsTokens } = useCunninghamTheme();
|
||||
|
||||
const isSortAsc = ordering === TeamsOrdering.BY_CREATED_ON;
|
||||
|
||||
return (
|
||||
<Box
|
||||
$direction="row"
|
||||
@@ -28,14 +30,14 @@ export const PanelActions = () => {
|
||||
`}
|
||||
>
|
||||
<BoxButton
|
||||
aria-label={t('Sort the teams')}
|
||||
aria-label={
|
||||
isSortAsc
|
||||
? t('Sort the teams by creation date descendent')
|
||||
: t('Sort the teams by creation date ascendent')
|
||||
}
|
||||
onClick={changeOrdering}
|
||||
$radius="100%"
|
||||
$background={
|
||||
ordering === TeamsOrdering.BY_CREATED_ON
|
||||
? colorsTokens()['primary-200']
|
||||
: 'transparent'
|
||||
}
|
||||
$background={isSortAsc ? colorsTokens()['primary-200'] : 'transparent'}
|
||||
$color={colorsTokens()['primary-600']}
|
||||
>
|
||||
<IconSort width={30} height={30} aria-label={t('Sort teams icon')} />
|
||||
|
||||
Reference in New Issue
Block a user