Use improved locator syntax

This commit is contained in:
Matthias 2024-04-08 17:51:43 +02:00
parent e619f04f86
commit 2f455af8eb

View File

@ -47,10 +47,10 @@ test.describe('Trade', () => {
// // 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();
await expect(page.locator('.drag-header:has-text("Chart")')).toBeInViewport(); await expect(page.locator('.drag-header', { hasText: 'Chart' })).toBeInViewport();
// Pairlist elements // Pairlist elements
await expect(page.locator('button:has-text("BTC/USDT")')).toBeInViewport(); await expect(page.locator('button', { hasText: 'BTC/USDT' })).toBeInViewport();
await expect(page.locator('button:has-text("ETH/USDT")')).toBeInViewport(); await expect(page.locator('button', { hasText: 'ETH/USDT' })).toBeInViewport();
// // Click on Performance button and wait for response // // Click on Performance button and wait for response
await Promise.all([ await Promise.all([