diff --git a/uui-e2e-tests/framework/fixtures/previewPage/previewPage.ts b/uui-e2e-tests/framework/fixtures/previewPage/previewPage.ts index 1d47407d96..834c6bfd99 100644 --- a/uui-e2e-tests/framework/fixtures/previewPage/previewPage.ts +++ b/uui-e2e-tests/framework/fixtures/previewPage/previewPage.ts @@ -2,7 +2,7 @@ import type { Page, Locator } from '@playwright/test'; import { PreviewPageParams, TClip, TEngine } from '../../types'; import { PlayWrightInterfaceName, PREVIEW_URL } from '../../constants'; import { CdpSessionWrapper } from './cdpSessionWrapper'; -import { slowTestExpectTimeout, expectTimeout } from '../../../playwright.config'; +import { slowTestExpectTimeout } from '../../../playwright.config'; export class PreviewPage { private readonly locators: { @@ -40,7 +40,7 @@ export class PreviewPage { await this.page.waitForTimeout(30); const clip = await this.locators.regionScreenshotContent.boundingBox() as TClip; // have to increase timeout due to a strange bug in Playwright: TypeError: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined - const res: { fullPage?: boolean; clip: TClip; timeout?: number } = { fullPage: true, clip, timeout: expectTimeout * 2 }; + const res: { fullPage?: boolean; clip: TClip; timeout?: number } = { fullPage: true, clip }; if (isSlow) { res.timeout = slowTestExpectTimeout; } diff --git a/uui-e2e-tests/framework/utils/failedTestsUtils.ts b/uui-e2e-tests/framework/utils/failedTestsUtils.ts deleted file mode 100644 index 8895528919..0000000000 --- a/uui-e2e-tests/framework/utils/failedTestsUtils.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { outputJsonFile } from '../../playwright.config'; -import fs from 'node:fs'; - -type TJsonReport = { - suites: { - specs: { ok: boolean, title: string }[] - }[] -}; - -export function getFailedTestNamesFromLastRun(): Set { - const set = new Set(); - if (fs.existsSync(outputJsonFile)) { - const parsed: TJsonReport = JSON.parse(fs.readFileSync(outputJsonFile).toString()); - parsed.suites.forEach(({ specs }) => { - specs.forEach((sp) => { - if (!sp.ok) { - set.add(sp.title); - } - }); - }); - } - return set; -} diff --git a/uui-e2e-tests/framework/utils/previewTestBuilderContext.ts b/uui-e2e-tests/framework/utils/previewTestBuilderContext.ts index 2275b710c2..75183407bb 100644 --- a/uui-e2e-tests/framework/utils/previewTestBuilderContext.ts +++ b/uui-e2e-tests/framework/utils/previewTestBuilderContext.ts @@ -2,7 +2,6 @@ import fs from 'node:fs'; import path from 'node:path'; import { Logger } from './logger'; import { PLATFORM } from '../constants'; -import { getFailedTestNamesFromLastRun } from './failedTestsUtils'; import { readUuiSpecificEnvVariables } from '../../scripts/envParamUtils'; import * as console from 'console'; import { TEngine } from '../types'; @@ -10,7 +9,6 @@ import { screenshotSizeLimitKb } from '../../playwright.config'; const { isCi, - UUI_TEST_PARAM_ONLY_FAILED, UUI_TEST_PARAM_CHECK_ISSUES, UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR, } = readUuiSpecificEnvVariables(); @@ -20,16 +18,12 @@ type TIssues = { msg: string; exit: boolean }[]; export class PreviewTestBuilderContext { private seenTestNames: Set = new Set(); private onlyChromiumTests: Set = new Set(); - private failedTestNames: Set; constructor(private screenshotsDir: string) { - this.failedTestNames = getFailedTestNamesFromLastRun(); } + // eslint-disable-next-line @typescript-eslint/no-unused-vars shouldSkipTest(testName: string) { - if (UUI_TEST_PARAM_ONLY_FAILED) { - return !this.failedTestNames.has(testName); - } return false; } diff --git a/uui-e2e-tests/package.json b/uui-e2e-tests/package.json index 111d7b1ec1..c83bfc282b 100644 --- a/uui-e2e-tests/package.json +++ b/uui-e2e-tests/package.json @@ -15,7 +15,7 @@ "local-check-issues": "cross-env UUI_TEST_PARAM_CHECK_ISSUES=true yarn local-test-e2e --list --pass-with-no-tests", "local-remove-obsolete-screenshots": "cross-env UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR=true yarn local-check-issues", "test-e2e": "ts-node scripts/cmd/cmdRunPwDocker.ts", - "test-e2e-chromium": "cross-env UUI_TEST_PARAM_PROJECT=chromium UUI_TEST_PARAM_ONLY_FAILED=false yarn test-e2e", + "test-e2e-chromium": "cross-env UUI_TEST_PARAM_PROJECT=chromium yarn test-e2e", "test-e2e-update": "cross-env UUI_TEST_PARAM_UPDATE_SNAPSHOTS=true yarn test-e2e", "test-e2e-open-report": "npx ../node_modules/playwright show-report ./tests/.report/report", "start-server": "yarn --cwd ../app server", diff --git a/uui-e2e-tests/playwright.config.ts b/uui-e2e-tests/playwright.config.ts index e826ef077a..9df6ca327e 100644 --- a/uui-e2e-tests/playwright.config.ts +++ b/uui-e2e-tests/playwright.config.ts @@ -9,7 +9,7 @@ const { UUI_APP_BASE_URL, UUI_APP_BASE_URL_CI } = readEnvFile(); const testTimeout = isCi ? 10000 : 50000; export const timeoutForFixture = isCi ? 20000 : 80000; -export const expectTimeout = 10000; +export const expectTimeout = 30000; // The "expect" timeout for slow tests. It should not exceed "testTimeout". export const slowTestExpectTimeout = Math.min(expectTimeout * 3, testTimeout); diff --git a/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts b/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts index 1f4a1f255d..eb992b0a41 100644 --- a/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts +++ b/uui-e2e-tests/scripts/cmd/cmdRunPwDocker.ts @@ -12,7 +12,6 @@ import path from 'node:path'; const CONTAINER_ENGINE_CMD = getContainerEngineCmd(); const { - UUI_TEST_PARAM_ONLY_FAILED, UUI_TEST_PARAM_PROJECT, UUI_TEST_PARAM_UPDATE_SNAPSHOTS, } = readUuiSpecificEnvVariables(); @@ -76,9 +75,6 @@ function getEnvParamsForDocker(): string[] { if (UUI_TEST_PARAM_PROJECT) { env.push('-e', `${ENV_UUI_PARAMS.UUI_TEST_PARAM_PROJECT}=${UUI_TEST_PARAM_PROJECT}`); } - if (UUI_TEST_PARAM_ONLY_FAILED) { - env.push('-e', `${ENV_UUI_PARAMS.UUI_TEST_PARAM_ONLY_FAILED}=true`); - } return env; } diff --git a/uui-e2e-tests/scripts/constants.ts b/uui-e2e-tests/scripts/constants.ts index d34152c191..0328c79eb9 100644 --- a/uui-e2e-tests/scripts/constants.ts +++ b/uui-e2e-tests/scripts/constants.ts @@ -5,7 +5,6 @@ export enum ENV_UUI_PARAMS { UUI_TEST_PARAM_UPDATE_SNAPSHOTS= 'UUI_TEST_PARAM_UPDATE_SNAPSHOTS', UUI_TEST_PARAM_PROJECT = 'UUI_TEST_PARAM_PROJECT', UUI_TEST_PARAM_CHECK_ISSUES = 'UUI_TEST_PARAM_CHECK_ISSUES', - UUI_TEST_PARAM_ONLY_FAILED = 'UUI_TEST_PARAM_ONLY_FAILED', UUI_DOCKER_HOST_MACHINE_IP = 'UUI_DOCKER_HOST_MACHINE_IP' } export const YARN_TASKS = { diff --git a/uui-e2e-tests/scripts/envParamUtils.ts b/uui-e2e-tests/scripts/envParamUtils.ts index 7743c834eb..64e33648c3 100644 --- a/uui-e2e-tests/scripts/envParamUtils.ts +++ b/uui-e2e-tests/scripts/envParamUtils.ts @@ -3,7 +3,6 @@ type TEnvParams = { isDocker: boolean; UUI_DOCKER_HOST_MACHINE_IP?: string; UUI_TEST_PARAM_PROJECT?: string, - UUI_TEST_PARAM_ONLY_FAILED?: boolean, UUI_TEST_PARAM_CHECK_ISSUES?: boolean, UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR?: boolean, UUI_TEST_PARAM_UPDATE_SNAPSHOTS?: boolean, @@ -15,7 +14,6 @@ export function readUuiSpecificEnvVariables(): TEnvParams { UUI_DOCKER_HOST_MACHINE_IP, // UUI_TEST_PARAM_PROJECT, - UUI_TEST_PARAM_ONLY_FAILED, UUI_TEST_PARAM_CHECK_ISSUES, UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR, UUI_TEST_PARAM_UPDATE_SNAPSHOTS, @@ -26,7 +24,6 @@ export function readUuiSpecificEnvVariables(): TEnvParams { isCi: !!CI, UUI_DOCKER_HOST_MACHINE_IP, UUI_TEST_PARAM_PROJECT, - UUI_TEST_PARAM_ONLY_FAILED: UUI_TEST_PARAM_ONLY_FAILED === 'true', UUI_TEST_PARAM_CHECK_ISSUES: UUI_TEST_PARAM_CHECK_ISSUES === 'true', UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR: UUI_TEST_PARAM_CHECK_ISSUES_REMOVE_OBSOLETE_SCR === 'true', UUI_TEST_PARAM_UPDATE_SNAPSHOTS: UUI_TEST_PARAM_UPDATE_SNAPSHOTS === 'true', diff --git a/uui-e2e-tests/tests/docExampleTests/__screenshots__/linux/firefox/PickerInput-ValueSelectWithKeyboard.png b/uui-e2e-tests/tests/docExampleTests/__screenshots__/linux/firefox/PickerInput-ValueSelectWithKeyboard.png index 182ee05f11..0638f2a811 100644 Binary files a/uui-e2e-tests/tests/docExampleTests/__screenshots__/linux/firefox/PickerInput-ValueSelectWithKeyboard.png and b/uui-e2e-tests/tests/docExampleTests/__screenshots__/linux/firefox/PickerInput-ValueSelectWithKeyboard.png differ diff --git a/uui-e2e-tests/tests/docExampleTests/docExample.e2e.ts b/uui-e2e-tests/tests/docExampleTests/docExample.e2e.ts index 884b6a400e..1a779a4ab1 100644 --- a/uui-e2e-tests/tests/docExampleTests/docExample.e2e.ts +++ b/uui-e2e-tests/tests/docExampleTests/docExample.e2e.ts @@ -1,7 +1,6 @@ import { test } from '../../framework/fixtures/docExamplePage/fixture'; import { PickerInputObject } from '../../framework/pageObjects/pickerInputObject'; import { expect } from '@playwright/test'; -import { expectTimeout } from '../../playwright.config'; test('PickerInput-ValueSelectWithKeyboard', async ({ docExamplePage }, testInfo) => { await docExamplePage.editDocExample({ examplePath: 'pickerInput/LazyTreeInput' }); @@ -10,5 +9,5 @@ test('PickerInput-ValueSelectWithKeyboard', async ({ docExamplePage }, testInfo) const pio = new PickerInputObject(page, root); await pio.openDropdown(); await page.waitForTimeout(150); - await expect(page).toHaveScreenshot(`${testInfo.title}.png`, { timeout: expectTimeout * 2 }); + await expect(page).toHaveScreenshot(`${testInfo.title}.png`); }); diff --git a/uui-e2e-tests/tests/previewTests/__screenshots__/linux/webkit/Text-SizeVariants-Electric-NotSkin.png b/uui-e2e-tests/tests/previewTests/__screenshots__/linux/webkit/Text-SizeVariants-Electric-NotSkin.png index ed3a65699f..cde70e5725 100644 Binary files a/uui-e2e-tests/tests/previewTests/__screenshots__/linux/webkit/Text-SizeVariants-Electric-NotSkin.png and b/uui-e2e-tests/tests/previewTests/__screenshots__/linux/webkit/Text-SizeVariants-Electric-NotSkin.png differ