Add few waits for tests
This commit is contained in:
@@ -20,10 +20,12 @@ 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.wait(3000);
|
||||
await t.expect(await getPageUrl()).contains("/admin/events");
|
||||
|
||||
const newButton = Selector("[data-e2e=\"create-event\"]");
|
||||
await t.click(newButton);
|
||||
await t.wait(3000);
|
||||
await t.expect(await getPageUrl()).contains("/admin/events/create");
|
||||
|
||||
const titleFi = Selector("#rjsf_title_fi");
|
||||
|
||||
@@ -14,10 +14,12 @@ test("Logged in user can create signup", async t => {
|
||||
const loginForm = Selector("form.admin-login-form");
|
||||
await t.expect(loginForm.exists).ok();
|
||||
await doLogin(t);
|
||||
await t.wait(3000);
|
||||
await t.expect(await getPageUrl()).contains("/admin/signups");
|
||||
|
||||
const newButton = Selector("[data-e2e=\"create-signup\"]");
|
||||
await t.click(newButton);
|
||||
await t.wait(3000);
|
||||
await t.expect(await getPageUrl()).contains("/admin/signups/create");
|
||||
|
||||
const titleFi = Selector("#rjsf_title_fi");
|
||||
|
||||
@@ -21,12 +21,14 @@ test("User signups to event from front page", async t => {
|
||||
await t
|
||||
.click(CardSelector.child("a"));
|
||||
|
||||
await t.wait(3000);
|
||||
await t.expect(await getPageUrl()).match(/\/events\/\d{1,4}/, "URL isn't /events/<id>");
|
||||
|
||||
const SignupButton = Selector("button");
|
||||
await t
|
||||
.click(SignupButton);
|
||||
|
||||
await t.wait(3000);
|
||||
await t.expect(await getPageUrl()).match(/\/signup\/\d{1,4}/, "URL isn't /signup/<id>");
|
||||
|
||||
const nameField = Selector("input").nth(0);
|
||||
|
||||
Reference in New Issue
Block a user