Attempt to improve test resilience

This commit is contained in:
Matthias 2024-04-08 17:58:33 +02:00
parent 2f455af8eb
commit 0fca97b267

View File

@ -32,18 +32,20 @@ test.describe('Trade', () => {
await setLoginInfo(page); await setLoginInfo(page);
await tradeMocks(page); await tradeMocks(page);
await page.goto('/trade');
}); });
test('Trade page', async ({ page }) => { test('Trade page', async ({ page }) => {
await Promise.all([
await page.goto('/trade'),
// Wait for network requests // Wait for network requests
// await page.waitForResponse('**/ping'); // await page.waitForResponse('**/ping'),
await page.waitForResponse('**/status'); await page.waitForResponse('**/status'),
await page.waitForResponse('**/profit'); await page.waitForResponse('**/profit'),
await page.waitForResponse('**/balance'); await page.waitForResponse('**/balance'),
// await page.waitForResponse('**/trades'); // await page.waitForResponse('**/trades'),
await page.waitForResponse('**/whitelist'); await page.waitForResponse('**/whitelist'),
await page.waitForResponse('**/blacklist'); await page.waitForResponse('**/blacklist'),
await page.waitForResponse('**/locks'); await page.waitForResponse('**/locks'),
]);
// // Check visibility of elements // // Check visibility of elements
await expect(page.locator('.drag-header', { hasText: 'Multi Pane' })).toBeInViewport(); await expect(page.locator('.drag-header', { hasText: 'Multi Pane' })).toBeInViewport();