test(user-list): deflake sorting assertions (#2766)

This commit is contained in:
0xsysr3ll
2026-03-27 10:41:32 +01:00
committed by GitHub
parent 5373da4c55
commit 20c2ed866f

View File

@@ -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');
});
});
});