mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* get client key on 429 error * set key to cookie and pass it in query params * move csrf-token header to useApiFetch * pin host for preview * actual layout * support new changes in API * proxy headers from API * add header to request * remove next.js proxy flag * fix ts * refactor * add tests
22 lines
621 B
TypeScript
22 lines
621 B
TypeScript
import { test, expect } from '@playwright/experimental-ct-react';
|
|
import React from 'react';
|
|
|
|
import TestApp from 'playwright/TestApp';
|
|
import * as configs from 'playwright/utils/configs';
|
|
|
|
import AppErrorTooManyRequests from './AppErrorTooManyRequests';
|
|
|
|
test('default view +@mobile', async({ mount, page }) => {
|
|
const component = await mount(
|
|
<TestApp>
|
|
<AppErrorTooManyRequests/>
|
|
</TestApp>,
|
|
);
|
|
await page.waitForResponse('https://www.google.com/recaptcha/api2/**');
|
|
|
|
await expect(component).toHaveScreenshot({
|
|
mask: [ page.locator('.recaptcha') ],
|
|
maskColor: configs.maskColor,
|
|
});
|
|
});
|