-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add playwright test for chain DAO page
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
}) |