-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add basic e2e test case to filter category
- Loading branch information
1 parent
fd383c3
commit 976d445
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
export class CategoryPageObject { | ||
get filterClickShouldReloadCategory() { | ||
cy.intercept('http://localhost:8181/plentysystems/getFacet').as('getFacet'); | ||
cy.getByTestId('category-filter-0').first().click(); | ||
cy.wait('@getFacet').its('response.statusCode').should('eq', 200) | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CategoryPageObject } from '../../support/pageObjects/CategoryObject'; | ||
|
||
const category = new CategoryPageObject(); | ||
|
||
describe('Smoke: Category Page', () => { | ||
it('[smoke] Category filters should trigger a product data reload', () => { | ||
// We should configure the system so that the first category is set up with filters. | ||
// This way we are independet from the language and the url. | ||
cy.visitAndHydrate('/c/living-room'); | ||
|
||
category.filterClickShouldReloadCategory; | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters