feat: add test to visit go home in app menu

This commit is contained in:
Joe Previte
2021-01-28 16:23:55 -07:00
parent d7e41a3187
commit 3033c8f9a2
4 changed files with 39 additions and 24 deletions

View File

@@ -1,9 +1,5 @@
import { chromium, Page, Browser, BrowserContext } from "playwright"
// NOTE: this is hard-coded and passed as an environment variable
// See the test job in ci.yml
const PASSWORD = "e45432jklfdsab"
describe("login", () => {
let browser: Browser
let page: Page
@@ -29,9 +25,9 @@ describe("login", () => {
})
it("should be able to login with the password from config.yml", async () => {
await page.goto("http://localhost:8080")
await page.goto(process.env.CODE_SERVER_ADDRESS || "http://localhost:8080")
// Type in password
await page.fill(".password", PASSWORD)
await page.fill(".password", process.env.PASSWORD || "password")
// Click the submit button and login
await page.click(".submit")
// See the editor