Fix getSiteRoot

This commit is contained in:
Aarni Halinen
2021-01-12 23:28:45 +02:00
parent 33ad584804
commit 4c5bbfe90c
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -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 => {
/**
+1 -1
View File
@@ -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 -1
View File
@@ -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
View File
@@ -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";