@@ -14,7 +14,9 @@ describe("MusicBlocks Application", () => {
1414 describe ( "Loading and Initial Render" , ( ) => {
1515 it ( "should display the loading animation and then the main content" , ( ) => {
1616 cy . get ( "#loading-image-container" ) . should ( "be.visible" ) ;
17- cy . contains ( "#loadingText" , "Loading Complete!" , { timeout : 20000 } ) . should ( "be.visible" ) ;
17+ cy . contains ( "#loadingText" , "Loading Complete!" , { timeout : 20000 } ) . should (
18+ "be.visible"
19+ ) ;
1820 cy . wait ( 10000 ) ;
1921 cy . get ( "#canvas" , { timeout : 10000 } ) . should ( "be.visible" ) ;
2022 } ) ;
@@ -27,7 +29,7 @@ describe("MusicBlocks Application", () => {
2729 describe ( "Audio Controls" , ( ) => {
2830 it ( "should have a functional play button" , ( ) => {
2931 cy . get ( "#play" ) . should ( "be.visible" ) . click ( ) ;
30- cy . window ( ) . then ( ( win ) => {
32+ cy . window ( ) . then ( win => {
3133 const audioContext = win . Tone . context ;
3234 cy . wrap ( audioContext . state ) . should ( "eq" , "running" ) ;
3335 } ) ;
@@ -81,9 +83,7 @@ describe("MusicBlocks Application", () => {
8183 } ) ;
8284
8385 it ( 'should click the New File button and verify "New Project" appears' , ( ) => {
84- cy . get ( "#newFile > .material-icons" )
85- . should ( "exist" )
86- . and ( "be.visible" ) ;
86+ cy . get ( "#newFile > .material-icons" ) . should ( "exist" ) . and ( "be.visible" ) ;
8787 cy . get ( "#newFile > .material-icons" ) . click ( ) ;
8888 cy . wait ( 500 ) ;
8989 cy . contains ( "New project" ) . should ( "be.visible" ) ;
@@ -99,7 +99,7 @@ describe("MusicBlocks Application", () => {
9999 "#Decrease\\ block\\ size > img" ,
100100 "#Increase\\ block\\ size > img"
101101 ] ;
102-
102+
103103 bottomBarElements . forEach ( selector => {
104104 cy . get ( selector ) . should ( "exist" ) . and ( "be.visible" ) ;
105105 } ) ;
@@ -111,21 +111,14 @@ describe("MusicBlocks Application", () => {
111111 "tr > :nth-child(2) > img" ,
112112 "tr > :nth-child(3) > img"
113113 ] ;
114-
114+
115115 sidebarElements . forEach ( selector => {
116- cy . get ( selector )
117- . should ( "exist" )
118- . and ( "be.visible" )
119- . click ( ) ;
116+ cy . get ( selector ) . should ( "exist" ) . and ( "be.visible" ) . click ( ) ;
120117 } ) ;
121118 } ) ;
122119
123120 it ( "should verify that Grid, Clear, and Collapse elements exist and are visible" , ( ) => {
124- const elements = [
125- "#Grid > img" ,
126- "#Clear" ,
127- "#Collapse > img"
128- ] ;
121+ const elements = [ "#Grid > img" , "#Clear" , "#Collapse > img" ] ;
129122 elements . forEach ( selector => {
130123 cy . get ( selector ) . should ( "exist" ) . and ( "be.visible" ) ;
131124 } ) ;
@@ -149,12 +142,12 @@ describe("MusicBlocks Application", () => {
149142 . and ( "have.attr" , "src" )
150143 . and ( "not.be.empty" ) ;
151144
152- cy . get ( "#planet-iframe" ) . then ( ( $iframe ) => {
145+ cy . get ( "#planet-iframe" ) . then ( $iframe => {
153146 const iframeSrc = $iframe . attr ( "src" ) ;
154147 cy . log ( "Iframe source:" , iframeSrc ) ;
155148 } ) ;
156149
157- cy . window ( ) . then ( ( win ) => {
150+ cy . window ( ) . then ( win => {
158151 win . document . getElementById ( "planet-iframe" ) . style . display = "block" ;
159152 } ) ;
160153 } ) ;
0 commit comments