Fix getSiteRoot
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { Selector } from "testcafe";
|
||||
import { getSiteRoot } from "./utils";
|
||||
|
||||
fixture`404 page renders and functions correctly`.page(`${getSiteRoot}/404`);
|
||||
fixture`404 page renders and functions correctly`.page(`${getSiteRoot()}/404`);
|
||||
|
||||
test("Page contains the text 404", async t => {
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Selector, ClientFunction } from "testcafe";
|
||||
import { getSiteRoot } from "../utils";
|
||||
import { doLogin } from "./common/login";
|
||||
|
||||
fixture`Admin login page functions correctly`.page(`${getSiteRoot}/admin/login`);
|
||||
fixture`Admin login page functions correctly`.page(`${getSiteRoot()}/admin/login`);
|
||||
|
||||
test("Login form exists", async t => {
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Selector } from "testcafe";
|
||||
import { getSiteRoot } from "./utils";
|
||||
|
||||
fixture`Front page renders and functions correctly`.page(`${getSiteRoot}`);
|
||||
fixture`Front page renders and functions correctly`.page(`${getSiteRoot()}`);
|
||||
|
||||
test("Favicon exists", async t => {
|
||||
/**
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
export const getSiteRoot = () => {
|
||||
return process.env.SITE_URL || "http://localhost:3000";
|
||||
}
|
||||
export const getSiteRoot = (): string => process.env.SITE_URL || "http://localhost:3000";
|
||||
Reference in New Issue
Block a user