Skip to content

Commit 32ee802

Browse files
authored
New Filter Bar (#596)
* 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
1 parent 7dd012d commit 32ee802

File tree

28 files changed

+1606
-27884
lines changed

28 files changed

+1606
-27884
lines changed

cypress/integration/2_existing_engagement_spec.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ describe('existing engagement engagement', () => {
88

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

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

2019
it('filters engagements', () => {
21-
cy.get('#filter_dropdown')
20+
cy.get('#status_dropdown')
2221
.click({ force: true })
2322
.get('[data-testid=active]')
2423
.click();
@@ -32,7 +31,7 @@ describe('existing engagement engagement', () => {
3231
it('sorts engagements', () => {
3332
cy.get('#sort_dropdown')
3433
.click({ force: true })
35-
.get('[data-testid="Start Date Asc"]')
34+
.get('[data-testid="startDate-asc"]')
3635
.click();
3736

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

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

4747
cy.get('[data-cy=reset_button]').click();
48+
cy.get('[aria-label="Search input"]').should('exist').should('have.value', '');
49+
50+
cy.get('[data-cy=category]').type('Category');
51+
cy.get('[data-cy=engagement-customer]').type('cypress hill')
52+
53+
cy.get(`[aria-label="Open advanced search"]`)
54+
.click();
55+
56+
cy.get('[aria-label="Search input"]').should('exist').should('have.value', "cypress hill category='Category'");
57+
58+
cy.get('[aria-label="Reset"]').click();
4859

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

5162
cy.get('[data-cy=engagement_cards_section]')
5263
.find('[data-cy=view_engagement_button]')

0 commit comments

Comments
 (0)