File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export const getEditorShadow = ( ) => cy . get ( "editor-wc" ) . shadow ( ) ;
22
3+ export const getSidebarPanel = ( ) =>
4+ getEditorShadow ( ) . findByTestId ( "sidebar__panel" ) ;
5+
36export const openSaveAndDownloadPanel = ( ) => {
47 getEditorShadow ( ) . findByRole ( "button" , { name : "Download project" } ) . click ( ) ;
5- getEditorShadow ( )
8+
9+ getSidebarPanel ( )
610 . findByRole ( "heading" , { name : "Save & download" } )
711 . should ( "be.visible" ) ;
812
913 return {
1014 uploadProject : ( fixturePath ) => {
11- getEditorShadow ( )
12- . find ( ".download-panel__download-section" )
13- . findByRole ( "button" , { name : "Upload project" } )
14- . should ( "be.visible" ) ;
15- getEditorShadow ( )
16- . findByTestId ( "upload-file-input" )
17- . selectFile ( fixturePath , { force : true } ) ;
15+ getSidebarPanel ( ) . within ( ( ) => {
16+ cy . findByRole ( "button" , { name : "Upload project" } ) . should (
17+ "be.visible" ,
18+ ) ;
19+ cy . findByTestId ( "upload-file-input" ) . selectFile ( fixturePath , {
20+ force : true ,
21+ } ) ;
22+ } ) ;
1823 } ,
1924 downloadProject : ( ) => {
20- getEditorShadow ( )
21- . find ( ".download-panel__download-section" )
25+ getSidebarPanel ( )
2226 . findByRole ( "button" , { name : "Download project" } )
2327 . click ( ) ;
2428 } ,
You can’t perform that action at this time.
0 commit comments