diff --git a/deploy/tools/envs-validator/index.ts b/deploy/tools/envs-validator/index.ts index ad70d6f540..dc5106045b 100644 --- a/deploy/tools/envs-validator/index.ts +++ b/deploy/tools/envs-validator/index.ts @@ -64,7 +64,7 @@ async function validateEnvs(appEnvs: Record) { async function getExternalJsonContent(envName: string): Promise { return new Promise((resolve, reject) => { - const fileName = `./public${ buildExternalAssetFilePath(envName, '.json') }`; + const fileName = `./public${ buildExternalAssetFilePath(envName, 'https://foo.bar/baz.json') }`; fs.readFile(path.resolve(__dirname, fileName), 'utf8', (err, data) => { if (err) { diff --git a/deploy/tools/envs-validator/schema.ts b/deploy/tools/envs-validator/schema.ts index 6d99d794ef..cad3a3cd24 100644 --- a/deploy/tools/envs-validator/schema.ts +++ b/deploy/tools/envs-validator/schema.ts @@ -339,7 +339,7 @@ const schema = yup .array() .transform(replaceQuotes) .json() - .of(yup.string().oneOf([ 'daily_txs', 'coin_price', 'market_cap' ])), + .of(yup.string().oneOf([ 'daily_txs', 'coin_price', 'market_cap', 'tvl' ])), NEXT_PUBLIC_HOMEPAGE_PLATE_TEXT_COLOR: yup.string(), NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND: yup.string(), NEXT_PUBLIC_HOMEPAGE_SHOW_GAS_TRACKER: yup.boolean(), diff --git a/docs/ENVS.md b/docs/ENVS.md index a455c28d1e..0720dfa65e 100644 --- a/docs/ENVS.md +++ b/docs/ENVS.md @@ -92,7 +92,7 @@ The app instance could be customized by passing following variables to NodeJS en | Variable | Type| Description | Compulsoriness | Default value | Example value | | --- | --- | --- | --- | --- | --- | -| NEXT_PUBLIC_HOMEPAGE_CHARTS | `Array<'daily_txs' \| 'coin_price' \| 'market_cap'>` | List of charts displayed on the home page | - | - | `['daily_txs','coin_price','market_cap']` | +| NEXT_PUBLIC_HOMEPAGE_CHARTS | `Array<'daily_txs' \| 'coin_price' \| 'market_cap' \| 'tvl'>` | List of charts displayed on the home page | - | - | `['daily_txs','coin_price','market_cap']` | | NEXT_PUBLIC_HOMEPAGE_PLATE_TEXT_COLOR | `string` | Text color of the hero plate on the homepage (escape "#" symbol if you use HEX color codes or use rgba-value instead) | - | `white` | `\#DCFE76` | | NEXT_PUBLIC_HOMEPAGE_PLATE_BACKGROUND | `string` | Background css value for hero plate on the homepage (escape "#" symbol if you use HEX color codes or use rgba-value instead) | - | `radial-gradient(103.03% 103.03% at 0% 0%, rgba(183, 148, 244, 0.8) 0%, rgba(0, 163, 196, 0.8) 100%), var(--chakra-colors-blue-400)` | `radial-gradient(at 15% 86%, hsla(350,65%,70%,1) 0px, transparent 50%)` \| `no-repeat bottom 20% right 0px/100% url(https://placekitten/1400/200)` | | NEXT_PUBLIC_HOMEPAGE_SHOW_GAS_TRACKER | `boolean` | Set to false if network doesn't have gas tracker | - | `true` | `false` | diff --git a/icons/coins/bitcoin.svg b/icons/coins/bitcoin.svg new file mode 100644 index 0000000000..7f22b3139f --- /dev/null +++ b/icons/coins/bitcoin.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/lock.svg b/icons/lock.svg new file mode 100644 index 0000000000..763d128cb7 --- /dev/null +++ b/icons/lock.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/mocks/stats/index.ts b/mocks/stats/index.ts index c8ef4e6d81..3bc757e155 100644 --- a/mocks/stats/index.ts +++ b/mocks/stats/index.ts @@ -17,4 +17,10 @@ export const base: HomeStats = { total_gas_used: '0', total_transactions: '82258122', transactions_today: '26815', + tvl: '1767425.102766552', +}; + +export const withBtcLocked: HomeStats = { + ...base, + rootstock_locked_btc: '3337493406696977561374', }; diff --git a/stubs/stats.ts b/stubs/stats.ts index 7bc61314ff..bbe8623ffe 100644 --- a/stubs/stats.ts +++ b/stubs/stats.ts @@ -17,6 +17,7 @@ export const HOMEPAGE_STATS: HomeStats = { total_gas_used: '0', total_transactions: '193823272', transactions_today: '0', + tvl: '1767425.102766552', }; export const STATS_CHARTS_SECTION: StatsChartsSection = { diff --git a/types/api/charts.ts b/types/api/charts.ts index 29dd8ec433..5414f68e60 100644 --- a/types/api/charts.ts +++ b/types/api/charts.ts @@ -7,6 +7,7 @@ export interface ChartMarketItem { date: string; closing_price: string; market_cap?: string; + tvl?: string | null; } export interface ChartTransactionResponse { diff --git a/types/api/stats.ts b/types/api/stats.ts index 967e8b2eea..b2d74eb508 100644 --- a/types/api/stats.ts +++ b/types/api/stats.ts @@ -11,6 +11,8 @@ export type HomeStats = { static_gas_price: string | null; market_cap: string; network_utilization_percentage: number; + tvl: string | null; + rootstock_locked_btc?: string | null; } export type GasPrices = { diff --git a/types/homepage.ts b/types/homepage.ts index 5ee6a187ca..b773176288 100644 --- a/types/homepage.ts +++ b/types/homepage.ts @@ -1 +1 @@ -export type ChainIndicatorId = 'daily_txs' | 'coin_price' | 'market_cap'; +export type ChainIndicatorId = 'daily_txs' | 'coin_price' | 'market_cap' | 'tvl'; diff --git a/ui/home/Stats.pw.tsx b/ui/home/Stats.pw.tsx index 69c303e09f..06e0b0d88d 100644 --- a/ui/home/Stats.pw.tsx +++ b/ui/home/Stats.pw.tsx @@ -18,7 +18,7 @@ test.describe('all items', () => { test.beforeEach(async({ page, mount }) => { await page.route(API_URL, (route) => route.fulfill({ status: 200, - body: JSON.stringify(statsMock.base), + body: JSON.stringify(statsMock.withBtcLocked), })); component = await mount( diff --git a/ui/home/Stats.tsx b/ui/home/Stats.tsx index 6d1bb44762..c7b317e538 100644 --- a/ui/home/Stats.tsx +++ b/ui/home/Stats.tsx @@ -1,4 +1,5 @@ import { Grid } from '@chakra-ui/react'; +import BigNumber from 'bignumber.js'; import React from 'react'; import { route } from 'nextjs-routes'; @@ -6,10 +7,12 @@ import { route } from 'nextjs-routes'; import config from 'configs/app'; import blockIcon from 'icons/block.svg'; import clockIcon from 'icons/clock-light.svg'; +import bitcoinIcon from 'icons/coins/bitcoin.svg'; import gasIcon from 'icons/gas.svg'; import txIcon from 'icons/transactions.svg'; import walletIcon from 'icons/wallet.svg'; import useApiQuery from 'lib/api/useApiQuery'; +import { WEI } from 'lib/consts'; import { HOMEPAGE_STATS } from 'stubs/stats'; import StatsGasPrices from './StatsGasPrices'; @@ -39,6 +42,7 @@ const Stats = () => { if (data) { !data.gas_prices && itemsCount--; + data.rootstock_locked_btc && itemsCount++; const isOdd = Boolean(itemsCount % 2); const gasLabel = hasGasTracker && data.gas_prices ? : null; @@ -83,6 +87,15 @@ const Stats = () => { isLoading={ isPlaceholderData } /> ) } + { data.rootstock_locked_btc && ( + + ) } ); } diff --git a/ui/home/__screenshots__/Stats.pw.tsx_dark-color-mode_all-items-mobile-dark-mode-1.png b/ui/home/__screenshots__/Stats.pw.tsx_dark-color-mode_all-items-mobile-dark-mode-1.png index 7fdc937231..f0b2af8839 100644 Binary files a/ui/home/__screenshots__/Stats.pw.tsx_dark-color-mode_all-items-mobile-dark-mode-1.png and b/ui/home/__screenshots__/Stats.pw.tsx_dark-color-mode_all-items-mobile-dark-mode-1.png differ diff --git a/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-mobile-dark-mode-1.png b/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-mobile-dark-mode-1.png index 10f3cd773d..998f91fa32 100644 Binary files a/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-mobile-dark-mode-1.png and b/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-mobile-dark-mode-1.png differ diff --git a/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-screen-xl-1.png b/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-screen-xl-1.png index 7437ec0c77..bff8ac9063 100644 Binary files a/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-screen-xl-1.png and b/ui/home/__screenshots__/Stats.pw.tsx_default_all-items-screen-xl-1.png differ diff --git a/ui/home/__screenshots__/Stats.pw.tsx_mobile_all-items-mobile-dark-mode-1.png b/ui/home/__screenshots__/Stats.pw.tsx_mobile_all-items-mobile-dark-mode-1.png index f49fcdde1e..9d0a2249b2 100644 Binary files a/ui/home/__screenshots__/Stats.pw.tsx_mobile_all-items-mobile-dark-mode-1.png and b/ui/home/__screenshots__/Stats.pw.tsx_mobile_all-items-mobile-dark-mode-1.png differ diff --git a/ui/home/indicators/ChainIndicators.pw.tsx b/ui/home/indicators/ChainIndicators.pw.tsx index fcf15e53d9..59181fce54 100644 --- a/ui/home/indicators/ChainIndicators.pw.tsx +++ b/ui/home/indicators/ChainIndicators.pw.tsx @@ -1,9 +1,10 @@ -import { test, expect } from '@playwright/experimental-ct-react'; +import { test as base, expect } from '@playwright/experimental-ct-react'; import type { Locator } from '@playwright/test'; import React from 'react'; import * as dailyTxsMock from 'mocks/stats/daily_txs'; import * as statsMock from 'mocks/stats/index'; +import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; import buildApiUrl from 'playwright/utils/buildApiUrl'; @@ -12,6 +13,13 @@ import ChainIndicators from './ChainIndicators'; const STATS_API_URL = buildApiUrl('homepage_stats'); const TX_CHART_API_URL = buildApiUrl('homepage_chart_txs'); +const test = base.extend({ + context: contextWithEnvs([ + { name: 'NEXT_PUBLIC_HOMEPAGE_CHARTS', value: '["daily_txs","coin_price","market_cap","tvl"]' }, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ]) as any, +}); + test.describe('daily txs chart', () => { let component: Locator; diff --git a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-dark-mode-mobile-1.png b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-dark-mode-mobile-1.png index 65b44911ba..ffbad3afed 100644 Binary files a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-dark-mode-mobile-1.png and b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-dark-mode-mobile-1.png differ diff --git a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-mobile-1.png b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-mobile-1.png index f5d31f08f4..157561a378 100644 Binary files a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-mobile-1.png and b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_default_daily-txs-chart-mobile-1.png differ diff --git a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-dark-mode-mobile-1.png b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-dark-mode-mobile-1.png index da46094732..978b265892 100644 Binary files a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-dark-mode-mobile-1.png and b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-dark-mode-mobile-1.png differ diff --git a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-mobile-1.png b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-mobile-1.png index 9da1ef0cb6..c8a2b9ab6a 100644 Binary files a/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-mobile-1.png and b/ui/home/indicators/__screenshots__/ChainIndicators.pw.tsx_mobile_daily-txs-chart-mobile-1.png differ diff --git a/ui/home/indicators/utils/indicators.tsx b/ui/home/indicators/utils/indicators.tsx index b2b957a5b5..87d1fe082f 100644 --- a/ui/home/indicators/utils/indicators.tsx +++ b/ui/home/indicators/utils/indicators.tsx @@ -5,6 +5,7 @@ import type { TChainIndicator } from '../types'; import config from 'configs/app'; import globeIcon from 'icons/globe.svg'; +import lockIcon from 'icons/lock.svg'; import txIcon from 'icons/transactions.svg'; import { sortByDateDesc } from 'ui/shared/chart/utils/sorts'; import * as TokenEntity from 'ui/shared/entities/token/TokenEntity'; @@ -76,10 +77,34 @@ const marketPriceIndicator: TChainIndicator<'homepage_chart_market'> = { }, }; +const tvlIndicator: TChainIndicator<'homepage_chart_market'> = { + id: 'tvl', + title: 'Total value locked', + value: (stats) => '$' + Number(stats.tvl).toLocaleString(undefined, { maximumFractionDigits: 2, notation: 'compact' }), + icon: , + // eslint-disable-next-line max-len + hint: 'Total value of digital assets locked or staked in a chain', + api: { + resourceName: 'homepage_chart_market', + dataFn: (response) => ([ { + items: response.chart_data + .map((item) => ( + { + date: new Date(item.date), + value: item.tvl ? Number(item.tvl) : 0, + })) + .sort(sortByDateDesc), + name: 'TVL', + valueFormatter: (x: number) => '$' + x.toLocaleString(undefined, { maximumFractionDigits: 2, notation: 'compact' }), + } ]), + }, +}; + const INDICATORS = [ dailyTxsIndicator, coinPriceIndicator, marketPriceIndicator, + tvlIndicator, ]; export default INDICATORS; diff --git a/ui/pages/SearchResults.pw.tsx b/ui/pages/SearchResults.pw.tsx index 1df0311969..1add342996 100644 --- a/ui/pages/SearchResults.pw.tsx +++ b/ui/pages/SearchResults.pw.tsx @@ -6,6 +6,7 @@ import { apps as appsMock } from 'mocks/apps/apps'; import * as searchMock from 'mocks/search/index'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import buildApiUrl from 'playwright/utils/buildApiUrl'; import * as configs from 'playwright/utils/configs'; import LayoutMainColumn from 'ui/shared/layout/components/MainColumn'; @@ -182,7 +183,7 @@ test('search by tx hash +@mobile', async({ mount, page }) => { }); test.describe('with apps', () => { - const MARKETPLACE_CONFIG_URL = buildExternalAssetFilePath('NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', 'https://marketplace-config.json') || ''; + const MARKETPLACE_CONFIG_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', 'https://marketplace-config.json') || ''; const extendedTest = test.extend({ context: contextWithEnvs([ { name: 'NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', value: MARKETPLACE_CONFIG_URL }, diff --git a/ui/snippets/footer/Footer.pw.tsx b/ui/snippets/footer/Footer.pw.tsx index 9c39bc2b0a..d623f3d311 100644 --- a/ui/snippets/footer/Footer.pw.tsx +++ b/ui/snippets/footer/Footer.pw.tsx @@ -6,12 +6,13 @@ import { buildExternalAssetFilePath } from 'configs/app/utils'; import { FOOTER_LINKS } from 'mocks/config/footerLinks'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import buildApiUrl from 'playwright/utils/buildApiUrl'; import * as configs from 'playwright/utils/configs'; import Footer from './Footer'; -const FOOTER_LINKS_URL = buildExternalAssetFilePath('NEXT_PUBLIC_FOOTER_LINKS', 'https://localhost:3000/footer-links.json') || ''; +const FOOTER_LINKS_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_FOOTER_LINKS', 'https://localhost:3000/footer-links.json') || ''; const BACKEND_VERSION_API_URL = buildApiUrl('config_backend_version'); const INDEXING_ALERT_API_URL = buildApiUrl('homepage_indexing_status'); diff --git a/ui/snippets/header/Burger.pw.tsx b/ui/snippets/header/Burger.pw.tsx index c42541b3da..e996170126 100644 --- a/ui/snippets/header/Burger.pw.tsx +++ b/ui/snippets/header/Burger.pw.tsx @@ -6,10 +6,11 @@ import { FEATURED_NETWORKS_MOCK } from 'mocks/config/network'; import authFixture from 'playwright/fixtures/auth'; import contextWithEnvs, { createContextWithEnvs } from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import Burger from './Burger'; -const FEATURED_NETWORKS_URL = buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/featured-networks.json') || ''; +const FEATURED_NETWORKS_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/featured-networks.json') || ''; const LOGO_URL = 'https://localhost:3000/my-logo.png'; base.use({ viewport: devices['iPhone 13 Pro'].viewport }); diff --git a/ui/snippets/navigation/NavigationDesktop.pw.tsx b/ui/snippets/navigation/NavigationDesktop.pw.tsx index ff6ab583d5..e84f351796 100644 --- a/ui/snippets/navigation/NavigationDesktop.pw.tsx +++ b/ui/snippets/navigation/NavigationDesktop.pw.tsx @@ -21,7 +21,7 @@ const hooksConfig = { }, }; -const FEATURED_NETWORKS_URL = buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/featured-networks.json') || ''; +const FEATURED_NETWORKS_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/config.json') || ''; const test = base.extend({ context: contextWithEnvs([ diff --git a/ui/snippets/networkMenu/NetworkLogo.pw.tsx b/ui/snippets/networkMenu/NetworkLogo.pw.tsx index b741bc894c..12c2d8da12 100644 --- a/ui/snippets/networkMenu/NetworkLogo.pw.tsx +++ b/ui/snippets/networkMenu/NetworkLogo.pw.tsx @@ -5,6 +5,7 @@ import React from 'react'; import { buildExternalAssetFilePath } from 'configs/app/utils'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import * as configs from 'playwright/utils/configs'; import NetworkLogo from './NetworkLogo'; @@ -44,8 +45,8 @@ base.describe('placeholder logo', () => { }); base.describe('custom logo', () => { - const LOGO_URL = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO', 'https://localhost:3000/my-logo.png') || ''; - const ICON_URL = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON', 'https://localhost:3000/my-icon.png') || ''; + const LOGO_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO', 'https://localhost:3000/my-logo.png') || ''; + const ICON_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON', 'https://localhost:3000/my-icon.png') || ''; const test = base.extend({ context: contextWithEnvs([ { name: 'NEXT_PUBLIC_NETWORK_LOGO', value: LOGO_URL }, @@ -91,10 +92,10 @@ base.describe('custom logo', () => { }); base.describe('custom logo with dark option -@default +@dark-mode', () => { - const LOGO_URL = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO', 'https://localhost:3000/my-logo.png') || ''; - const LOGO_URL_DARK = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO_DARK', 'https://localhost:3000/my-logo.png') || ''; - const ICON_URL = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON', 'https://localhost:3000/my-icon.png') || ''; - const ICON_URL_DARK = buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON_DARK', 'https://localhost:3000/my-icon.png') || ''; + const LOGO_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO', 'https://localhost:3000/my-logo.png') || ''; + const LOGO_URL_DARK = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_LOGO_DARK', 'https://localhost:3000/my-logo.png') || ''; + const ICON_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON', 'https://localhost:3000/my-icon.png') || ''; + const ICON_URL_DARK = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_NETWORK_ICON_DARK', 'https://localhost:3000/my-icon.png') || ''; const test = base.extend({ context: contextWithEnvs([ { name: 'NEXT_PUBLIC_NETWORK_LOGO', value: LOGO_URL }, diff --git a/ui/snippets/networkMenu/NetworkMenu.pw.tsx b/ui/snippets/networkMenu/NetworkMenu.pw.tsx index 42098588a3..808f198c2d 100644 --- a/ui/snippets/networkMenu/NetworkMenu.pw.tsx +++ b/ui/snippets/networkMenu/NetworkMenu.pw.tsx @@ -5,10 +5,11 @@ import { buildExternalAssetFilePath } from 'configs/app/utils'; import { FEATURED_NETWORKS_MOCK } from 'mocks/config/network'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import NetworkMenu from './NetworkMenu'; -const FEATURED_NETWORKS_URL = buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/featured-networks.json') || ''; +const FEATURED_NETWORKS_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_FEATURED_NETWORKS', 'https://localhost:3000/featured-networks.json') || ''; const extendedTest = test.extend({ context: contextWithEnvs([ diff --git a/ui/snippets/searchBar/SearchBar.pw.tsx b/ui/snippets/searchBar/SearchBar.pw.tsx index 8ec8c7bc49..004bc7d78b 100644 --- a/ui/snippets/searchBar/SearchBar.pw.tsx +++ b/ui/snippets/searchBar/SearchBar.pw.tsx @@ -8,6 +8,7 @@ import { apps as appsMock } from 'mocks/apps/apps'; import * as searchMock from 'mocks/search/index'; import contextWithEnvs from 'playwright/fixtures/contextWithEnvs'; import TestApp from 'playwright/TestApp'; +import * as app from 'playwright/utils/app'; import buildApiUrl from 'playwright/utils/buildApiUrl'; import SearchBar from './SearchBar'; @@ -275,7 +276,7 @@ test('recent keywords suggest +@mobile', async({ mount, page }) => { }); base.describe('with apps', () => { - const MARKETPLACE_CONFIG_URL = buildExternalAssetFilePath('NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', 'https://marketplace-config.json') || ''; + const MARKETPLACE_CONFIG_URL = app.url + buildExternalAssetFilePath('NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', 'https://marketplace-config.json') || ''; const test = base.extend({ context: contextWithEnvs([ { name: 'NEXT_PUBLIC_MARKETPLACE_CONFIG_URL', value: MARKETPLACE_CONFIG_URL },