Просмотр исходного кода

Merge pull request #6614 from weseek/fix/105237-do-not-wait-user-ui-settings

fix: Do not wait to save user-ui-settings (VRT)
Yohei Shiina 3 лет назад
Родитель
Сommit
290fdf4f0b

+ 9 - 0
packages/app/test/cypress/integration/50-sidebar/access-to-side-bar.spec.ts

@@ -54,6 +54,15 @@ context('Access to sidebar', () => {
     cy.screenshot(`${ssPrefix}custom-sidebar-2-custom-sidebar-editor`);
     cy.get('.dropup > .btn-submit').click();
     cy.get('body').should('not.have.class', 'on-edit');
+
+    // What to do when UserUISettings is not saved in time
+    cy.getByTestid('grw-sidebar-nav-primary-custom-sidebar').then(($el) => {
+      if (!$el.hasClass('active')) {
+        cy.wrap($el).click();
+      }
+    });
+
+    cy.get('.grw-custom-sidebar-content').should('be.visible');
     cy.getByTestid('grw-contextual-navigation-sub').screenshot(`${ssPrefix}custom-sidebar-3-custom-sidebar-created`);
   });