mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* Call the API logout endpoint when the user logs out * fix tests * one more fix
24 lines
675 B
TypeScript
24 lines
675 B
TypeScript
import type { TestFixture, Page } from '@playwright/test';
|
|
|
|
import * as textAdMock from 'mocks/ad/textAd';
|
|
|
|
export type MockTextAdFixture = () => Promise<void>;
|
|
|
|
const fixture: TestFixture<MockTextAdFixture, { page: Page }> = async({ page }, use) => {
|
|
await use(async() => {
|
|
|
|
await page.route('https://request-global.czilladx.com/serve/native.php?z=19260bf627546ab7242', (route) => route.fulfill({
|
|
status: 200,
|
|
json: textAdMock.duck,
|
|
}));
|
|
await page.route(textAdMock.duck.ad.thumbnail, (route) => {
|
|
return route.fulfill({
|
|
status: 200,
|
|
path: './playwright/mocks/image_s.jpg',
|
|
});
|
|
});
|
|
});
|
|
};
|
|
|
|
export default fixture;
|