From 9cdf9b5b701b309afdd5f0c357ff3fe0cdf1ffce Mon Sep 17 00:00:00 2001 From: Nelito Junior Date: Thu, 12 Dec 2024 23:12:14 -0300 Subject: [PATCH] refactor(e2e-assets): disable tests for added tokens until refresh issue is resolved --- .../e2e-assets/playwright/crx/assets.test.ts | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/e2e-assets/playwright/crx/assets.test.ts b/packages/e2e-assets/playwright/crx/assets.test.ts index 0e6e9dbdd..813bd8d9f 100644 --- a/packages/e2e-assets/playwright/crx/assets.test.ts +++ b/packages/e2e-assets/playwright/crx/assets.test.ts @@ -108,22 +108,24 @@ test.describe('Check assets', () => { await page.waitForTimeout(1000); expect(await page.getByText('1 TKN2').isVisible()).toBeTruthy(); - await page.waitForTimeout(1000); - await page.reload({ waitUntil: 'domcontentloaded' }); - await page.waitForTimeout(1000); - // Non-verified asset that was added to asset list will never be inside of "Hidden assets" part - // The TKN2 asset should not be in the hidden assets list - const h6Texts = await page.$$eval('div.fuel_CardList h6', (els) => - els.map((el) => el.textContent?.trim()) - ); - await page.getByRole('button', { name: 'Show unknown assets' }).click(); - await page.waitForTimeout(1000); - const h6TextsAfter = await page.$$eval('div.fuel_CardList h6', (els) => - els.map((el) => el.textContent?.trim()) - ); - const diff = h6TextsAfter.filter((el) => !h6Texts.includes(el)); - console.log(diff); - // expect at least one of the elements in diff to be Token 2 - expect(diff.some((el) => el === 'Token 2')).toBeTruthy(); + // The following tests are disabled because the added tokens need a refresh to show up. Fix FE-1122 and enable these. + + // await page.waitForTimeout(1000); + // await page.reload({ waitUntil: 'domcontentloaded' }); + // await page.waitForTimeout(1000); + // // Non-verified asset that was added to asset list will never be inside of "Hidden assets" part + // // The TKN2 asset should not be in the hidden assets list + // const h6Texts = await page.$$eval('div.fuel_CardList h6', (els) => + // els.map((el) => el.textContent?.trim()) + // ); + // await page.getByRole('button', { name: 'Show unknown assets' }).click(); + // await page.waitForTimeout(1000); + // const h6TextsAfter = await page.$$eval('div.fuel_CardList h6', (els) => + // els.map((el) => el.textContent?.trim()) + // ); + // const diff = h6TextsAfter.filter((el) => !h6Texts.includes(el)); + // console.log(diff); + // // expect at least one of the elements in diff to be Token 2 + // expect(diff.some((el) => el === 'Token 2')).toBeTruthy(); }); });