Yuki Takei 2 лет назад
Родитель
Сommit
6d865c731a

+ 3 - 3
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--access-to-page.cy.ts

@@ -258,7 +258,7 @@ context('Access to Template Editing Mode', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // wait until
       // wait until
@@ -293,7 +293,7 @@ context('Access to Template Editing Mode', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // Wait until
       // Wait until
@@ -327,7 +327,7 @@ context('Access to Template Editing Mode', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       //do
       //do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // wait until
       // wait until

+ 12 - 12
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--click-page-icons.cy.ts

@@ -25,7 +25,7 @@ context('Click page icons button', () => {
     cy.getByTestid('subscribe-button-tooltip').should('not.exist');
     cy.getByTestid('subscribe-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}1-subscribe-page`) })
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}1-subscribe-page`) })
 
 
     // Unsubscribe
     // Unsubscribe
     cy.get('#subscribe-button').click({force: true});
     cy.get('#subscribe-button').click({force: true});
@@ -40,7 +40,7 @@ context('Click page icons button', () => {
     cy.getByTestid('subscribe-button-tooltip').should('not.exist');
     cy.getByTestid('subscribe-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSkeletonDisappear();
     cy.waitUntilSkeletonDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}2-unsubscribe-page`) })
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}2-unsubscribe-page`) })
   });
   });
 
 
   it('Successfully Like / Dislike a page', () => {
   it('Successfully Like / Dislike a page', () => {
@@ -60,12 +60,12 @@ context('Click page icons button', () => {
     cy.getByTestid('like-button-tooltip').should('not.exist');
     cy.getByTestid('like-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}3-like-page`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}3-like-page`) });
 
 
     // total liker (user-list-popover is commented out because it is sometimes displayed and sometimes not.)
     // total liker (user-list-popover is commented out because it is sometimes displayed and sometimes not.)
     // cy.get('#po-total-likes').click({force: true});
     // cy.get('#po-total-likes').click({force: true});
     // cy.get('.user-list-popover').should('be.visible')
     // cy.get('.user-list-popover').should('be.visible')
-    // cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}4-likes-counter`) });
+    // cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}4-likes-counter`) });
 
 
     // unlike
     // unlike
     cy.get('#like-button').click({force: true});
     cy.get('#like-button').click({force: true});
@@ -80,12 +80,12 @@ context('Click page icons button', () => {
     cy.getByTestid('like-button-tooltip').should('not.exist');
     cy.getByTestid('like-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}5-dislike-page`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}5-dislike-page`) });
 
 
     // total liker (user-list-popover is commented out because it is sometimes displayed and sometimes not.)
     // total liker (user-list-popover is commented out because it is sometimes displayed and sometimes not.)
     // cy.get('#po-total-likes').click({force: true});
     // cy.get('#po-total-likes').click({force: true});
     // cy.get('.user-list-popover').should('be.visible');
     // cy.get('.user-list-popover').should('be.visible');
-    // cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}6-likes-counter`) });
+    // cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}6-likes-counter`) });
   });
   });
 
 
   it('Successfully Bookmark / Unbookmark a page', () => {
   it('Successfully Bookmark / Unbookmark a page', () => {
@@ -105,7 +105,7 @@ context('Click page icons button', () => {
     cy.getByTestid('bookmark-button-tooltip').should('not.exist');
     cy.getByTestid('bookmark-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}7-bookmark-page`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}7-bookmark-page`) });
 
 
     // total bookmarker
     // total bookmarker
     cy.waitUntil(() => {
     cy.waitUntil(() => {
@@ -117,7 +117,7 @@ context('Click page icons button', () => {
       });
       });
     });
     });
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}8-bookmarks-counter`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}8-bookmarks-counter`) });
 
 
     // unbookmark
     // unbookmark
     cy.get('#bookmark-dropdown-btn').click({force: true});
     cy.get('#bookmark-dropdown-btn').click({force: true});
@@ -134,7 +134,7 @@ context('Click page icons button', () => {
     cy.getByTestid('bookmark-button-tooltip').should('not.exist');
     cy.getByTestid('bookmark-button-tooltip').should('not.exist');
 
 
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}9-unbookmark-page`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}9-unbookmark-page`) });
 
 
     // total bookmarker
     // total bookmarker
     cy.waitUntil(() => {
     cy.waitUntil(() => {
@@ -146,7 +146,7 @@ context('Click page icons button', () => {
       });
       });
     });
     });
     cy.waitUntilSpinnerDisappear();
     cy.waitUntilSpinnerDisappear();
