@@ -8,7 +8,7 @@ import type { Linode } from '@linode/api-v4';
88
99authenticate ( ) ;
1010describe ( 'switch linode state' , ( ) => {
11- before ( ( ) => {
11+ beforeEach ( ( ) => {
1212 cleanUp ( [ 'linodes' ] ) ;
1313 cy . tag ( 'method:e2e' ) ;
1414 } ) ;
@@ -19,7 +19,8 @@ describe('switch linode state', () => {
1919 * - Confirms that landing page UI updates to reflect Linode power state.
2020 * - Does not wait for Linode to finish being shut down before succeeding.
2121 */
22- it ( 'powers off a linode from landing page' , ( ) => {
22+ it . skip ( 'powers off a linode from landing page' , ( ) => {
23+ // TODO M3-10588 - Unskip landing page power off test, evaluate stability.
2324 // Use `vlan_no_internet` security method.
2425 // This works around an issue where the Linode API responds with a 400
2526 // when attempting to reboot shortly after booting up when the Linode is
@@ -28,8 +29,11 @@ describe('switch linode state', () => {
2829 createTestLinode ( { booted : true } , { securityMethod : 'vlan_no_internet' } )
2930 ) . then ( ( linode : Linode ) => {
3031 cy . visitWithLogin ( '/linodes' ) ;
31- cy . get ( `[data-qa-linode="${ linode . label } "]` )
32+
33+ cy . findByText ( linode . label ) . scrollIntoView ( ) ;
34+ cy . findByText ( linode . label )
3235 . should ( 'be.visible' )
36+ . closest ( 'tr' )
3337 . within ( ( ) => {
3438 cy . contains ( 'Running' , { timeout : LINODE_CREATE_TIMEOUT } ) . should (
3539 'be.visible'
@@ -54,8 +58,9 @@ describe('switch linode state', () => {
5458 . click ( ) ;
5559 } ) ;
5660
57- cy . get ( `[data-qa- linode=" ${ linode . label } "]` )
61+ cy . findByText ( linode . label )
5862 . should ( 'be.visible' )
63+ . closest ( 'tr' )
5964 . within ( ( ) => {
6065 cy . contains ( 'Shutting Down' ) . should ( 'be.visible' ) ;
6166 } ) ;
@@ -110,12 +115,15 @@ describe('switch linode state', () => {
110115 * - Confirms that landing page UI updates to reflect Linode power state.
111116 * - Waits for Linode to finish booting up before succeeding.
112117 */
113- it ( 'powers on a linode from landing page' , ( ) => {
118+ it . skip ( 'powers on a linode from landing page' , ( ) => {
119+ // TODO M3-10588 - Unskip landing page power on test, evaluate stability.
114120 cy . defer ( ( ) => createTestLinode ( { booted : false } ) ) . then (
115121 ( linode : Linode ) => {
116122 cy . visitWithLogin ( '/linodes' ) ;
117- cy . get ( `[data-qa-linode="${ linode . label } "]` )
123+ cy . findByText ( linode . label ) . scrollIntoView ( ) ;
124+ cy . findByText ( linode . label )
118125 . should ( 'be.visible' )
126+ . closest ( 'tr' )
119127 . within ( ( ) => {
120128 cy . contains ( 'Offline' , { timeout : LINODE_CREATE_TIMEOUT } ) . should (
121129 'be.visible'
@@ -140,10 +148,14 @@ describe('switch linode state', () => {
140148 . click ( ) ;
141149 } ) ;
142150
143- cy . get ( `[data-qa-linode="${ linode . label } "]` )
151+ cy . findByText ( linode . label ) . scrollIntoView ( ) ;
152+ cy . findByText ( linode . label )
144153 . should ( 'be.visible' )
154+ . closest ( 'tr' )
145155 . within ( ( ) => {
146- cy . contains ( 'Booting' ) . should ( 'be.visible' ) ;
156+ cy . contains ( 'Booting' , { timeout : LINODE_CREATE_TIMEOUT } ) . should (
157+ 'be.visible'
158+ ) ;
147159 cy . contains ( 'Running' , { timeout : LINODE_CREATE_TIMEOUT } ) . should (
148160 'be.visible'
149161 ) ;
@@ -196,7 +208,9 @@ describe('switch linode state', () => {
196208 * - Confirms that landing page UI updates to reflect Linode power state.
197209 * - Does not wait for Linode to finish rebooting before succeeding.
198210 */
199- it ( 'reboots a linode from landing page' , ( ) => {
211+ it . skip ( 'reboots a linode from landing page' , ( ) => {
212+ // TODO M3-10588 - Unskip landing page reboot test, evaluate stability.
213+
200214 // Use `vlan_no_internet` security method.
201215 // This works around an issue where the Linode API responds with a 400
202216 // when attempting to reboot shortly after booting up when the Linode is
@@ -205,8 +219,10 @@ describe('switch linode state', () => {
205219 createTestLinode ( { booted : true } , { securityMethod : 'vlan_no_internet' } )
206220 ) . then ( ( linode : Linode ) => {
207221 cy . visitWithLogin ( '/linodes' ) ;
208- cy . get ( `[data-qa-linode="${ linode . label } "]` )
222+ cy . findByText ( linode . label ) . scrollIntoView ( ) ;
223+ cy . findByText ( linode . label )
209224 . should ( 'be.visible' )
225+ . closest ( 'tr' )
210226 . within ( ( ) => {
211227 cy . contains ( 'Running' , { timeout : LINODE_CREATE_TIMEOUT } ) . should (
212228 'be.visible'
@@ -231,8 +247,9 @@ describe('switch linode state', () => {
231247 . click ( ) ;
232248 } ) ;
233249
234- cy . get ( `[data-qa- linode=" ${ linode . label } "]` )
250+ cy . findByText ( linode . label )
235251 . should ( 'be.visible' )
252+ . closest ( 'tr' )
236253 . within ( ( ) => {
237254 cy . contains ( 'Rebooting' ) . should ( 'be.visible' ) ;
238255 } ) ;
0 commit comments