Skip to content

Commit

Permalink
Cleanup commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-robots committed Oct 11, 2023
1 parent 5b2d72f commit 7b27e2f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Set code coverage commit status
continue-on-error: true
working-directory: packages/end-to-end
run: npx set-gh-status
run: npx set-gh-status -t ${{secrets.GITHUB_TOKEN}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_SHA: ${{ github.event.after }}
20 changes: 10 additions & 10 deletions packages/end-to-end/cypress/e2e/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ describe('Tasks', () => {

after(() => {});

// it('CheckTasksNavigation', () => {
// // Add a crop variety
// cy.get('[data-cy=navbar-hamburger]').should('exist').click();
// cy.contains(translation['SLIDE_MENU']['TASKS']).should('exist').click();
// cy.contains(translation['TASK']['ADD_TASK']).should('exist').and('not.be.disabled');
// cy.visit('/');
it('CheckTasksNavigation', () => {
// Add a crop variety
cy.get('[data-cy=navbar-hamburger]').should('exist').click();
cy.contains(translation['SLIDE_MENU']['TASKS']).should('exist').click();
cy.contains(translation['TASK']['ADD_TASK']).should('exist').and('not.be.disabled');
cy.visit('/');

// cy.get('[data-cy=home-taskButton]').should('exist').and('not.be.disabled').click();
cy.get('[data-cy=home-taskButton]').should('exist').and('not.be.disabled').click();

// cy.contains(translation['TASK']['ADD_TASK']).should('exist').and('not.be.disabled');
// cy.visit('/');
// });
cy.contains(translation['TASK']['ADD_TASK']).should('exist').and('not.be.disabled');
cy.visit('/');
});

it('CreateCleanTask', () => {
cy.get('[data-cy=navbar-hamburger]').should('exist').click();
Expand Down
22 changes: 2 additions & 20 deletions packages/end-to-end/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Cypress.Commands.add(

cy.intercept('POST', '**/user').as('createUser');
cy.get('[data-cy=getStarted]').should('exist').and('not.be.disabled').click();

cy.addFarm('UBC FARM', '49.250833, -123.2410777');
cy.onboardCompleteQuestions('Manager');
cy.acceptSlideMenuSpotlights(crop_menu_name);
Expand Down Expand Up @@ -160,17 +159,10 @@ Cypress.Commands.add('createFirstLocation', () => {
cy.get('[data-cy=spotlight-next]').should('exist').and('not.be.disabled').click();
cy.get('[data-cy=map-addFeature]').should('exist').and('not.be.disabled').click();

cy.contains('Field').should('be.visible').click();
// Find the 5th + which is a field
cy.contains(':nth-child(5)', '+').click();

cy.get('[data-cy="map-selection"]').should('be.visible');

// cy.get('[data-cy=map-drawer]').should('exist').and('not.be.disabled').click();

// cy.get('[data-cy=map-mapContainer]', { timeout: 60 * 1000 })
// .find('button', { timeout: 60 * 1000 })
// .eq(2)
// .should('exist')
// .and('be.visible');
cy.get('[data-cy=mapTutorial-continue]').should('exist').and('not.be.disabled').click();

cy.get('[data-cy=map-mapContainer]').click(500, 300);
Expand Down Expand Up @@ -198,16 +190,6 @@ Cypress.Commands.add('createFirstLocation', () => {
cy.get('div[data-cy="snackBar"]').find('[class*="button"]:first').click();

cy.waitForReact();

// Confirm that location exists
cy.visit('/');
cy.get('[data-cy=home-farmButton]').should('exist').and('not.be.disabled').click({ force: true });
cy.get('[data-cy=navbar-option]')
.eq(1)
.should('exist')
.and('not.be.disabled')
.click({ force: true });
cy.contains('First Field').should('be.visible');
});

Cypress.Commands.add('acceptSlideMenuSpotlights', (crop_menu_name) => {
Expand Down

0 comments on commit 7b27e2f

Please sign in to comment.