-
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-1010 fix: add runtime tests for `createPageObjectsFromMultiLocator…
…` utility
- Loading branch information
Showing
11 changed files
with
95 additions
and
11 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
22 changes: 22 additions & 0 deletions
22
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type {CreateLocator} from 'e2ed/createLocator'; | ||
import type {Selector, TestRunButtonLocator} from 'e2ed/types'; | ||
|
||
type Locator = CreateLocator<TestRunButtonLocator, Selector>; | ||
|
||
/** | ||
* `TestRun` button. | ||
*/ | ||
export class TestRunButton { | ||
readonly locator: Locator; | ||
|
||
constructor(locator: Locator) { | ||
this.locator = locator; | ||
} | ||
|
||
/** | ||
* Element with `mainParams` of test. | ||
*/ | ||
get parameters(): Selector { | ||
return this.locator.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {E2edReportExample} from './E2edReportExample'; |
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,15 @@ | ||
import {createSelectorByCss} from 'autotests/selectors'; | ||
import {createLocator, getCssSelectorFromAttributesChain} from 'e2ed/createLocator'; | ||
|
||
import type {ReportRootLocator, Selector} from 'e2ed/types'; | ||
|
||
/** | ||
* Project root locator, mapped to `Selector`. | ||
*/ | ||
export const rootLocator = createLocator<ReportRootLocator, Selector>('app', { | ||
mapAttributesChain: (attributesChain) => { | ||
const cssSelector = getCssSelectorFromAttributesChain(attributesChain); | ||
|
||
return createSelectorByCss(cssSelector.replace('data-test-runhash', 'data-runhash')); | ||
}, | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export type {RootLocator as ReportRootLocator} from './rootLocator'; | ||
/** @internal */ | ||
export {renderReportToHtml} from './renderReportToHtml'; | ||
export type {TestRunButtonLocator} from './renderTestRunButton'; |
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