-
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-1432 feat: support waitings before retries
fix: remove references on TestCafe fix: set actual timeout of tests for Playwright engine fix: turn off unnecessary rule `@typescript-eslint/consistent-return` feat: add `documentUrl` argument to `assertPage` method of pages fix: restore `fullMocks` fixture for internal test of "full mocks"
- Loading branch information
Showing
29 changed files
with
206 additions
and
63 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 |
---|---|---|
|
@@ -27,4 +27,5 @@ export type { | |
SkipTests, | ||
TestFunction, | ||
TestMeta, | ||
WaitBeforeRetry, | ||
} 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 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 @@ | ||
{"/api/product/135865":[{"completionTimeInMs":1729850053899,"duration":"4ms","request":{"method":"POST","query":{"size":"13"},"requestBody":{"cookies":[],"input":17,"model":"samsung","version":"12"},"requestHeaders":{"accept":"*/*","accept-language":"en-US","content-type":"application/json; charset=UTF-8","referer":"https://joomcode.github.io/","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.35 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.35","sec-ch-ua":"\"Chromium\";v=\"130\", \"HeadlessChrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\""},"url":"https://reqres.in/api/product/135865?size=13","utcTimeInMs":1729850053895},"responseBody":{"id":135865,"method":"POST","output":"17","payload":{"id":"135865","cookies":[],"input":17,"model":"samsung","version":"12"},"query":{"size":"13"},"url":"https://reqres.in/api/product/135865?size=13"},"responseHeaders":{"content-type":"application/json; charset=UTF-8","content-length":"201"},"statusCode":200},{"completionTimeInMs":1729850054453,"duration":"4ms","request":{"method":"POST","query":{"size":"13"},"requestBody":{"cookies":[],"input":17,"model":"samsung","version":"12"},"requestHeaders":{"accept":"*/*","accept-language":"en-US","content-type":"application/json; charset=UTF-8","referer":"https://joomcode.github.io/","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.35 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.35","sec-ch-ua":"\"Chromium\";v=\"130\", \"HeadlessChrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\""},"url":"https://reqres.in/api/product/135865?size=13","utcTimeInMs":1729850054449},"responseBody":{"cookies":[],"input":17,"model":"samsung","version":"12","id":"816","createdAt":"2024-10-25T09:54:14.388Z"},"responseHeaders":{"reporting-endpoints":"heroku-nel=https://nel.heroku.com/reports?ts=1729850054&sid=c4c9725f-1ab0-44d8-820f-430df2718e11&s=LZBdsiG2rgFml4T6awFYmhftTlXLyvdfcMob39wiK2I%3D","nel":"{\"report_to\":\"heroku-nel\",\"max_age\":3600,\"success_fraction\":0.005,\"failure_fraction\":0.05,\"response_headers\":[\"Via\"]}","cf-cache-status":"DYNAMIC","etag":"W/\"6c-uS8VtSQALUKVvQbVlIe2ZwBwLRE\"","report-to":"{\"group\":\"heroku-nel\",\"max_age\":3600,\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?ts=1729850054&sid=c4c9725f-1ab0-44d8-820f-430df2718e11&s=LZBdsiG2rgFml4T6awFYmhftTlXLyvdfcMob39wiK2I%3D\"}]}","via":"1.1 vegur","cf-ray":"8d8152f7a8d43cff-CDG","access-control-allow-origin":"*","content-length":"108","date":"Fri, 25 Oct 2024 09:54:14 GMT","content-type":"application/json; charset=utf-8","x-powered-by":"Express","server":"cloudflare"},"statusCode":201}]} |
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
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,21 @@ | ||
import {getRandomId} from './getRandomId'; | ||
import {createHash} from 'node:crypto'; | ||
|
||
import type {RunId} from '../types/internal'; | ||
import type {RunId, Test} from '../types/internal'; | ||
|
||
const runIdBaseLength = 10; | ||
|
||
/** | ||
* Creates new RunId for TestRun. | ||
* @internal | ||
*/ | ||
export const createRunId = (): RunId => getRandomId().replace(/:/g, '-') as RunId; | ||
export const createRunId = (test: Test, retryIndex: number): RunId => { | ||
const data = {...test, testFn: test.testFn.toString()}; | ||
const text = JSON.stringify(data); | ||
const hash = createHash('sha1'); | ||
|
||
hash.update(text); | ||
|
||
const base = hash.digest('base64url').slice(0, runIdBaseLength); | ||
|
||
return `${base}-${retryIndex}` as RunId; | ||
}; |
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
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,23 @@ | ||
import {readFile} from 'node:fs/promises'; | ||
import {join} from 'node:path'; | ||
|
||
import {EVENTS_DIRECTORY_PATH, READ_FILE_OPTIONS} from '../../constants/internal'; | ||
|
||
import {generalLog} from '../generalLog'; | ||
|
||
/** | ||
* Read event object with test run from temporary directory. | ||
* @internal | ||
*/ | ||
export const readEventFromFile = (fileName: string): Promise<string | undefined> => { | ||
const filePath = join(EVENTS_DIRECTORY_PATH, fileName); | ||
|
||
return readFile(filePath, READ_FILE_OPTIONS).catch((error: unknown) => { | ||
generalLog(`Caught an error on reading text of test run event from file "${fileName}"`, { | ||
error, | ||
filePath, | ||
}); | ||
|
||
return undefined; | ||
}); | ||
}; |
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
Oops, something went wrong.