diff --git a/.changeset/fuzzy-jeans-camp.md b/.changeset/fuzzy-jeans-camp.md new file mode 100644 index 000000000..49e8cb22c --- /dev/null +++ b/.changeset/fuzzy-jeans-camp.md @@ -0,0 +1,5 @@ +--- +'explorer': minor +--- + +Add test IDs to the app identity section of the header. diff --git a/apps/explorer-e2e/src/specs/index.spec.ts b/apps/explorer-e2e/src/specs/index.spec.ts index e5f5d9275..bc7631e91 100644 --- a/apps/explorer-e2e/src/specs/index.spec.ts +++ b/apps/explorer-e2e/src/specs/index.spec.ts @@ -1,17 +1,14 @@ import { test, expect } from '@playwright/test' -import { fillTextInputByName } from '@siafoundation/e2e' test('homepage', async ({ page }) => { await page.goto('/') - await expect(page.getByText('siascan')).toBeVisible() - await expect(page.getByText('zen')).toBeVisible() + await expect(page.getByTestId('explorer-identity-appName')).toBeVisible() + await expect(page.getByTestId('explorer-identity-network')).toBeVisible() }) test('look up and view a block by block number', async ({ page }) => { - await page.goto('/') - await fillTextInputByName(page, 'query', '3000') - await page.keyboard.press('Enter') - await expect(page.getByRole('link').getByText('3,000')).toBeVisible() - await expect(page.getByText('1 transactions')).toBeVisible() - await expect(page.getByText('000000...647f7f')).toBeVisible() + await page.goto('/block/60000') + await expect(page.getByRole('link').getByText('60,000')).toBeVisible() + await expect(page.getByText('11 transactions')).toBeVisible() + await expect(page.getByText('000000...fa54c1')).toBeVisible() }) diff --git a/apps/explorer/components/Layout/Navbar.tsx b/apps/explorer/components/Layout/Navbar.tsx index 1e96c9a47..0bbfadef0 100644 --- a/apps/explorer/components/Layout/Navbar.tsx +++ b/apps/explorer/components/Layout/Navbar.tsx @@ -16,25 +16,32 @@ type Props = { export function Navbar({ appName, network, homeHref, children }: Props) { return ( -
+
-
+
{appName && ( {appName} @@ -43,6 +50,7 @@ export function Navbar({ appName, network, homeHref, children }: Props) { {network}