Skip to content

Commit

Permalink
changes after reivew
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Nov 2, 2023
1 parent faab52e commit 258f4a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 8 additions & 8 deletions e2e/cypress/e2e/wire/wire_action.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ describe('wire - filters', () => {

cy.url().should('include', 'Sydney');

cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_1._id}"]`).should('exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_2._id}"]`).should('not.exist');
WirePage.item(WireItems.item_1._id).should('exist');
WirePage.item(WireItems.item_2._id).should('not.exist');

cy.get('[data-test-id="top-search-bar"] form input').clear().type("{enter}");
cy.url().should('not.include', 'Sydney');

cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_1._id}"]`).should('exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_2._id}"]`).should('exist');
WirePage.item(WireItems.item_1._id).should('exist');
WirePage.item(WireItems.item_2._id).should('exist');

/**
FILTERS
Expand All @@ -59,8 +59,8 @@ describe('wire - filters', () => {

cy.url().should('include', `${WireItems.item_1.service[0].name}`);

cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_1._id}"]`).should('exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_2._id}"]`).should('not.exist');
WirePage.item(WireItems.item_1._id).should('exist');
WirePage.item(WireItems.item_2._id).should('not.exist');

FilterPanel.button('clear');

Expand All @@ -70,7 +70,7 @@ describe('wire - filters', () => {
FilterPanel.selectNowDate();
FilterPanel.button('search');

cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_1._id}"]`).should('exist');
cy.get(`[data-test-id="wire-item"][data-test-value="${WireItems.item_2._id}"]`).should('not.exist');
WirePage.item(WireItems.item_1._id).should('exist');
WirePage.item(WireItems.item_2._id).should('not.exist');
});
});
4 changes: 4 additions & 0 deletions e2e/cypress/support/pages/wire.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class WirePageWrapper {
this.filterPanel = new FilterPanelContainer();
}

item(value) {
return cy.get(`[data-test-id="wire-item"][data-test-value="${value}"]`);
}

showAdvancedSearchModal() {
cy.get('[data-test-id="show-advanced-search-panel-btn"]').click();
}
Expand Down

0 comments on commit 258f4a1

Please sign in to comment.