File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,17 @@ describe('User List', () => {
9292 } ) ;
9393
9494 cy . get ( '[data-testid=column-header-created]' ) . click ( ) ;
95- cy . wait ( '@userListFetch' ) . then ( ( interception ) => {
96- const url = interception . request . url ;
97- expect ( url ) . to . include ( 'sort=created' ) ;
98- expect ( url ) . to . include ( 'sortDirection=desc' ) ;
99- } ) ;
10095
101- cy . get ( '[data-testid=user-list-row]' ) . should ( 'have.length.greaterThan' , 0 ) ;
96+ cy . window ( ) . then ( ( win ) => {
97+ const rawSettings = win . localStorage . getItem ( 'ul-filter-settings' ) ;
98+ expect (
99+ rawSettings ,
100+ 'ul-filter-settings should be stored in localStorage'
101+ ) . to . be . a ( 'string' ) ;
102+
103+ const settings = JSON . parse ( rawSettings as string ) ;
104+ expect ( settings . currentSort ) . to . equal ( 'created' ) ;
105+ expect ( settings . sortDirection ) . to . equal ( 'asc' ) ;
106+ } ) ;
102107 } ) ;
103108} ) ;
You can’t perform that action at this time.
0 commit comments