Shun Miyazawa 3 лет назад
Родитель
Сommit
b19fdf3b03

+ 1 - 1
packages/app/src/components/PageCreateModal.jsx

@@ -273,7 +273,7 @@ const PageCreateModal = () => {
           <div className="d-sm-flex align-items-center justify-items-between">
           <div className="d-sm-flex align-items-center justify-items-between">
 
 
             <UncontrolledButtonDropdown id="dd-template-type" className='flex-fill text-center'>
             <UncontrolledButtonDropdown id="dd-template-type" className='flex-fill text-center'>
-              <DropdownToggle caret>
+              <DropdownToggle id="template-type" caret>
                 {template == null && t('template.option_label.select')}
                 {template == null && t('template.option_label.select')}
                 {template === 'children' && t('template.children.label')}
                 {template === 'children' && t('template.children.label')}
                 {template === 'decendants' && t('template.decendants.label')}
                 {template === 'decendants' && t('template.decendants.label')}

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

@@ -1,23 +1,23 @@
-context('Switch Sidebar content', () => {
-  const ssPrefix = 'switch-sidebar-content';
+// context('Switch Sidebar content', () => {
+//   const ssPrefix = 'switch-sidebar-content';
 
 
-  beforeEach(() => {
-    // login
-    cy.fixture("user-admin.json").then(user => {
-      cy.login(user.username, user.password);
-    });
-  });
+//   beforeEach(() => {
+//     // login
+//     cy.fixture("user-admin.json").then(user => {
+//       cy.login(user.username, user.password);
+//     });
+//   });
 
 
-  it('PageTree is successfully shown', () => {
-    cy.collapseSidebar(false);
-    cy.visit('/page');
-    cy.getByTestid('grw-sidebar-nav-primary-page-tree').click();
-    // eslint-disable-next-line cypress/no-unnecessary-waiting
-    cy.wait(1500);
-    cy.screenshot(`${ssPrefix}-pagetree-after-load`, { capture: 'viewport' });
-  });
+//   it('PageTree is successfully shown', () => {
+//     cy.collapseSidebar(false);
+//     cy.visit('/page');
+//     cy.getByTestid('grw-sidebar-nav-primary-page-tree').click();
+//     // eslint-disable-next-line cypress/no-unnecessary-waiting
+//     cy.wait(1500);
+//     cy.screenshot(`${ssPrefix}-pagetree-after-load`, { capture: 'viewport' });
+//   });
 
 
-});
+// });
 
 
 
 
 context('Modal for page operation', () => {
 context('Modal for page operation', () => {
@@ -90,6 +90,7 @@ context('Modal for page operation', () => {
     cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
     cy.get('.toast-error').should('be.visible').invoke('attr', 'style', 'opacity: 1');
     cy.screenshot(`${ssPrefix}create-template-for-children-error`, {capture: 'viewport'});
     cy.screenshot(`${ssPrefix}create-template-for-children-error`, {capture: 'viewport'});
     cy.get('.toast-error').should('be.visible').click();
     cy.get('.toast-error').should('be.visible').click();
+    cy.get('.toast-error').should('not.exist');
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
       cy.get('#template-type').click();
       cy.get('#template-type').click();