Przeglądaj źródła

Merge branch 'master' into fix/114251-request-to-personal-setting-api-occurs-when-in-guest-mode

Shun Miyazawa 3 lat temu
rodzic
commit
ca9b8ee26e

+ 11 - 8
packages/app/src/components/Page/PageView.tsx

@@ -17,6 +17,8 @@ import type { PageSideContentsProps } from '../PageSideContents';
 import { UserInfo } from '../User/UserInfo';
 import type { UsersHomePageFooterProps } from '../UsersHomePageFooter';
 
+import { PageContents } from './PageContents';
+
 import styles from './PageView.module.scss';
 
 
@@ -95,14 +97,15 @@ export const PageView = (props: Props): JSX.Element => {
 
   const contents = specialContents != null
     ? <></>
-    : (() => {
-      const PageContents = dynamic(() => import('./PageContents').then(mod => mod.PageContents), {
-        ssr: false,
-        // TODO: show SSR body
-        // loading: () => ssrBody ?? <></>,
-      });
-      return <PageContents />;
-    })();
+    // TODO: show SSR body
+    // : (() => {
+    //   const PageContents = dynamic(() => import('./PageContents').then(mod => mod.PageContents), {
+    //     ssr: false,
+    //     // loading: () => ssrBody ?? <></>,
+    //   });
+    //   return <PageContents />;
+    // })();
+    : <PageContents />;
 
   return (
     <MainPane

+ 2 - 2
packages/app/test/cypress/integration/20-basic-features/20-basic-features--click-page-icons.spec.ts

@@ -112,7 +112,7 @@ context('Click page icons button', () => {
       // do
       cy.get('#po-total-bookmarks').click({force: true});
       // wait until
-      return cy.get('.user-list-popover').then($elem => $elem.is(':visible'));
+      return Cypress.$('.user-list-popover').is(':visible');
     });
     cy.waitUntilSpinnerDisappear();
     cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}8-bookmarks-counter`) });
@@ -137,7 +137,7 @@ context('Click page icons button', () => {
       // do
       cy.get('#po-total-bookmarks').click({force: true});
       // wait until
-      return cy.get('.user-list-popover').then($elem => $elem.is(':visible'));
+      return Cypress.$('.user-list-popover').is(':visible');
     });
     cy.waitUntilSpinnerDisappear();
     cy.get('#grw-subnav-container').within(() => { cy.screenshot(`${ssPrefix}10-bookmarks-counter`) });

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

@@ -45,8 +45,13 @@ context('Modal for page operation', () => {
       cy.getByTestid('btn-create-memo').click();
     });
     cy.getByTestid('page-editor').should('be.visible');
-    cy.getByTestid('save-page-btn').click();
-    cy.get('.layout-root').should('not.have.class', 'editing');
+
+    cy.waitUntil(() => {
+      // do
+      cy.getByTestid('save-page-btn').should('be.visible').click();
+      // wait until
+      return Cypress.$('.layout-root').hasClass('editing');
+    });
 
     cy.getByTestid('grw-contextual-sub-nav').should('be.visible');