-    cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}10-bookmarks-counter`) });
+    cy.getByTestid('grw-contextual-sub-nav').within(() => { cy.screenshot(`${ssPrefix}10-bookmarks-counter`) });
   });
   });
 
 
   // user-list-popover is commented out because it is sometimes displayed and sometimes not
   // user-list-popover is commented out because it is sometimes displayed and sometimes not
@@ -154,7 +154,7 @@ context('Click page icons button', () => {
   //   cy.visit('/Sandbox');
   //   cy.visit('/Sandbox');
   //   cy.waitUntilSkeletonDisappear();
   //   cy.waitUntilSkeletonDisappear();
 
 
-  //   cy.get('#grw-subnav-container').within(() => {
+  //   cy.getByTestid('grw-contextual-sub-nav').within(() => {
   //     cy.get('div.grw-seen-user-info').find('button#btn-seen-user').click({force: true});
   //     cy.get('div.grw-seen-user-info').find('button#btn-seen-user').click({force: true});
   //   });
   //   });
 
 
@@ -168,7 +168,7 @@ context('Click page icons button', () => {
 
 
   //   cy.get('.user-list-popover').should('be.visible')
   //   cy.get('.user-list-popover').should('be.visible')
 
 
-  //   cy.get('#grw-subnav-container').within(() => {
+  //   cy.getByTestid('grw-contextual-sub-nav').within(() => {
   //     cy.screenshot(`${ssPrefix}11-seen-user-list`);
   //     cy.screenshot(`${ssPrefix}11-seen-user-list`);
   //   });
   //   });
   // });
   // });

+ 4 - 4
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--use-tools.cy.ts

@@ -14,7 +14,7 @@ context('Modal for page operation', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       //wait until
       //wait until
@@ -47,7 +47,7 @@ context('Modal for page operation', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // wait until
       // wait until
@@ -65,7 +65,7 @@ context('Modal for page operation', () => {
 
 
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // wait until
       // wait until
@@ -97,7 +97,7 @@ context('Modal for page operation', () => {
 //   it('PresentationModal for "/" is shown successfully', () => {
 //   it('PresentationModal for "/" is shown successfully', () => {
 //     cy.visit('/');
 //     cy.visit('/');
 
 
-//     cy.get('#grw-subnav-container').within(() => {
+//     cy.getByTestid('grw-contextual-sub-nav').within(() => {
 //       cy.getByTestid('open-page-item-control-btn').click({force: true});
 //       cy.getByTestid('open-page-item-control-btn').click({force: true});
 //       cy.getByTestid('open-presentation-modal-btn').click({force: true});
 //       cy.getByTestid('open-presentation-modal-btn').click({force: true});
 //     });
 //     });

+ 1 - 1
apps/app/test/cypress/e2e/22-sharelink/22-sharelink--access-to-sharelink.cy.ts

@@ -14,7 +14,7 @@ context('Access to sharelink by guest', () => {
     // open dropdown
     // open dropdown
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn', { timeout: 14000 }).find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn', { timeout: 14000 }).find('button').click({force: true});
       });
       });
       // wait until
       // wait until

+ 1 - 1
apps/app/test/cypress/e2e/23-editor/23-editor--with-navigation.cy.ts

@@ -143,7 +143,7 @@ context.skip('Editor while navigation', () => {
     // open duplicate modal
     // open duplicate modal
     cy.waitUntil(() => {
     cy.waitUntil(() => {
       // do
       // do
-      cy.get('#grw-subnav-container').within(() => {
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
         cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
       });
       // wait until
       // wait until