-
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-1471 fix:
error.setMessage
method in UI-mode
refactor: turn on `--isolatedDeclarations` TypeScript option chore: update Playwright to 1.48.1 chore: update TypeScript to 5.6.3 and other `devDependencies` fix: remove `createSelectorByCss` function and `htmlElementSelector` from API fix: supports regexps in `withText` method of `Selector` FI-1477 feat: add action `selectOption`
- Loading branch information
Showing
58 changed files
with
287 additions
and
289 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
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 |
---|---|---|
|
@@ -25,5 +25,6 @@ export type { | |
MapLogPayloadInReport, | ||
Pack, | ||
SkipTests, | ||
TestFunction, | ||
TestMeta, | ||
} from './types'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
import {useContext} from 'e2ed'; | ||
|
||
import type {Cookie} from 'e2ed/types'; | ||
import type {ClearContext, Cookie, GetContext, SetContext} from 'e2ed/types'; | ||
|
||
type Cookies = readonly Cookie[]; | ||
|
||
const [get, set, clear] = useContext<Cookies>(); | ||
|
||
/** | ||
* Get page cookies, that will be added when navigating to the page. | ||
*/ | ||
export const getPageCookies: GetContext<Cookies> = get; | ||
|
||
/** | ||
* Set page cookies, that will be added when navigating to the page. | ||
*/ | ||
export const setPageCookies: SetContext<Cookies> = set; | ||
|
||
/** | ||
* Get, set and clear page cookies, that will be added when navigating to the page. | ||
* Clear page cookies, that will be added when navigating to the page. | ||
*/ | ||
export const [getPageCookies, setPageCookies, clearPageCookies] = useContext<readonly Cookie[]>(); | ||
export const clearPageCookies: ClearContext = clear; |
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,20 @@ | ||
import {useContext} from 'e2ed'; | ||
|
||
import type {Headers} from 'e2ed/types'; | ||
import type {ClearContext, GetContext, Headers, SetContext} from 'e2ed/types'; | ||
|
||
const [get, set, clear] = useContext<Headers>(); | ||
|
||
/** | ||
* Get additional page request headers, that will be added when navigating to the page. | ||
*/ | ||
export const getPageRequestHeaders: GetContext<Headers> = get; | ||
|
||
/** | ||
* Set additional page request headers, that will be added when navigating to the page. | ||
*/ | ||
export const setPageRequestHeaders: SetContext<Headers> = set; | ||
|
||
/** | ||
* Get, set and clear additional page request headers, that will be added when navigating to the page. | ||
* Clear additional page request headers, that will be added when navigating to the page. | ||
*/ | ||
export const [getPageRequestHeaders, setPageRequestHeaders, clearPageRequestHeaders] = | ||
useContext<Headers>(); | ||
export const clearPageRequestHeaders: ClearContext = clear; |
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
6 changes: 4 additions & 2 deletions
6
autotests/selectors/selectorFunctions.ts → autotests/selectors/createSelector.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {createSelector} from './createSelector'; | ||
|
||
import type {Selector} from 'e2ed/types'; | ||
|
||
/** | ||
* Selector of HTML element. | ||
*/ | ||
export const htmlElementSelector: Selector = 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,3 +1,4 @@ | ||
export {createSelector} from './createSelector'; | ||
export {htmlElementSelector} from './htmlElementSelector'; | ||
export {inputSelector} from './inputSelector'; | ||
export {cssSelector, locator, testId} from './locator'; | ||
export {createSelector, createSelectorByCss, htmlElementSelector} 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import {createSelectorByCss} from 'autotests/selectors'; | ||
import {createSelector} from './createSelector'; | ||
|
||
import type {Selector} from 'e2ed/types'; | ||
|
||
/** | ||
* Selector of input (or textarea) element by name. | ||
*/ | ||
export const inputSelector = (name: string): Selector => createSelectorByCss(`[name="${name}"]`); | ||
export const inputSelector = (name: string): Selector => createSelector(`[name="${name}"]`); |
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,18 +1,32 @@ | ||
import {attributesOptions} from 'autotests/constants'; | ||
import {createTestUtils} from 'e2ed/createLocator'; | ||
|
||
import {createSelectorByCss} from './selectorFunctions'; | ||
import {createSelector} from './createSelector'; | ||
|
||
import type {LocatorFunction} from 'create-locator'; | ||
import type {Selector} from 'e2ed/types'; | ||
|
||
/** | ||
* Test utils, that produce `Selector`. | ||
* Test utils, that produce `Selector`, CSS selector string and `testId` string. | ||
*/ | ||
export const { | ||
locator, | ||
selector: cssSelector, | ||
testId, | ||
} = createTestUtils({ | ||
const utils = createTestUtils({ | ||
attributesOptions, | ||
createLocatorByCssSelector: (selector) => | ||
createSelectorByCss(selector.replace('data-test-runhash', 'data-runhash')), | ||
createSelector(selector.replace('data-test-runhash', 'data-runhash')), | ||
supportWildcardsInCssSelectors: true, | ||
}); | ||
|
||
/** | ||
* Locator, that produce `Selector`. | ||
*/ | ||
export const locator: LocatorFunction<Selector> = utils.locator; | ||
|
||
/** | ||
* Locator, that produce CSS selector string. | ||
*/ | ||
export const cssSelector: LocatorFunction<string> = utils.selector; | ||
|
||
/** | ||
* Locator, that produce `testId` string. | ||
*/ | ||
export const testId: LocatorFunction<string> = utils.testId; |
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.