-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FI-494: add selectors with custom methods
- Loading branch information
Showing
38 changed files
with
439 additions
and
200 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,62 @@ | ||
import { | ||
htmlElementSelector, | ||
createSelector, | ||
locatorIdSelector, | ||
createSelectorByCss, | ||
} from 'e2ed/selectors'; | ||
|
||
// @ts-expect-error: wrong number of arguments | ||
htmlElementSelector.findByTestId(); | ||
// @ts-expect-error: wrong type of arguments | ||
htmlElementSelector.findByTestId(0); | ||
// ok | ||
htmlElementSelector.findByTestId('id'); | ||
// ok | ||
htmlElementSelector.findByTestId('id').findByTestId('id2'); | ||
// ok | ||
htmlElementSelector.findByTestId('id').find('.test-children'); | ||
// ok | ||
htmlElementSelector.find('body').findByTestId('id'); | ||
|
||
// ok | ||
createSelector('id').findByTestId('id').find('body').findByTestId('id'); | ||
// ok | ||
createSelectorByCss('id').findByTestId('id').find('body').findByTestId('id'); | ||
// ok | ||
locatorIdSelector('id').findByTestId('id').find('body').findByTestId('id'); | ||
|
||
// ok | ||
htmlElementSelector.filterByTestId('id'); | ||
// ok | ||
htmlElementSelector.parentByTestId('id'); | ||
// ok | ||
htmlElementSelector.childByTestId('id'); | ||
// ok | ||
htmlElementSelector.siblingByTestId('id'); | ||
// ok | ||
htmlElementSelector.nextSiblingByTestId('id'); | ||
// ok | ||
htmlElementSelector.prevSiblingByTestId('id'); | ||
|
||
// ok | ||
htmlElementSelector.filterByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.findByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.parentByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.childByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.siblingByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.nextSiblingByTestProp('prop', 'value'); | ||
// ok | ||
htmlElementSelector.prevSiblingByTestProp('prop', 'value'); | ||
|
||
// ok | ||
htmlElementSelector.getTestProp('prop'); | ||
Check failure on line 57 in autotests/tests/internalTypeTests/selectors.skip.ts GitHub Actions / lint
|
||
// ok | ||
htmlElementSelector.hasTestProp('prop'); | ||
Check failure on line 59 in autotests/tests/internalTypeTests/selectors.skip.ts GitHub Actions / lint
|
||
|
||
// ok | ||
htmlElementSelector.getDescription(); |
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
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
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
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
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
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
Oops, something went wrong.