@@ -41,55 +41,17 @@ describe("Smoke: Core Application", () => {
4141
4242 it ( "opens Time Tracking workspace from desktop" , ( ) => {
4343 cy . loginByApiSession ( ) ;
44- cy . visit ( "/app" ) ;
45-
46- const workspacePathPattern =
47- / ^ \/ ( d e s k \/ t i m e - t r a c k i n g | a p p \/ t i m e - t r a c k i n g | a p p \/ w o r k s p a c e \/ t i m e - t r a c k i n g ) ( \/ .* ) ? $ / ;
48-
49- cy . location ( "pathname" , { timeout : 15000 } ) . then ( ( pathname ) => {
50- if ( ! workspacePathPattern . test ( pathname ) ) {
51- cy . get (
52- '#page-desktop img[alt="Time Tracking"], #page-desktop [data-original-title="Time Tracking"], #page-desktop [data-id="Time Tracking"]' ,
53- { timeout : 15000 }
54- )
55- . first ( )
56- . should ( "be.visible" )
57- . scrollIntoView ( )
58- . click ( { force : true } ) ;
59- }
60- } ) ;
61-
62- cy . location ( "pathname" , { timeout : 15000 } ) . then ( ( pathname ) => {
63- if ( ! workspacePathPattern . test ( pathname ) ) {
64- cy . get ( '[data-id="Time Tracking"] > .icon-caption > .icon-title' , {
65- timeout : 15000 ,
66- } )
67- . first ( )
68- . should ( "be.visible" )
69- . click ( { force : true } ) ;
70- }
71- } ) ;
72- cy . location ( "pathname" , { timeout : 15000 } ) . should ( ( pathname ) => {
73- expect ( pathname ) . to . match ( workspacePathPattern ) ;
74- } ) ;
75- cy . contains ( "body" , "Time Tracking" , { timeout : 15000 } ) ;
76-
77- cy . contains ( 'div[item-name="Weekly Booking"] span.sidebar-item-label' , "Weekly Booking" , {
78- timeout : 15000 ,
79- } ) . should ( "be.visible" ) ;
44+ cy . visit ( "/desk" ) ;
45+ cy . get ( '#page-desktop img[alt="Time Tracking"]' ) . click ( ) ;
8046
81- cy . contains ( 'div[item-name="Time Booking"] span.sidebar-item-label' , "Time Booking" , {
82- timeout : 15000 ,
83- } ) . should ( "be.visible" ) ;
47+ cy . url ( ) . should ( "include" , "/desk/time-tracking" ) ;
8448
85- cy . contains (
86- 'div[item-name="My Project Access"] span.sidebar-item-label' ,
87- "My Project Access" ,
88- { timeout : 15000 }
89- ) . should ( "be.visible" ) ;
90-
91- cy . get ( '[item-name="Time Tracking Settings"] > .standard-sidebar-item' ) . should (
92- "be.visible"
49+ cy . get (
50+ '#editorjs a[href="/desk/time-tracking-settings/Time Tracking Settings"] span.link-text'
51+ ) . click ( ) ;
52+ cy . get ( "#page-Time\\ Tracking\\ Settings li.disabled" ) . should (
53+ "have.text" ,
54+ "Time Tracking Settings"
9355 ) ;
9456 } ) ;
9557} ) ;
0 commit comments