clearSelectorSpies |
clearSelectorSpies()
|
PUBLIC METHODS |
clearSelectorSpy | ||||||||
clearSelectorSpy(selector: SelectorFunction)
|
||||||||
Removes the spy on a given selector function
Parameters :
|
initializeSelectorSpies |
initializeSelectorSpies()
|
Initialize the selector spies structure |
select | ||||||||||||
select(selectFn: SelectorFunction, props?)
|
||||||||||||
Highjacked ngrx/store select. It checks if the selector function is being spied on and returns it's fake result. Otherwise, it runs the original ngrx/store select
Parameters :
|
spyOnSelector | ||||||||||||
spyOnSelector(selector: SelectorFunction, fakeResult)
|
||||||||||||
Spy on a selector function
Parameters :
|
useSpy | ||||||||
useSpy(spy: SelectorSpy)
|
||||||||
Uses the spy as the return of a select
Parameters :
Returns :
Observable<R>
|
compareScreenshot | ||||||||||||||||||||
compareScreenshot(screenshot: string, baseImagePath: string, threshold: number, pathToScenarioReport: string)
|
||||||||||||||||||||
Compare images helper function. If the comparison fails the 3 images (base/new/diff) will be written inside the reports folder of the actual scenario
Parameters :
Returns :
VisualTestResult
An object of visual test result type |
o3rVisualTest | |||||||||||||||||||||||||||||||||||||||||||||
o3rVisualTest(screenshotObj: string, filenameWithoutExtension: string, device: string, scenarioName: string, pathToScenarioReport: string, threshold: number, generateMode, baseScreenshotsDirPath: string)
|
|||||||||||||||||||||||||||||||||||||||||||||
Helper function to perform a visual test operation
Parameters :
|
saveScreenshot | ||||||||||||||||||||||||||||||
saveScreenshot(screenshot: string, scenarioName: string, device: string, filenameWithoutExtension: string, distScreenshotsDir: string)
|
||||||||||||||||||||||||||||||
It will create a file for the passed screenshot object. The path of the new file will be calculated using the parameters Ex: ./dist-screenshots\OWBooking\windows_chrome_91\fare-page-after-click-on-continue-0.png distScreenshotsDir/scenarionName/device/filenameWithoutExtension.png
Parameters :
|
toBeVisuallySimilar |
toBeVisuallySimilar()
|
Visual test matcher Based on the VisualTestResult object return by compareScreenshots function, this matcher will compute the error messages |
writeScreenshotsDiff | ||||||||||||||||||||||||
writeScreenshotsDiff(pathToScenarioReport: string, screenshotsDirName: string, diff: PNG, baseImage: PNG, currentImg: PNG)
|
||||||||||||||||||||||||
Write the 3 images (base/new/diff) on the reports folder The path inside the reports forlder will be calculated using the parameters
Parameters :
|
convertPromise | ||||
Will be removed in v13, please use Playwright instead | ||||
convertPromise(promise)
|
||||
Converts a webdriver promise to ES6 promise so the rest of the framework handles ES6 promises only
Parameters :
|
generateMockComponent | ||||||||||||
generateMockComponent(componentPath: string, config?)
|
||||||||||||
Generate a mock class base on a component file
Parameters :
Returns :
Type<T>
|
getIOName | ||||||||||||
getIOName(currentNode, decorator, source)
|
||||||||||||
Get the name of the input / output
Parameters :
Returns :
string | undefined
|
getSelector | ||||||||||||||||||||
getSelector(parentNode, source, isInDecorator, isInComponentConfig)
|
||||||||||||||||||||
Get the selector of an angular class
Parameters :
|
isInputNode | |||||||||
isInputNode(node, source)
|
|||||||||
Determine if the node in an input field
Parameters :
Returns :
ts.Decorator
|
isOutputNode | |||||||||
isOutputNode(node, source)
|
|||||||||
Determine if the node in an output field
Parameters :
Returns :
ts.Decorator
|
parseIO | |||||||||
parseIO(parentNode, source)
|
|||||||||
Get the list of Input and Output of a component
Parameters :
Returns :
literal type
|
getPlainText | ||||||
getPlainText(innerText: string)
|
||||||
Remove text formatting (endline etc.) and return the content.
Parameters :
|
initFetchManager |
Will be removed in v13, please use Playwright instead |
initFetchManager()
|
This function initiliaze the FetchManager. Set |
stopFetchManager |
Will be removed in v13, please use Playwright instead |
stopFetchManager()
|
This function stops the FetchManager. Reset |
waitForOtterStable |
Will be removed in v13, please use Playwright instead |
waitForOtterStable()
|
This function waits for all fetchs calls to be resolved and the page to be stable to resolve the promise. It permits to easily run synchronous e2e tests on a flow that uses fetchs calls with protractor. This is very useful in the case of Otter calls to backend because protractor synchronization manager do not care about fetchs calls. This function needs the FetchManager to have been initialized and injected in the browser at the beginning of the
flow with You can ignore the waiting of fetchs by setting |
isSelectorSpyCall | ||||||
isSelectorSpyCall(spy: SelectorSpy)
|
||||||
Identifies if spy is a spyResult or spyCall
Parameters :
Returns :
SelectorSpyCall<R>
|
isVisualTestingEnabled |
isVisualTestingEnabled()
|
Determine if the visual testing is enabled |
prepareVisualTesting | ||||||||
prepareVisualTesting(ignoreClass: string)
|
||||||||
Prepare css rule to hide specific blocks Should be called only once during the visual test.
Parameters :
|
toggleVisualTestingRender | ||||||
toggleVisualTestingRender(enabled: boolean)
|
||||||
Toggle the visual testing view : if it is active, will hide tagged components as grey blocks.
Parameters :
|
mockTranslationModules | ||||||||||||||||||||||||||||||
mockTranslationModules(localizationConfiguration: Partial, translations: MockTranslations, translationCompilerProvider?: Provider, mockPipe, pipeWithPrefix)
|
||||||||||||||||||||||||||||||
Function to get the list of modules required to test component using Localization module
Parameters :
Returns :
ModuleWithProviders[]
List of modules to import in the TestBed |
updateDatesInMocks | |||||||||||||||
updateDatesInMocks(mock: IMock, inputOptions: Partial)
|
|||||||||||||||
Update mock checksum and response body to keep using the same mocks every day with updated dates
Parameters :
|