Skip to content

Commit

Permalink
test: update test to work with image only buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Dec 29, 2024
1 parent 8816e89 commit a4c3d53
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions e2e/trade.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ test.describe('Trade', () => {
await expect(page.locator('button', { hasText: 'ETH/USDT' })).toBeInViewport();

// // Click on Performance button and wait for response
await Promise.all([
page.waitForResponse('**/performance'),
page.click('button:has-text("Performance")'),
]);
const performanceButton = page.getByRole('tab', { name: 'Performance' });
await expect(performanceButton).toBeVisible();
await Promise.all([page.waitForResponse('**/performance'), performanceButton.click()]);

// // Check visibility of Profit USDT
await expect(page.locator('th:has-text("Profit USDT")')).toBeInViewport();
Expand Down Expand Up @@ -67,7 +66,8 @@ test.describe('Trade', () => {
// // Click on General tab
const performancePair = page.locator('td:has-text("XRP/USDT")');
await expect(performancePair).toBeInViewport();
await page.click('button[role="tab"]:has-text("General")');
await page.getByRole('tab', { name: 'General' }).click();
// await page.click('button[role="tab"]:has-text("General")');

// // Check visibility of elements
await expect(performancePair).not.toBeInViewport();
Expand Down

0 comments on commit a4c3d53

Please sign in to comment.