Commit 0c7453c7 authored by Max Alekseenko's avatar Max Alekseenko

post-review changes

parent 9f7b884d
import { test, expect, devices } from '@playwright/experimental-ct-react'; import { test, expect, devices } from '@playwright/experimental-ct-react';
import type { Page, Route } from '@playwright/test';
import React from 'react'; import React from 'react';
import { apps as appsMock } from 'mocks/apps/apps'; import { apps as appsMock } from 'mocks/apps/apps';
...@@ -14,9 +13,8 @@ const props = { ...@@ -14,9 +13,8 @@ const props = {
isFavorite: false, isFavorite: false,
}; };
// eslint-disable-next-line @typescript-eslint/no-explicit-any const testFn: Parameters<typeof test>[1] = async({ mount, page }) => {
const testFn = async({ mount, page }: { mount: any; page: Page }) => { await page.route(appsMock[0].logo, (route) =>
await page.route(appsMock[0].logo, (route: Route) =>
route.fulfill({ route.fulfill({
status: 200, status: 200,
path: './playwright/mocks/image_s.jpg', path: './playwright/mocks/image_s.jpg',
......
import { Flex } from '@chakra-ui/react'; import { Flex } from '@chakra-ui/react';
import { test as base, expect, devices } from '@playwright/experimental-ct-react'; import { test as base, expect, devices } from '@playwright/experimental-ct-react';
import type { Page, Route } from '@playwright/test';
import React from 'react'; import React from 'react';
import { buildExternalAssetFilePath } from 'configs/app/utils'; import { buildExternalAssetFilePath } from 'configs/app/utils';
...@@ -20,14 +19,13 @@ const hooksConfig = { ...@@ -20,14 +19,13 @@ const hooksConfig = {
}, },
}; };
// eslint-disable-next-line @typescript-eslint/no-explicit-any const testFn: Parameters<typeof test>[1] = async({ mount, page }) => {
const testFn = async({ mount, page }: { mount: any; page: Page }) => { await page.route(MARKETPLACE_CONFIG_URL, (route) => route.fulfill({
await page.route(MARKETPLACE_CONFIG_URL, (route: Route) => route.fulfill({
status: 200, status: 200,
body: JSON.stringify(appsMock), body: JSON.stringify(appsMock),
})); }));
await page.route(appsMock[0].url, (route: Route) => await page.route(appsMock[0].url, (route) =>
route.fulfill({ route.fulfill({
status: 200, status: 200,
path: './mocks/apps/app.html', path: './mocks/apps/app.html',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment