diff --git a/farmdata2/farmdata2_modules/cypress/subtabs.spec.js b/farmdata2/farmdata2_modules/cypress/subtabs.spec.js new file mode 100644 index 00000000..ea878fb6 --- /dev/null +++ b/farmdata2/farmdata2_modules/cypress/subtabs.spec.js @@ -0,0 +1,27 @@ +describe('Test the UI tabs are accurate for each kind of person logged into FarmData2', () => { + + + it('When the manager is logged in the UI should contain FieldKit, BarnKit and FD2 Config tabs', () => { + cy.login('manager1', 'farmdata2') + cy.visit('/farm') + cy.get('a.glyphicons-processed[href="/farm/fd2-field-kit"]').should('exist').and('be.visible'); + cy.get('a.glyphicons-processed[href="/farm/fd2-barn-kit"]').should('exist').and('be.visible'); + cy.get('a.glyphicons-processed[href="/farm/fd2-config"]').should('exist').and('be.visible'); + }) + + it('When worker is logged in UI should contain FieldKit and BarnKit tabs but not FD2Config tab', () => { + cy.login('worker1', 'farmdata2') + cy.visit('/farm') + cy.get('a.glyphicons-processed[href="/farm/fd2-field-kit"]').should('exist').and('be.visible'); + cy.get('a.glyphicons-processed[href="/farm/fd2-barn-kit"]').should('exist').and('be.visible'); + cy.get('a.glyphicons-processed[href="/farm/fd2-config"]').should('not.exist') + }) + + it('When guest is selected none of the three tabs should appear', () => { + cy.login('guest', 'farmdata2') + cy.visit('/farm') + cy.get('a.glyphicons-processed[href="/farm/fd2-field-kit"]').should('not.exist') + cy.get('a.glyphicons-processed[href="/farm/fd2-barn-kit"]').should('not.exist') + cy.get('a.glyphicons-processed[href="/farm/fd2-config"]').should('not.exist') + }) +}) \ No newline at end of file diff --git a/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html b/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html index 1eb9ae52..934922b9 100644 --- a/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html +++ b/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html @@ -1,9 +1,9 @@
-

Transplanting Report

+

Transplanting Report

- Set Dates + Set Dates
{ // Wait here for the maps to load in the page. cy.waitForPage() }) - + context('can set dates and then render the report', () => { it('allows user input of the start and end dates', () => {