Skip to content

Commit

Permalink
refactor(e2e-assets): disable tests for added tokens until refresh is…
Browse files Browse the repository at this point in the history
…sue is resolved
  • Loading branch information
nelitow committed Dec 13, 2024
1 parent 364f16a commit 9cdf9b5
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions packages/e2e-assets/playwright/crx/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});

0 comments on commit 9cdf9b5

Please sign in to comment.