From ca87285ea780693a047c2129181fbbf032a93907 Mon Sep 17 00:00:00 2001 From: LuizAsFight Date: Sat, 7 Sep 2024 19:27:37 -0300 Subject: [PATCH 1/5] chore --- packages/app-portal/src/systems/Ecosystem/data/projects.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-portal/src/systems/Ecosystem/data/projects.json b/packages/app-portal/src/systems/Ecosystem/data/projects.json index 59d7fa7eb..64e5c068b 100644 --- a/packages/app-portal/src/systems/Ecosystem/data/projects.json +++ b/packages/app-portal/src/systems/Ecosystem/data/projects.json @@ -233,7 +233,7 @@ { "isLive": true, "name": "OxiSwap", - "url": "https://oxiswap.com", + "url": "https://oxiswap.com/", "tags": ["DeFi"], "description": "Lightning-Fast Decentralized Exchange Built On The Fuel Network", "github": "https://github.com/oxiswap", From ddb9bec07c4a524aab5ef2e7ed1858a7ab86d91b Mon Sep 17 00:00:00 2001 From: LuizAsFight Date: Sat, 7 Sep 2024 22:34:28 -0300 Subject: [PATCH 2/5] chore --- packages/app-portal/src/systems/Ecosystem/data/projects.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-portal/src/systems/Ecosystem/data/projects.json b/packages/app-portal/src/systems/Ecosystem/data/projects.json index 64e5c068b..3802ded2d 100644 --- a/packages/app-portal/src/systems/Ecosystem/data/projects.json +++ b/packages/app-portal/src/systems/Ecosystem/data/projects.json @@ -376,7 +376,7 @@ { "isLive": true, "name": "Pyth", - "url": "https://pyth.network/", + "url": "https://www.pyth.network/", "tags": ["Oracle"], "description": "Build apps with high-fidelity oracle feeds designed for mission-critical systems.", "github": "https://github.com/pyth-network", From f658ecac0f5b3df3400523b776cf81702cb5adc7 Mon Sep 17 00:00:00 2001 From: LuizAsFight Date: Sat, 7 Sep 2024 22:41:12 -0300 Subject: [PATCH 3/5] chore --- packages/app-portal/src/systems/Ecosystem/data/projects.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-portal/src/systems/Ecosystem/data/projects.json b/packages/app-portal/src/systems/Ecosystem/data/projects.json index 3802ded2d..7c58533c3 100644 --- a/packages/app-portal/src/systems/Ecosystem/data/projects.json +++ b/packages/app-portal/src/systems/Ecosystem/data/projects.json @@ -442,7 +442,7 @@ { "isLive": true, "name": "SQD", - "url": "https://docs.subsquid.io/fuel-indexing/", + "url": "https://docs.sqd.dev/fuel-indexing/", "tags": ["Indexer"], "description": "SQD enables permissionless, cost-efficient access to petabytes of high-value Web3 data.", "github": "https://github.com/subsquid/squid-sdk/tree/master/fuel", From d270b3f9aae7a2f3c282ff5716fe80b82a68c9e7 Mon Sep 17 00:00:00 2001 From: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com> Date: Sat, 7 Sep 2024 23:56:11 -0300 Subject: [PATCH 4/5] fix: check only domainin e2e soft tests --- packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts b/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts index d187ea51d..6012d560a 100644 --- a/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts +++ b/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts @@ -16,12 +16,16 @@ test.describe('Ecosystem', () => { ]); const pageLink = await project.getByRole('link').last(); - const href = await pageLink.getAttribute('href'); + const href = (await pageLink.getAttribute('href')) || ''; const newPage = await openPage; const openedPage = newPage.url(); + // create regex to get only the domain part of url, but excluding www. when it shows up + const regex = /(?<=\/\/)(?:www\.)?([^\/]+)/; + const openedPageDomain = openedPage.match(regex); + const hrefDomain = href.match(regex); - expect(openedPage).toBe(href); + expect(openedPageDomain).toBe(hrefDomain); await newPage.close(); } From 17914093f213887d01e1c775c42b9c8316c7087c Mon Sep 17 00:00:00 2001 From: LuizAsFight Date: Sun, 8 Sep 2024 00:41:28 -0300 Subject: [PATCH 5/5] fix: e2e-test --- .../tests/soft/ecosystem/Ecosystem.test.ts | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts b/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts index 6012d560a..66b7bf417 100644 --- a/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts +++ b/packages/e2e-tests/tests/soft/ecosystem/Ecosystem.test.ts @@ -10,24 +10,26 @@ test.describe('Ecosystem', () => { const projects = await page.locator('[as="article"]').all(); for (const project of projects) { - const [openPage] = await Promise.all([ - context.waitForEvent('page'), - project.click(), - ]); - + // regex to get only the domain part of url, but excluding "www." when it shows up + const regex = /(?<=\/\/)(?:www\.)?([^\/]+)/; const pageLink = await project.getByRole('link').last(); const href = (await pageLink.getAttribute('href')) || ''; + const hrefDomain = href.match(regex)?.[1] || ''; - const newPage = await openPage; - const openedPage = newPage.url(); - // create regex to get only the domain part of url, but excluding www. when it shows up - const regex = /(?<=\/\/)(?:www\.)?([^\/]+)/; - const openedPageDomain = openedPage.match(regex); - const hrefDomain = href.match(regex); + // skip domain that are not of project website + if (['twitter.com', 'github.com'].indexOf(hrefDomain) === -1) { + // open project in a new tab + console.log(`opening project ${hrefDomain}`); + project.click(); + const newPage = await context.waitForEvent('page'); + const openedPage = newPage.url(); + const openedPageDomain = openedPage.match(regex)?.[1]; - expect(openedPageDomain).toBe(hrefDomain); + // verify if the domain opened in new page is the same of the link that user has clicked + expect(openedPageDomain).toBe(hrefDomain); - await newPage.close(); + await newPage.close(); + } } }); });