mirror of
https://github.com/seerr-team/seerr.git
synced 2026-04-17 13:58:24 -04:00
test(user-list): deflake sorting assertions (#2766)
This commit is contained in:
@@ -92,12 +92,17 @@ describe('User List', () => {
|
||||
});
|
||||
|
||||
cy.get('[data-testid=column-header-created]').click();
|
||||
cy.wait('@userListFetch').then((interception) => {
|
||||
const url = interception.request.url;
|
||||
expect(url).to.include('sort=created');
|
||||
expect(url).to.include('sortDirection=desc');
|
||||
});
|
||||
|
||||
cy.get('[data-testid=user-list-row]').should('have.length.greaterThan', 0);
|
||||
cy.window().then((win) => {
|
||||
const rawSettings = win.localStorage.getItem('ul-filter-settings');
|
||||
expect(
|
||||
rawSettings,
|
||||
'ul-filter-settings should be stored in localStorage'
|
||||
).to.be.a('string');
|
||||
|
||||
const settings = JSON.parse(rawSettings as string);
|
||||
expect(settings.currentSort).to.equal('created');
|
||||
expect(settings.sortDirection).to.equal('asc');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user