From bab1673c07af015a6ce4ca0c1a5c727870f68729 Mon Sep 17 00:00:00 2001 From: Tisha Soumya Date: Wed, 15 Jan 2025 12:31:22 +0530 Subject: [PATCH 1/5] Try to fix the commented out subtest --- cypress/tests/block.cy.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cypress/tests/block.cy.js b/cypress/tests/block.cy.js index af19814..f39e0e7 100644 --- a/cypress/tests/block.cy.js +++ b/cypress/tests/block.cy.js @@ -20,16 +20,16 @@ context('Block Acceptance Tests', () => { cy.get('h2:contains(Heading h2)').should('be.visible'); }); - // it('As editor I can add a Heading H3 block ', () => { - // cy.visit('/document/edit'); - // cy.addNewBlock('heading'); - // cy.get('#field-tag > .react-select__control').click(); - // cy.get('#react-select-38-option-1').click(); - // cy.get('.editable').click().type('Heading h3'); - // cy.get('#toolbar-save').click(); - // cy.visit('/document'); - // cy.get('h3:contains(Heading h3)').should('be.visible'); - // }); + it('As editor I can add a Heading H3 block ', () => { + cy.visit('/document/edit'); + cy.addNewBlock('heading'); + // cy.get('#field-tag > .react-select__control').click(); + // cy.get('#react-select-38-option-1').click(); + // cy.get('.editable').click().type('Heading h3'); + // cy.get('#toolbar-save').click(); + // cy.visit('/document'); + // cy.get('h3:contains(Heading h3)').should('be.visible'); + }); it('As editor I can add a Heading block with special characters', () => { cy.visit('/document/edit'); From ae066bdb76daae27ff7f30ded689781029108a81 Mon Sep 17 00:00:00 2001 From: Tisha Soumya Date: Wed, 15 Jan 2025 12:40:13 +0530 Subject: [PATCH 2/5] fix cypress --- cypress/tests/block.cy.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/tests/block.cy.js b/cypress/tests/block.cy.js index f39e0e7..24d677f 100644 --- a/cypress/tests/block.cy.js +++ b/cypress/tests/block.cy.js @@ -23,12 +23,12 @@ context('Block Acceptance Tests', () => { it('As editor I can add a Heading H3 block ', () => { cy.visit('/document/edit'); cy.addNewBlock('heading'); - // cy.get('#field-tag > .react-select__control').click(); - // cy.get('#react-select-38-option-1').click(); - // cy.get('.editable').click().type('Heading h3'); - // cy.get('#toolbar-save').click(); - // cy.visit('/document'); - // cy.get('h3:contains(Heading h3)').should('be.visible'); + cy.get('#field-tag > .react-select__control').click(); + cy.get('#react-select-38-option-1').click(); + cy.get('.editable').click().type('Heading h3'); + cy.get('#toolbar-save').click(); + cy.visit('/document'); + cy.get('h3:contains(Heading h3)').should('be.visible'); }); it('As editor I can add a Heading block with special characters', () => { From fc864c00956a5e0ff4f761e0b80e340a8a356595 Mon Sep 17 00:00:00 2001 From: Tisha Soumya Date: Wed, 15 Jan 2025 12:45:44 +0530 Subject: [PATCH 3/5] fix heading cypress --- cypress/tests/block.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/tests/block.cy.js b/cypress/tests/block.cy.js index 24d677f..0a26666 100644 --- a/cypress/tests/block.cy.js +++ b/cypress/tests/block.cy.js @@ -23,8 +23,8 @@ context('Block Acceptance Tests', () => { it('As editor I can add a Heading H3 block ', () => { cy.visit('/document/edit'); cy.addNewBlock('heading'); - cy.get('#field-tag > .react-select__control').click(); - cy.get('#react-select-38-option-1').click(); + // cy.get('#field-tag > .react-select__control').click(); + // cy.get('#react-select-38-option-1').click(); cy.get('.editable').click().type('Heading h3'); cy.get('#toolbar-save').click(); cy.visit('/document'); From fa50838691af477d769f045993affb20aa585f6c Mon Sep 17 00:00:00 2001 From: Tisha Soumya Date: Wed, 15 Jan 2025 13:24:08 +0530 Subject: [PATCH 4/5] fix cypress --- cypress/tests/block.cy.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cypress/tests/block.cy.js b/cypress/tests/block.cy.js index 0a26666..68ef28f 100644 --- a/cypress/tests/block.cy.js +++ b/cypress/tests/block.cy.js @@ -20,11 +20,14 @@ context('Block Acceptance Tests', () => { cy.get('h2:contains(Heading h2)').should('be.visible'); }); + it('As editor I can add a Heading H3 block ', () => { cy.visit('/document/edit'); cy.addNewBlock('heading'); - // cy.get('#field-tag > .react-select__control').click(); - // cy.get('#react-select-38-option-1').click(); + cy.get('#field-tag > .react-select__control > .react-select__indicators >') + .trigger('click') + .findByText('h3') + .click(); cy.get('.editable').click().type('Heading h3'); cy.get('#toolbar-save').click(); cy.visit('/document'); From f515cf56b29183a2e9005f5e36a1964a9f646cf0 Mon Sep 17 00:00:00 2001 From: Tisha Soumya Date: Wed, 15 Jan 2025 13:31:02 +0530 Subject: [PATCH 5/5] fix the clssnames in cypress --- cypress/tests/block.cy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/tests/block.cy.js b/cypress/tests/block.cy.js index 68ef28f..3da8d14 100644 --- a/cypress/tests/block.cy.js +++ b/cypress/tests/block.cy.js @@ -24,7 +24,9 @@ context('Block Acceptance Tests', () => { it('As editor I can add a Heading H3 block ', () => { cy.visit('/document/edit'); cy.addNewBlock('heading'); - cy.get('#field-tag > .react-select__control > .react-select__indicators >') + cy.get( + '#field-tag > .react-select__control > .react-select__indicators > .react-select__dropdown-indicator', + ) .trigger('click') .findByText('h3') .click();