فهرست منبع

Merge pull request #8400 from weseek/fix/139057-20-basic-features--use-tools.cy.ts

fix: Normalization of 20-basic-features--use-tools.cy.ts
Shun Miyazawa 2 سال پیش
والد
کامیت
68e576dd5d

+ 0 - 1
apps/app/src/components/PageAlert/TrashPageAlert.tsx

@@ -88,7 +88,6 @@ export const TrashPageAlert = (): JSX.Element => {
           type="button"
           className="btn btn-info rounded-pill btn-sm ms-auto me-2"
           onClick={openPutbackPageModalHandler}
-          data-bs-toggle="modal"
           data-testid="put-back-button"
         >
           <i className="icon-action-undo" aria-hidden="true"></i> {t('Put Back')}

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

@@ -27,6 +27,7 @@ context('Modal for page operation', () => {
       cy.screenshot(`${ssPrefix}-delete-modal`);
       cy.getByTestid('delete-page-button').click();
     });
+
     cy.getByTestid('trash-page-alert').should('be.visible');
     cy.collapseSidebar(true);
     cy.screenshot(`${ssPrefix}-bootstrap4-is-in-garbage-box`);
@@ -121,18 +122,18 @@ context('Page Accessories Modal', () => {
 
     cy.visit('/');
     cy.collapseSidebar(true, true);
+    cy.waitUntilSkeletonDisappear();
 
     cy.waitUntil(() => {
       // do
-      cy.getByTestid('grw-contextual-sub-nav').should('be.visible').within(() => {
-        cy.getByTestid('open-page-item-control-btn').find('button').first().as('btn').click();
-      });
-      // wait until
-      return cy.get('body').within(() => {
-        return Cypress.$('.dropdown-menu.show').is(':visible');
+      cy.getByTestid('grw-contextual-sub-nav').within(() => {
+        cy.getByTestid('open-page-item-control-btn').find('button').click({force: true});
       });
+      //wait until
+      return cy.getByTestid('page-item-control-menu').then($elem => $elem.is(':visible'))
     });
 
+
   });
 
   it('Page History is shown successfully', () => {
@@ -210,7 +211,7 @@ context('Tag Oprations', { scrollBehavior: false }, () =>{
     });
 
     cy.get('.Toastify__toast').should('be.visible').trigger('mouseover');
-    cy.get('.grw-taglabels-container > .grw-tag-labels > a').contains(tag).should('exist');
+    cy.getByTestid('grw-tag-labels').contains(tag).should('exist');
 
     cy.screenshot(`${ssPrefix}2-click-done`);
   });