-
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-1346 chore: update
create-locator
to 0.0.24
chore: update devDependencies (TypeScript to 5.6, etc) chore: update Playwright to 1.47.2 feat: replace old locator API to new one
- Loading branch information
Showing
27 changed files
with
185 additions
and
223 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,10 @@ | ||
import type {AttributesOptions} from 'create-locator'; | ||
|
||
/** | ||
* Attributes options for locators. | ||
*/ | ||
export const attributesOptions = { | ||
parameterAttributePrefix: 'data-test-', | ||
testIdAttribute: 'data-testid', | ||
testIdSeparator: '-', | ||
} as const satisfies AttributesOptions; |
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,2 @@ | ||
export {attributesOptions} from './attributesOptions'; | ||
export {DEFAULT_PASSWORD} from './user'; |
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
15 changes: 8 additions & 7 deletions
15
autotests/pageObjects/pages/E2edReportExample/TestRunButton.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,22 +1,23 @@ | ||
import type {CreateLocator} from 'e2ed/createLocator'; | ||
import type {Selector, TestRunButtonLocator} from 'e2ed/types'; | ||
import {locator} from 'autotests/selectors'; | ||
|
||
type Locator = CreateLocator<TestRunButtonLocator, Selector>; | ||
import type {Selector} from 'e2ed/types'; | ||
|
||
const testId = 'TestRunButton'; | ||
|
||
/** | ||
* `TestRun` button. | ||
*/ | ||
export class TestRunButton { | ||
readonly locator: Locator; | ||
readonly selector: Selector; | ||
|
||
constructor(locator: Locator) { | ||
this.locator = locator; | ||
constructor(selector: Selector) { | ||
this.selector = selector; | ||
} | ||
|
||
/** | ||
* Element with `mainParams` of test. | ||
*/ | ||
get parameters(): Selector { | ||
return this.locator.parameters(); | ||
return locator(testId, 'parameters'); | ||
} | ||
} |
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,14 @@ | ||
import {attributesOptions} from 'autotests/constants'; | ||
import {createTestUtils} from 'e2ed/createLocator'; | ||
|
||
import {createSelectorByCss} from './selectorFunctions'; | ||
|
||
/** | ||
* Test utils, that produce `Selector`. | ||
*/ | ||
export const {chain, locator} = createTestUtils({ | ||
attributesOptions, | ||
createLocatorByCssSelector: (cssSelector) => | ||
createSelectorByCss(cssSelector.replace('data-test-runhash', 'data-runhash')), | ||
supportWildcardsInCssSelectors: true, | ||
}); |
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
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
Oops, something went wrong.