Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix some tests #294

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/services/netMgr.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ if (
document.cookie.indexOf("arcv_use_mocks=true") >= 0)
) {
NetMgr.mockOn();
debugger;
}

export default NetMgr;
8 changes: 4 additions & 4 deletions tests/pages/scan.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ test("Correct error appears when I submit an invalid voucher", async (t) => {
.pressKey("backspace")
.typeText(sponsorBox, "INV")
.typeText(el("#voucherBox"), "1234", { speed: 1 });
const submitButton = await el("#submitVoucher");
const submit_button = await el("#submit-voucher");

await t.click(submitButton);
await t.click(submit_button);
const errorMessage = await el(".content div.message").innerText;
expect(errorMessage).to.contain(
"That isn't a valid voucher code, please check the number and try again."
Expand All @@ -167,9 +167,9 @@ test("Correct error appears when I submit a duplicate voucher", async (t) => {
.pressKey("backspace")
.typeText(el("#sponsorBox"), "FAL")
.typeText(el("#voucherBox"), "1111", { speed: 1 });
const submitButton = await el("#submitVoucher");
const submit_button = await el("#submit-voucher");

await t.click(submitButton);
await t.click(submit_button);
const errorMessage = await el(".message").innerText;
expect(errorMessage).to.contain(
"A very very very very very very very very very very very very very very " +
Expand Down
10 changes: 5 additions & 5 deletions tests/pages/tap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ test("I can type and submit a voucher code", async (t) => {
.pressKey("backspace backspace backspace backspace")
.typeText(el("#sponsorBox"), "NEW")
.typeText(el("#voucherBox"), "12345678")
.click("#submitVoucher");
.click("#submit-voucher");

// Check the box is clear again.
const voucherBoxValue = await el("#voucherBox").value;
Expand All @@ -148,9 +148,9 @@ test("Correct error appears when I submit a duplicate voucher", async (t) => {
)
.typeText(sponsorBox, "FAL")
.typeText(el("#voucherBox"), "1111");
const submitVoucher = await el("button#submitVoucher");
const submit_voucher = await el("button#submit-voucher");

await t.click(submitVoucher);
await t.click(submit_voucher);
const errorMessage = await el(".message").innerText;
expect(errorMessage).to.contain(
"A very very very very very very very very very very very very very very " +
Expand All @@ -176,9 +176,9 @@ test("Correct error appears when I submit an invalid voucher", async (t) => {
)
.typeText(sponsorBox, "INV")
.typeText(el("#voucherBox"), "1234");
const submitVoucher = await el("button#submitVoucher");
const submit_voucher = await el("button#submit-voucher");

await t.click(submitVoucher);
await t.click(submit_voucher);
const errorMessage = await el(".message").innerText;
expect(errorMessage).to.contain(
"That isn't a valid voucher code, please check the number and try again."
Expand Down