-
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-1025 fix: stop docker container if tests are interrupted externally
chore: update alpine to 3.18.4 (so update Chrome to 117, etc) chore: update devDependencies (@types/node) fix: add `bash` to docker container refactor: rename files according to the names of exported functions
- Loading branch information
Showing
29 changed files
with
218 additions
and
98 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
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import {createSelectors} from 'e2ed/selectors'; | ||
|
||
export {inputSelector} from './inputSelector'; | ||
|
||
export const {createSelector, createSelectorByCss, locatorIdSelector, htmlElementSelector} = | ||
createSelectors({ | ||
getLocatorAttributeName: (property) => | ||
property === 'id' ? 'data-testid' : `data-test-${property}`, | ||
}); | ||
export { | ||
createSelector, | ||
createSelectorByCss, | ||
htmlElementSelector, | ||
locatorIdSelector, | ||
} from './selectorFunctions'; |
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,10 @@ | ||
import {createSelectorFunctions} from 'e2ed/selectors'; | ||
|
||
/** | ||
* Main functions for creating selectors and working with selectors. | ||
*/ | ||
export const {createSelector, createSelectorByCss, locatorIdSelector, htmlElementSelector} = | ||
createSelectorFunctions({ | ||
getLocatorAttributeName: (parameter) => | ||
parameter === 'id' ? 'data-testid' : `data-test-${parameter}`, | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type {CreateSelector, CreateSelectorByCss, Selector} from '../types/internal'; | ||
|
||
/** | ||
* Creates `createSelectorByCss` function. | ||
* @internal | ||
*/ | ||
export const createSelectorByCssCreator = (createSelector: CreateSelector): CreateSelectorByCss => { | ||
/** | ||
* Creates selector of page elements by CSS selector. | ||
*/ | ||
const createSelectorByCss = (cssSelectorString: string): Selector => | ||
createSelector(cssSelectorString); | ||
|
||
return createSelectorByCss; | ||
}; |
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
7 changes: 4 additions & 3 deletions
7
src/selectors/htmlElementSelector.ts → src/selectors/htmlElementSelectorCreator.ts
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,7 +1,8 @@ | ||
import type {CreateSelector, Selector} from '../types/internal'; | ||
|
||
/** | ||
* Creates selector of page HTML element ("documentElement"). | ||
* @internal | ||
*/ | ||
export const htmlElementSelectorCreator = (createSelector: CreateSelector): Selector => | ||
/** | ||
* Selector of page HTML element ("documentElement"). | ||
*/ | ||
createSelector('html'); |
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 +1 @@ | ||
export {createSelectors} from './createSelectors'; | ||
export {createSelectorFunctions} from './createSelectorFunctions'; |
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,6 +1,10 @@ | ||
import {createSelectors} from './createSelectors'; | ||
import {createSelectorFunctions} from './createSelectorFunctions'; | ||
|
||
export const {htmlElementSelector} = createSelectors({ | ||
getLocatorAttributeName: (property) => | ||
property === 'id' ? 'data-testid' : `data-test-${property}`, | ||
/** | ||
* Internal implementation of `htmlElementSelector` selector. | ||
* @internal | ||
*/ | ||
export const {htmlElementSelector} = createSelectorFunctions({ | ||
getLocatorAttributeName: (parameter) => | ||
parameter === 'id' ? 'data-testid' : `data-test-${parameter}`, | ||
}); |
13 changes: 11 additions & 2 deletions
13
src/selectors/locatorIdSelector.ts → src/selectors/locatorIdSelectorCreator.ts
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.