Mao 4 лет назад
Родитель
Сommit
e5b5d8a13d

+ 0 - 2
packages/app/src/components/PageCreateModal.jsx

@@ -148,7 +148,6 @@ const PageCreateModal = (props) => {
                     className="page-today-input1 form-control text-center mx-2"
                     value={todayInput1}
                     onChange={e => onChangeTodayInput1Handler(e.target.value)}
-                    data-testid="createTodaysPageInput"
                   />
                 </form>
                 <span className="page-today-suffix">/{now}/</span>
@@ -167,7 +166,6 @@ const PageCreateModal = (props) => {
 
             <div className="d-flex justify-content-end mt-1 mt-sm-0">
               <button
-                data-testid="createTodaysPageBtn"
                 type="button"
                 className="grw-btn-create-page btn btn-outline-primary rounded-pill text-nowrap ml-3"
                 onClick={createTodayPage}

+ 9 - 16
packages/app/test/cypress/integration/2-basic-features/create-page.spec.ts

@@ -1,4 +1,4 @@
-context('Create page', () => {
+context('Create page modal', () => {
 
   const ssPrefix = 'create-page';
 
@@ -21,22 +21,15 @@ context('Create page', () => {
     }
   });
 
-  // it("/Page Hello under today's page is successfully created", () => {
-  //   cy.getByTestid('newPageBtn').click();
-  //   cy.screenshot(`${ssPrefix}-opne-modal`)
-  //   cy.getByTestid('createTodaysPageInput').type("Hello");
-  //   cy.screenshot('input Hello');
-  //   cy.getByTestid('createTodaysPageBtn').click();
-
-  // });
-
-  it("/Page Hola under / is successfully created", ()=>{
+  it("Page create modal is shown successfully", () => {
     cy.getByTestid('newPageBtn').click();
-    cy.screenshot(`${ssPrefix}-opne-modal`)
-    cy.getByTestid('createPageInput').type('Hola');
-    cy.screenshot('input Hola');
-    cy.getByTestid('createPageBtn');
+    cy.screenshot(`${ssPrefix}-opne-modal at '/' page`)
+  });
 
-  })
+  it("Page create modal is shown successfully at /Sandbox page", ()=>{
+    cy.visit('/Sandbox');
+    cy.getByTestid('newPageBtn').click();
+    cy.screenshot(`${ssPrefix}-open-modal-at /Sandbox`)
+  });
 
 });