-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter products by channel availability test (#4540)
- Loading branch information
1 parent
9870979
commit d06043b
Showing
6 changed files
with
88 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,5 @@ | ||
--- | ||
"saleor-dashboard": minor | ||
--- | ||
|
||
Filter products by channel availability test |
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
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
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,37 @@ | ||
import type { Page } from "@playwright/test"; | ||
|
||
export class FiltersPage { | ||
readonly page: Page; | ||
constructor( | ||
page: Page, | ||
readonly saveFiltersButton = page.getByTestId("save-filters-button"), | ||
readonly rightInput = page.getByTestId("right-0"), | ||
readonly dropDownOptions = page.getByTestId("select-option"), | ||
readonly leftInput = page.getByTestId("left-0"), | ||
readonly showFiltersButton = page.getByTestId("filters-button"), | ||
readonly addFilterButton = page.getByTestId("add-filter-button"), | ||
) { | ||
this.page = page; | ||
} | ||
|
||
async clickAddFilterButton() { | ||
await this.addFilterButton.click(); | ||
} | ||
async clickLeftInput() { | ||
await this.leftInput.click(); | ||
} | ||
async clickRightInput() { | ||
await this.rightInput.click(); | ||
} | ||
async clickSaveFiltersButton() { | ||
await this.saveFiltersButton.click(); | ||
} | ||
|
||
async pickFilter(filterKind: string, channelName: string) { | ||
await this.clickAddFilterButton(); | ||
await this.clickLeftInput(); | ||
await this.dropDownOptions.filter({ hasText: filterKind }).click(); | ||
await this.clickRightInput(); | ||
await this.dropDownOptions.filter({ hasText: channelName }).click(); | ||
} | ||
} |
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
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