diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f9a11422..d440bee39 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -114,7 +114,8 @@ "helpdesk", "katex", "Timecop", - "turbolinks" + "turbolinks", + "whitespaces" ], "cSpell.enableFiletypes": [ "ruby" diff --git a/spec/cypress/e2e/vouchers_redemptions_spec.cy.js b/spec/cypress/e2e/vouchers_redemptions_spec.cy.js index 305d0ff80..71db6b0cc 100644 --- a/spec/cypress/e2e/vouchers_redemptions_spec.cy.js +++ b/spec/cypress/e2e/vouchers_redemptions_spec.cy.js @@ -85,6 +85,12 @@ describe("Verify Voucher Form", () => { expect(message).to.equal(this.voucherInvalid); }); }); + + it.only("is valid even if voucher string contains whitespaces at the beginning/end", function () { + cy.getBySelector("secure-hash-input").type(`\t ${this.voucher.secure_hash} `); + cy.getBySelector("verify-voucher-submit").click(); + helpers.verifyVoucherRedemptionText(); + }); }); describe("Tutor voucher redemption", () => {