Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaogris committed Jan 9, 2024
1 parent d293324 commit 98eb7d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ godoc: install
# --- frontend -----------------------------------------------------------------
NODEPREFIX = .hermit/node
NODELIB = $(NODEPREFIX)/lib
# TODO: BASEURL should be calculated dynamically for CI/PR.
export BASEURL ?= https://evy.dev

## Serve frontend on free port
serve:
Expand All @@ -140,10 +142,10 @@ prettier: | $(NODELIB)
check-prettier: | $(NODELIB)
npx --prefix $(NODEPREFIX) -y prettier --check .

# TODO: EVY_BASEURL should be calculated dynamically - maybe move it all to script.
e2e: E2EDIR = e2e
e2e: EVY_BASEURL = https://evy.dev
# TODO: BASEURL should be calculated dynamically for CI/PR.
e2e: E2EDIR=e2e
e2e:
@echo "testing $(BASEURL)"
npm --prefix $(E2EDIR) ci
npx --prefix $(E2EDIR) playwright install --with-deps chromium
npx --prefix $(E2EDIR) playwright test --config $(E2EDIR)
Expand Down
1 change: 1 addition & 0 deletions e2e/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test("title", async ({ page, baseURL }) => {

test("console output", async ({ page, baseURL }) => {
await page.goto(baseURL)
await page.waitForLoadState("networkidle")
await page.getByRole("button", { name: "Run" }).click()
const console = page.locator("css=#console")
await expect(console).toContainText("x: 12")
Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { defineConfig, devices } = require("@playwright/test")
module.exports = defineConfig({
use: {
baseURL: process.env.EVY_BASEURL || "http://localhost:8080",
baseURL: process.env.BASEURL || "http://localhost:8080",
},
})

0 comments on commit 98eb7d3

Please sign in to comment.