diff --git a/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReport.message.spec.js b/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReport.message.spec.js new file mode 100644 index 00000000..68b3b8fb --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReport.message.spec.js @@ -0,0 +1,29 @@ +describe('Test the message of the BarnKit Seeding Report if there are no logs', () => { + beforeEach(() => { + cy.login('manager1', 'farmdata2') + + // Cypress clears the local storage between each test. + // So we need to save it at the end of each test (see afterEach) + // and then restore before each test (here). + cy.restoreLocalStorage() + cy.visit('/farm/fd2-barn-kit/seedingReport') + }) + + afterEach(() => { + // Save the local storage at the end of each test so + // that it can be restored at the start of the next + cy.saveLocalStorage() + }) + + it('Test the text of the message if there are no rows in the table', () => { + cy.get('[data-cy=start-date-select]') + .type('2024-01-01') + cy.get('[data-cy=end-date-select]') + .type('2024-01-02') + cy.get('[data-cy=generate-rpt-btn]') + .click() + + cy.get('[data-cy=no-logs-message]') + .contains('No Logs Found in These Dates') + }) +}) \ No newline at end of file diff --git a/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.data.defaults.spec.js b/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.data.defaults.spec.js new file mode 100644 index 00000000..cd4dbec7 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_field_kit/seedingInput/seedingInput.data.defaults.spec.js @@ -0,0 +1,37 @@ +describe('Tests the default contents of the Data section of the Seeding Input Form', () => { + beforeEach(() => { + cy.login('manager1', 'farmdata2') + + // Cypress clears the local storage between each test. + // So we need to save it at the end of each test (see afterEach) + // and then restore beore each test (here). + cy.restoreLocalStorage() + cy.visit('/farm/fd2-field-kit/seedingInput') + }) + + afterEach(() => { + // Save the local storage at the end of each test so + // that it can be restored at the start of the next + cy.saveLocalStorage() + }) + + //Gabe + it('', () => { + + }) + + //Spencer + it('', () => { + + }) + + //Maximo + it('Tests the crop dropdown so that it does not have a selected value and the correct crop list', () => { + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input]").should("have.text", "") + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input] > [data-cy=option0]").should("have.text", "ARUGULA") + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input] > [data-cy=option8]").should("have.text", "BROCCOLI") + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input] > [data-cy=option32]").should("have.text", "GARLIC-SCAPES") + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input] > [data-cy=option110]").should("have.text", "ZUCCHINI") + cy.get("[data-cy=crop-selection] > [data-cy=dropdown-input]").children().should("have.length", 111) + }) +}) \ No newline at end of file diff --git a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module index 167ca8ef..482a2b56 100644 --- a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module +++ b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module @@ -61,6 +61,14 @@ function fd2_school_menu() { ); // Add items blocks for new sub-tabs here. + $items['farm/fd2-school/html'] = array( + 'title' => 'HTML', + 'type' => MENU_LOCAL_TASK, + 'page callback' => 'fd2_school_view', + 'page arguments' => array('html'), + 'access arguments' => array('view fd2 school'), + 'weight' => 110, + ); return $items; }; diff --git a/farmdata2/farmdata2_modules/fd2_school/html/html.html b/farmdata2/farmdata2_modules/fd2_school/html/html.html new file mode 100644 index 00000000..ca6316ec --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_school/html/html.html @@ -0,0 +1,74 @@ +
+

Harvest Report

+

This page is a mockup of a simplified harvest report.

+ + + + +

+ + + + + + +

+ + + + + + + +

+ + + +
+ +

My Sample Harvest Report

+

Details:

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
DateAreaCropYieldUnits
05/02/2018Chuau-1Kale10Bunches
05/05/2018SQ7Kale7Bunches
+