Procházet zdrojové kódy

Merge pull request #6945 from weseek/revert-6939-fix/108858-normalize-vrt

Revert "fix: Normalize VRT (20-basic-features/use-tools.spec.ts/Modal for page operation -- Trying to create template page under the root page fail (failed).png)"
Shun Miyazawa před 3 roky
rodič
revize
52dcd5d408

+ 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 id='template-type' caret>
+              <DropdownToggle 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')}

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

@@ -83,17 +83,16 @@ context('Modal for page operation', () => {
     cy.getByTestid('newPageBtn').click();
     cy.getByTestid('newPageBtn').click();
 
 
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
     cy.getByTestid('page-create-modal').should('be.visible').within(() => {
-      cy.get('#template-type').should('be.visible').click();
+      cy.get('#template-type').click();
       cy.get('#template-type').next().find('button:eq(0)').click({force: true});
       cy.get('#template-type').next().find('button:eq(0)').click({force: true});
       cy.get('#dd-template-type').next().find('button').click({force: true});
       cy.get('#dd-template-type').next().find('button').click({force: true});
     });
     });
     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').should('be.visible').click();
+      cy.get('#template-type').click();
       cy.get('#template-type').next().find('button:eq(1)').click({force: true});
       cy.get('#template-type').next().find('button:eq(1)').click({force: true});
       cy.get('#dd-template-type').next().find('button').click({force: true});
       cy.get('#dd-template-type').next().find('button').click({force: true});
     });
     });