Procházet zdrojové kódy

Merge branch 'master' of https://github.com/weseek/growi into fix/105237-do-not-wait-user-ui-settings

Shun Miyazawa před 3 roky
rodič
revize
fca55525bc

+ 1 - 1
packages/app/src/server/routes/index.js

@@ -200,7 +200,7 @@ module.exports = function(crowi, app) {
   app.get('/me'                                 , loginRequiredStrictly, injectUserUISettings, me.index);
   app.get('/me'                                 , loginRequiredStrictly, injectUserUISettings, me.index);
   // external-accounts
   // external-accounts
   // my in-app-notifications
   // my in-app-notifications
-  app.get('/me/all-in-app-notifications'   , loginRequiredStrictly, allInAppNotifications.list);
+  app.get('/me/all-in-app-notifications'   , loginRequiredStrictly, injectUserUISettings, allInAppNotifications.list);
   app.get('/me/external-accounts'               , loginRequiredStrictly, injectUserUISettings, me.externalAccounts.list);
   app.get('/me/external-accounts'               , loginRequiredStrictly, injectUserUISettings, me.externalAccounts.list);
   // my drafts
   // my drafts
   app.get('/me/drafts'                          , loginRequiredStrictly, injectUserUISettings, me.drafts.list);
   app.get('/me/drafts'                          , loginRequiredStrictly, injectUserUISettings, me.drafts.list);

+ 3 - 2
packages/app/test/cypress/integration/20-basic-features/use-tools.spec.ts

@@ -193,9 +193,10 @@ context('Tag Oprations', () =>{
       cy.get('div.modal-footer > button').click();
       cy.get('div.modal-footer > button').click();
     });
     });
 
 
-    cy.get('.toast').should('be.visible').invoke('attr', 'style', 'opacity: 1');
+    cy.get('.toast').should('be.visible').trigger('mouseover');
     cy.get('.grw-taglabels-container > form > a').contains(tag).should('exist');
     cy.get('.grw-taglabels-container > form > a').contains(tag).should('exist');
-
+    /* eslint-disable cypress/no-unnecessary-waiting */
+    cy.wait(150); // wait for toastr to change its color occured by mouseover
     cy.screenshot(`${ssPrefix}4-click-done`, {capture: 'viewport'});
     cy.screenshot(`${ssPrefix}4-click-done`, {capture: 'viewport'});
 
 
   });
   });

+ 1 - 5
packages/app/test/cypress/integration/21-basic-features-for-guest/access-to-page.spec.ts

@@ -56,13 +56,9 @@ context('Access to /me page', () => {
 context('Access to special pages by guest', () => {
 context('Access to special pages by guest', () => {
   const ssPrefix = 'access-to-special-pages-by-guest-';
   const ssPrefix = 'access-to-special-pages-by-guest-';
 
 
-  beforeEach(() => {
-    // collapse sidebar
-    cy.collapseSidebar(true);
-  });
-
   it('/trash is successfully loaded', () => {
   it('/trash is successfully loaded', () => {
     cy.visit('/trash', {  });
     cy.visit('/trash', {  });
+    cy.collapseSidebar(true, true);
     cy.getByTestid('trash-page-list').should('be.visible');
     cy.getByTestid('trash-page-list').should('be.visible');
     cy.screenshot(`${ssPrefix}-trash`);
     cy.screenshot(`${ssPrefix}-trash`);
   });
   });

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

@@ -150,6 +150,7 @@ context('Access to sidebar', () => {
 
 
   it('Successfully access to My Drafts page', () => {
   it('Successfully access to My Drafts page', () => {
     cy.visit('/');
     cy.visit('/');
+    cy.collapseSidebar(true);
     cy.get('.grw-sidebar-nav-secondary-container').within(() => {
     cy.get('.grw-sidebar-nav-secondary-container').within(() => {
       cy.get('a[href*="/me/drafts"]').click();
       cy.get('a[href*="/me/drafts"]').click();
     });
     });