Skip to content

Commit

Permalink
Revert "feature: Added an edit all checkbox for hourly form"
Browse files Browse the repository at this point in the history
This reverts commit 42d087a.
  • Loading branch information
ob6160 committed May 10, 2023
1 parent 42d087a commit 304f76b
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 309 deletions.
37 changes: 0 additions & 37 deletions cypress/e2e/desktop/add.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,43 +147,6 @@ describe('Adding new toilets to the platform', () => {
cy.contains('08:00 - 19:00').should('not.exist');
});

it('should edit all hours when edit all check box is clicked and the toilet is open', () => {
cy.visit('/loos/add');

const toiletName = faker.word.adjective() + ' ' + faker.word.noun();
cy.findByPlaceholderText('e.g. Sainsburys or street name').type(
toiletName
);
//If user clicks edit all hours, enables editing of all hours
cy.get('[name=has-opening-times]').click();
cy.get('[name=edit-all-day-hours]').click();
cy.get('[name=monday-is-open]').click();
cy.get('[name=tuesday-is-open]').click();

cy.get('[name=monday-opens]').type('08:00');
cy.get('[name=monday-closes]').type('16:00');

cy.get('[name=monday-opens]').contains('08:00');
cy.get('[name=monday-closes]').contains('16:00');

cy.get('[name=tuesday-opens]').contains('08:00');
cy.get('[name=tuesday-closes]').contains('16:00');

cy.get('[name=wednesday-opens]').contains('');
cy.get('[name=wednesday-closes]').contains('');

//If user disables edit all hours, disables editing
cy.get('[name=edit-all-day-hours]').click();
cy.get('[name=monday-opens]').type('09:00');
cy.get('[name=monday-closes]').type('17:00');

cy.get('[name=monday-opens]').contains('09:00');
cy.get('[name=monday-closes]').contains('17:00');

cy.get('[name=tuesday-opens]').contains('08:00');
cy.get('[name=tuesday-closes]').contains('16:00');
});

it('should add a toilet after submitting the form and retain all submitted data', () => {
cy.visit('/loos/add?lat=51.92008861374827&lng=0.10883331298828125');
const toiletName = faker.word.adjective() + ' ' + faker.word.noun();
Expand Down
Loading

1 comment on commit 304f76b

@vercel
Copy link

@vercel vercel bot commented on 304f76b May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.