From 95498d66a8993d0d2c0095eef31f7e16c61ce7ab Mon Sep 17 00:00:00 2001 From: Angelina Elizabeth Uno-Antonison Date: Thu, 6 Jul 2023 17:50:56 -0500 Subject: [PATCH] Resovled the system tests --- system-tests/e2e/edit_case_analysis.cy.js | 14 ++++---------- .../e2e/view_collapsible_case_information.cy.js | 16 ++++++++-------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/system-tests/e2e/edit_case_analysis.cy.js b/system-tests/e2e/edit_case_analysis.cy.js index 7a97a732..891a2c18 100644 --- a/system-tests/e2e/edit_case_analysis.cy.js +++ b/system-tests/e2e/edit_case_analysis.cy.js @@ -8,25 +8,19 @@ describe('edit_case_analysis.cy.js', () => { cy.get('.grey-rounded-menu').invoke('attr', 'style', 'display: block; visibility: hidden; opacity: 0;'); }); - // it('Enables editing an analysis', () => { - // cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content > [data-test="editable-value"]') - // .should('exist'); - // cy.get('[data-test="save-edit-button"]').should('exist'); - // }); - it('edits a value & saves to the analysis', () => { - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content > [data-test="editable-value"]') + cy.get('#Brief > div > [data-test="Phenotype"] > .section-content > [data-test="editable-value"]') .click(); - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content > [data-test="editable-value"]') + cy.get('#Brief > div > [data-test="Phenotype"] > .section-content > [data-test="editable-value"]') .type('test'); - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content > [data-test="editable-value"]') + cy.get('#Brief > div > [data-test="Phenotype"] > .section-content > [data-test="editable-value"]') .should('contain', 'test'); cy.get('[data-test="save-edit-button"]').should('exist'); cy.get('[data-test="save-edit-button"]').click(); cy.get('[data-test="save-edit-button"]').should('not.exist'); cy.get('.rosalution-logo').click(); cy.get('.analysis-card').first().click(); - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content > [data-test="value-row"]') + cy.get('#Brief > div > [data-test="Phenotype"] > .section-content > [data-test="value-row"]') .should('contain', 'test'); cy.get('#Brief > div > [data-test="Nominator"] > .section-content > [data-test="value-row"]') .should('contain', 'Dr. Person One'); diff --git a/system-tests/e2e/view_collapsible_case_information.cy.js b/system-tests/e2e/view_collapsible_case_information.cy.js index 020d41b7..9df7ec6d 100644 --- a/system-tests/e2e/view_collapsible_case_information.cy.js +++ b/system-tests/e2e/view_collapsible_case_information.cy.js @@ -6,17 +6,17 @@ describe('view_collapsible_case_information.cy.js', () => { }); it('can view the case information when expanded and not when its collapsed', () => { - cy.get('#Brief > div > [data-test="Goals"] > .section-content').should('be.visible'); - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content').should('be.visible'); + cy.get('#Brief > div > [data-test="Nominator"] > .section-content').should('be.visible'); + cy.get('#Brief > div > [data-test="Participant"] > .section-content').should('be.visible'); cy.get('#Clinical_History > div > [data-test="Testing"] > .section-content').should('be.visible'); - - cy.get('#Brief > div > .rosalution-section-header > .rosalution-header-right-icons > .collapsable-logo > .svg-inline--fa').click(); + + cy.get('#Brief > div > .rosalution-section-header > .rosalution-header-right-icons > .collapsable-logo > .svg-inline--fa').click({force:true}); cy.get('#Clinical_History > div > .rosalution-section-header > .rosalution-header-right-icons > .collapsable-logo > .svg-inline--fa') - .click(); + .click({force:true}); + + cy.get('#Brief > div > [data-test="Nominator"] > .section-content').should('not.be.visible'); + cy.get('#Brief > div > [data-test="Participant"] > .section-content').should('not.be.visible'); - cy.get('#Brief > div > [data-test="Goals"] > .section-content').should('not.be.visible'); - cy.get('#Brief > div > [data-test="Proposed Model/Project"] > .section-content').should('not.be.visible'); - cy.get('#Clinical_History > div > [data-test="Testing"] > .section-content').should('not.be.visible'); }); });