Skip to content

Commit

Permalink
Merge branch 'develop' into TASK-5963
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes authored Jul 10, 2024
2 parents 9a5ce24 + cd2c831 commit ed1343b
Show file tree
Hide file tree
Showing 20 changed files with 176 additions and 238 deletions.
11 changes: 1 addition & 10 deletions cypress/e2e/iva/cohort-browser-grid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ context("Cohort Browser Grid", () => {

// TOOLBAR
context("Cohort Toolbar", () => {
const toolbarComponent = "";

beforeEach(() => {
cy.get(browserGrid)
.find(`div[data-cy="toolbar"]`)
Expand All @@ -59,7 +57,6 @@ context("Cohort Browser Grid", () => {
// MODAL CREATE
context("Modal Create", () => {
beforeEach(() => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get(browserGrid)
.find(`button[data-action="create"]`)
.click();
Expand All @@ -69,44 +66,38 @@ context("Cohort Browser Grid", () => {
});
// 1. Open modal and render create
it("should render create modal", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("div.modal-dialog")
.should("be.visible");
});
// 2. Render title
it("should render create title", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("h4.modal-title")
.should("contain.text", "Cohort Create");
});
// 3. Render button clear
it("should render button clear", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Clear")
.should("be.visible");
});
// 4. Render button create
it("should render button create", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Create")
.should("be.visible");
});
// 5. Render tabs
it("should render form tabs", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("ul.nav.nav-tabs > li")
.should("have.length.at.least", 1);
});
// 6. Render Cohort ID
it("should have form field ID", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find(`data-form div.form-horizontal div.row label.col-form-label`)
.find(`data-form div.form-horizontal div.row div.col-md-3`)
.should("contain.text", "Cohort ID");
});
});
Expand Down
18 changes: 2 additions & 16 deletions cypress/e2e/iva/disease-panel-browser-grid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ context("Disease Panel Browser Grid", () => {

// TOOLBAR
context("Disease Panel Toolbar", () => {
const toolbarComponent = "";

beforeEach(() => {
cy.get("@container")
.find("div[data-cy='toolbar']")
Expand Down Expand Up @@ -75,45 +73,39 @@ context("Disease Panel Browser Grid", () => {
});
// 2. Render title
it("should render create title", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("h4.modal-title")
.should("contain.text", "Disease Panel Create");
});
// 3. Render button clear
it("should render button clear", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Clear")
.should("be.visible");
});
// 4. Render button create
it("should render button create", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Create")
.should("be.visible");
});
// 5. Render tabs
it("should render form tabs", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("ul.nav.nav-tabs > li")
.should("have.length.greaterThan", 1);
});
// 6. Render Disease Panel ID
it("should have form field ID", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("data-form div.form-horizontal div.row label.col-form-label")
.find("data-form div.form-horizontal div.row div.col-md-3")
.should("contain.text", "Disease Panel ID");
});
});

// MODAL UPDATE
context("Modal Update", () => {
beforeEach(() => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@container")
.find("table tbody tr td button.dropdown-toggle")
.first()
Expand All @@ -127,44 +119,38 @@ context("Disease Panel Browser Grid", () => {
});
// 1. Open modal and render update
it("should render update modal", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("div.modal-dialog")
.should("be.visible");
});
// 2. Render title
it("should render update title", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("h4.modal-title")
.should("contain.text", "Disease Panel Update");
});
// 3. Render button clear
it("should render button clear", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.contains("button", "Discard Changes")
.should("be.visible");
});
// 4. Render button create
it("should render button create", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.contains("button", "Update")
.should("be.visible");
});
// 5. Render tabs
it("should render form tabs", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("ul.nav.nav-tabs > li")
.should("have.length.greaterThan", 1);
});
// 6. Render Sample ID
it("should have form field ID equal to sample selected", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("data-form div.row div.row label.col-form-label")
.find("data-form div.row div.row div.col-md-3")
.should("contain.text", "Disease Panel ID");
});
});
Expand Down
20 changes: 2 additions & 18 deletions cypress/e2e/iva/family-browser-grid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ context("Family Browser Grid", () => {

// TOOLBAR
context("Family Toolbar", () => {
const toolbarComponent = "";

beforeEach(() => {
cy.get(browserGrid)
.find("div[data-cy='toolbar']")
Expand All @@ -59,7 +57,6 @@ context("Family Browser Grid", () => {
// MODAL CREATE
context("Modal Create", () => {
beforeEach(() => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get(browserGrid)
.find("button[data-action='create']")
.click();
Expand All @@ -69,52 +66,45 @@ context("Family Browser Grid", () => {
});
// 1. Open modal and render create
it("should render create modal", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("div.modal-dialog")
.should("be.visible");
});
// 2. Render title
it("should render create title", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("h4.modal-title")
.should("contain.text", "Family Create");
});
// 3. Render button clear
it("should render button clear", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Clear")
.should("be.visible");
});
// 4. Render button create
it("should render button create", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.contains("button", "Create")
.should("be.visible");
});
// 5. Render tabs
it("should render form tabs", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("ul.nav.nav-tabs > li")
.should("have.length.at.least", 1);
});
// 6. Render Family ID
it("should have form field ID", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-create")
.find("data-form div.form-horizontal div.row label.col-form-label")
.find("data-form div.form-horizontal div.row div.col-md-3")
.should("contain.text", "Family ID");
});
});

// MODAL UPDATE
context("Modal Update", () => {
beforeEach(() => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get(browserGrid)
.find("table tbody tr td button.dropdown-toggle")
.first()
Expand All @@ -128,44 +118,38 @@ context("Family Browser Grid", () => {
});
// 1. Open modal and render update
it("should render update modal", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("div.modal-dialog")
.should("be.visible");
});
// 2. Render title
it("should render update title", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("h4.modal-title")
.should("contain.text", "Family Update");
});
// 3. Render button clear
it("should render button clear", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.contains("button", "Discard Changes")
.should("be.visible");
});
// 4. Render button create
it("should render button create", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.contains("button", "Update")
.should("be.visible");
});
// 5. Render tabs
it("should render form tabs", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("ul.nav.nav-tabs > li")
.should("have.length.at.least", 1);
});
// 6. Render Sample ID
it("should have form field ID equal to sample selected", () => {
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get("@modal-update")
.find("data-form div.row div.row label.col-form-label")
.find("data-form div.row div.row div.col-md-3")
.should("contain.text", "Family ID");
});
});
Expand Down
Loading

0 comments on commit ed1343b

Please sign in to comment.