Skip to content

Commit

Permalink
add playwright test for chain DAO page
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Jun 6, 2024
1 parent 9db8cd3 commit 88f6da0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions apps/dapp/tests/chain.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// GNU AFFERO GENERAL PUBLIC LICENSE Version 3. Copyright (C) 2022 DAO DAO Contributors.
// See the "LICENSE" file in the root directory of this package for more copyright information.

import { expect, test } from '@playwright/test'

import './setup'

test('chain home/proposals tab renders', async ({ page }) => {
await page.goto('/dao/juno')

// Expect no 404 error.
await expect(page.getByText('404: Not Found')).not.toBeVisible({
timeout: 5000,
})

// Expect description to exist.
await expect(
page.getByText('Native chain governance for Juno Testnet.')
).toBeVisible()

// Expect "New proposal" button to exist.
await expect(page.getByText('New proposal', { exact: true })).toBeVisible()
})

test('chain treasury tab renders', async ({ page }) => {
await page.goto('/dao/juno/treasury')

// Expect no 404 error.
await expect(page.getByText('404: Not Found')).not.toBeVisible({
timeout: 5000,
})

// Expect description to exist.
await expect(
page.getByText('Native chain governance for Juno Testnet.')
).toBeVisible()

// Expect "Token" title to exist.
await expect(page.getByText('Token', { exact: true })).toBeVisible()
})

test('chain subDAOs tab renders', async ({ page }) => {
await page.goto('/dao/juno/subdaos')

// Expect no 404 error.
await expect(page.getByText('404: Not Found')).not.toBeVisible({
timeout: 5000,
})

// Expect description to exist.
await expect(
page.getByText('Native chain governance for Juno Testnet.')
).toBeVisible()
})

0 comments on commit 88f6da0

Please sign in to comment.