From 20dba40b122973e0081bf52e007f080fb644403e Mon Sep 17 00:00:00 2001 From: theahegde Date: Fri, 19 Apr 2024 09:56:04 -0400 Subject: [PATCH 1/3] 1,4,5,6 --- .../seedingInput.traySeeding.default.spec.js | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js diff --git a/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js b/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js new file mode 100644 index 00000000..96c2b9b8 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js @@ -0,0 +1,27 @@ +describe("Check Tray Seeding Section", () => { + beforeEach(() => { + + cy.login("manager1", "farmdata2"); + cy.visit("farmdata2/farmdata2_modules/fd2_field_kit/seedingInput"); + + // Select the "Tray" button to display the Tray Seeding section + cy.get('[data-cy="tray-seedings"]').click(); + }); + + it("should display the Tray Seeding section fields correctly", () => { + // Check for visibility of the Tray Seeding section + cy.get("[data-cy='tray-area-selection']").should('be.visible'); + cy.get("[data-cy='num-cell-input']").should('be.visible'); + cy.get("[data-cy='num-tray-input']").should('be.visible'); + cy.get("[data-cy='num-seed-input']").should('be.visible'); + + + + // Verify that input fields for cells/tray, trays, and seeds are empty and enabled + cy.get('[data-cy="num-cell-input"] input').should('be.enabled').and('have.value', ''); + cy.get('[data-cy="num-tray-input"] input').should('be.enabled').and('have.value', ''); + cy.get('[data-cy="num-seed-input"] input').should('be.enabled').and('have.value', ''); + }); + }); + + \ No newline at end of file From 455c43fa93dcb2222ae139a7a45a98ac148dc3ff Mon Sep 17 00:00:00 2001 From: theahegde Date: Fri, 19 Apr 2024 14:05:50 -0400 Subject: [PATCH 2/3] name changes --- ...Seeding.default.spec.js => seedingInput.tray.defaults.spec.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/{seedingInput.traySeeding.default.spec.js => seedingInput.tray.defaults.spec.js} (100%) diff --git a/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js b/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.tray.defaults.spec.js similarity index 100% rename from farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.traySeeding.default.spec.js rename to farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.tray.defaults.spec.js From 004ee4d7da3cb74f6f777e76e23168824095c6fd Mon Sep 17 00:00:00 2001 From: theahegde Date: Thu, 2 May 2024 13:50:37 -0400 Subject: [PATCH 3/3] issue2 --- .../seedingReportTraySummary.defaults.spec.js | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReportTraySummary.defaults.spec.js diff --git a/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReportTraySummary.defaults.spec.js b/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReportTraySummary.defaults.spec.js new file mode 100644 index 00000000..7c1f1c18 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReportTraySummary.defaults.spec.js @@ -0,0 +1,37 @@ +describe('Tray Seeding Summary Table Validation', () => { + beforeEach(() => { + cy.login('manager1', 'farmdata2'); + cy.visit('/farm/fd2-barn-kit/seedingReport'); + cy.waitForPage(); + + }); + + it('exists and is visible when "All" or "Tray Seedings" is selected', () => { + cy.get("[data-cy=start-date-select]").type("2019-01-01"); + cy.get("[data-cy=end-date-select]").type("2019-03-01"); + cy.get("[data-cy=generate-rpt-btn]").click(); + ['All', 'Tray Seedings'].forEach(type => { + cy.get('[data-cy="seeding-type-dropdown"] > [data-cy="dropdown-input"]').select(type); + cy.get('[data-cy="tray-summary"]').should('be.visible'); + }); + }); + + it('does not exist or is not visible when "Direct Seedings" is selected', () => { + cy.get("[data-cy=start-date-select]").type("2019-01-01"); + cy.get("[data-cy=end-date-select]").type("2019-03-01"); + cy.get("[data-cy=generate-rpt-btn]").click(); + cy.get('[data-cy="seeding-type-dropdown"] > [data-cy="dropdown-input"]').select('Direct Seedings'); + cy.get('[data-cy="tray-summary"]').should('not.exist'); + }); + + it('the No Logs message appears with a table with no logs', () => { + cy.get("[data-cy=start-date-select]").type("2021-01-01"); + + cy.get('[data-cy=end-date-select]') + .type('2021-03-01') + cy.get('[data-cy=generate-rpt-btn]').click() + cy.get('[data-cy=no-logs-message]').should('be.visible') + + + }); + }); \ No newline at end of file