Signup creation and submit tests
This commit is contained in:
@@ -2,13 +2,12 @@ import { Selector } from "testcafe";
|
||||
import { getSiteRoot, getPageUrl } from "../utils";
|
||||
import { doLogin } from "./common/login";
|
||||
|
||||
fixture`Admin can create events`.page(`${getSiteRoot()}/admin/events`);
|
||||
fixture`Admin events`.page(`${getSiteRoot()}/admin/events`);
|
||||
|
||||
test("Logged in user can create event", async t => {
|
||||
const loginForm = Selector("form.admin-login-form");
|
||||
await t.expect(loginForm.exists).ok();
|
||||
await doLogin(t);
|
||||
|
||||
await t.expect(await getPageUrl() === "/admin/events").ok();
|
||||
|
||||
const newButton = Selector("[data-e2e=\"create-event\"]");
|
||||
@@ -50,14 +49,15 @@ test("Logged in user can create event", async t => {
|
||||
// .click(signupOption, { modifiers: { ctrl: true } });
|
||||
|
||||
|
||||
await t.typeText(titleFi, "title_fi");
|
||||
await t.typeText(descFi, "desc_fi");
|
||||
await t.typeText(contentFi, "content_fi");
|
||||
await t.typeText(locationFi, "location_fi");
|
||||
await t.typeText(titleEn, "title_en");
|
||||
await t.typeText(descEn, "desc_en");
|
||||
await t.typeText(contentEn, "content_en");
|
||||
await t.typeText(locationEn, "location_en");
|
||||
await t
|
||||
.typeText(titleFi, "title_fi")
|
||||
.typeText(descFi, "desc_fi")
|
||||
.typeText(contentFi, "content_fi")
|
||||
.typeText(locationFi, "location_fi")
|
||||
.typeText(titleEn, "title_en")
|
||||
.typeText(descEn, "desc_en")
|
||||
.typeText(contentEn, "content_en")
|
||||
.typeText(locationEn, "location_en");
|
||||
|
||||
const submit = Selector("button[type=\"submit\"]");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user