Skip to content

Commit

Permalink
New Filter Bar (#596)
Browse files Browse the repository at this point in the history
* engagement filter redo

* test related

* fix issue with toolbar chips

* fix space error in Engagement search box. Fix cypress spec 2

* fix issue when clicking on engagement status links after original load

* lint failure avoidance

* fix page reload filter hold

* test
  • Loading branch information
mcanoy authored Apr 29, 2022
1 parent 7dd012d commit 32ee802
Show file tree
Hide file tree
Showing 28 changed files with 1,606 additions and 27,884 deletions.
23 changes: 17 additions & 6 deletions cypress/integration/2_existing_engagement_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ describe('existing engagement engagement', () => {

it('searches for an engagement', () => {
cy.visit('/app/engagements/all');
cy.get('[data-cy=search_input]').should('exist');
cy.get('[data-cy=search_input]').type('cypress');
cy.get('[data-cy=search_input]').should('exist').type('cypress');

cy.get('[data-cy=engagement_cards_section]')
.find('[data-cy=view_engagement_button]')
Expand All @@ -18,7 +17,7 @@ describe('existing engagement engagement', () => {
});

it('filters engagements', () => {
cy.get('#filter_dropdown')
cy.get('#status_dropdown')
.click({ force: true })
.get('[data-testid=active]')
.click();
Expand All @@ -32,7 +31,7 @@ describe('existing engagement engagement', () => {
it('sorts engagements', () => {
cy.get('#sort_dropdown')
.click({ force: true })
.get('[data-testid="Start Date Asc"]')
.get('[data-testid="startDate-asc"]')
.click();

cy.get('[data-cy=engagement_cards_section]')
Expand All @@ -42,11 +41,23 @@ describe('existing engagement engagement', () => {
});

it('reset search criteria', () => {
cy.get('[data-cy=search_input]').type('cypress');
cy.get(`[aria-label="Open advanced search"]`)
.click();

cy.get('[data-cy=reset_button]').click();
cy.get('[aria-label="Search input"]').should('exist').should('have.value', '');

cy.get('[data-cy=category]').type('Category');
cy.get('[data-cy=engagement-customer]').type('cypress hill')

cy.get(`[aria-label="Open advanced search"]`)
.click();

cy.get('[aria-label="Search input"]').should('exist').should('have.value', "cypress hill category='Category'");

cy.get('[aria-label="Reset"]').click();

cy.get('[data-cy=search_input]').should('have.value', '');
cy.get('[aria-label="Search input"]').should('exist').should('have.value', '');

cy.get('[data-cy=engagement_cards_section]')
.find('[data-cy=view_engagement_button]')
Expand Down
Loading

0 comments on commit 32ee802

Please sign in to comment.