Skip to content

Commit

Permalink
Same for e2e/batchSampleFeature.cy
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminCharmes committed Mar 18, 2024
1 parent fbff3bf commit 252d129
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions webapp/cypress/e2e/batchSampleFeature.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("Batch sample creation", () => {
cy.contains("Add batch of samples").click();
cy.findByLabelText("Number of rows:").clear().type(2);

cy.contains("Submit").should("be.disabled");
cy.get("#sample-submit").should("be.disabled");
getBatchAddCell(1, 1).type("baseA");
getBatchAddCell(2, 1).type("baseB");
getBatchAddCell(2, 2).type("the name of baseB");
Expand All @@ -93,7 +93,7 @@ describe("Batch sample creation", () => {
cy.contains("Add batch of samples").click();
cy.findByLabelText("Number of rows:").clear().type(4);

cy.contains("Submit").should("be.disabled");
cy.get("#sample-submit").should("be.disabled");
getBatchAddCell(1, 1).type("component1");
getBatchAddCell(1, 2).type("this component has a name");
getBatchAddCell(2, 1).type("component2");
Expand Down Expand Up @@ -188,7 +188,7 @@ describe("Batch sample creation", () => {
it("checks the copied samples", () => {
// check the copied samples
cy.contains("baseA_copy").click();
cy.findByLabelText("Name").should("have.value", "a copied sample");
cy.get("#sample-name").should("have.value", "a copied sample");
cy.findByText("this is a description of baseA.");
cy.findByText("a comment is added here.");
cy.findByText("Home").click();
Expand Down Expand Up @@ -302,15 +302,15 @@ describe("Batch sample creation", () => {

it("checks the created samples", () => {
cy.contains("test101").click();
cy.findByLabelText("Name").should("have.value", "sample with two components");
cy.get("#sample-name").should("have.value", "sample with two components");
cy.get("#synthesis-information table").contains("component1");
cy.get("#synthesis-information table").contains("component2");
cy.get("#synthesis-information tbody tr:nth-of-type(1) input").eq(0).should("have.value", "");
cy.get("#synthesis-information tbody tr:nth-of-type(2) input").eq(0).should("have.value", "");
cy.findByText("Home").click();

cy.contains("test102").click();
cy.findByLabelText("Name").should(
cy.get("#sample-name").should(
"have.value",
"sample with two components, copied from a sample with no components",
);
Expand All @@ -323,7 +323,7 @@ describe("Batch sample creation", () => {
cy.findByText("Home").click();

cy.contains("test103").click();
cy.findByLabelText("Name").should(
cy.get("#sample-name").should(
"have.value",
"sample with one component, copied from a sample with two components",
);
Expand Down Expand Up @@ -356,7 +356,7 @@ describe("Batch sample creation", () => {
cy.findByText("Home").click();

cy.contains("test104").click();
cy.findByLabelText("Name").should(
cy.get("#sample-name").should(
"have.value",
"sample with three components, copied from a sample with some of the same components",
);
Expand Down

0 comments on commit 252d129

Please sign in to comment.