-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5253 from Sage/cypress_date_range
test(date-range): refactor for cypress tests
- Loading branch information
Showing
6 changed files
with
455 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import LABEL_PREVIEW from "./locators"; | ||
import { LABEL } from "../locators"; | ||
import DATE_RANGE from "./locators"; | ||
|
||
// component preview locators | ||
const labelPreview = (index) => | ||
cy.get(LABEL_PREVIEW).find(`:nth-child(${index})`).find(LABEL); | ||
|
||
export default labelPreview; | ||
export const dateRange = (index) => cy.get(DATE_RANGE).children().eq(index); | ||
export const dateRangeComponentLabel = (index) => | ||
cy.get(DATE_RANGE).find(LABEL).eq(index); | ||
export const dateRangeComponentInput = (index) => | ||
cy.get(DATE_RANGE).find("input").eq(index); |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// component preview locators | ||
const LABEL_PREVIEW = 'div[data-component="date-range"]'; | ||
const DATE_RANGE = '[data-component="date-range"]'; | ||
|
||
export default LABEL_PREVIEW; | ||
export default DATE_RANGE; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.