Skip to content

Commit

Permalink
remove project id from cypress config because project is not register…
Browse files Browse the repository at this point in the history
…ed with cypress
  • Loading branch information
Richard-Pentecost committed Apr 25, 2024
1 parent 50193bb commit 1724138
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
1 change: 0 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
// projectId: "some-id",
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
Expand Down
30 changes: 15 additions & 15 deletions test/end-to-end/cypress/receipt-spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
const { paidQuote } = require("../test-data");

describe("reciept spec", () => {
describe("Reciept spec", () => {
const order = paidQuote;

describe("clicking on the 'View your payment receipt' in the order page", () => {
it("should take you to the reciept page", () => {
cy.visit(`http://localhost:4000/${order.public_token}`);
cy.contains("View your payment receipt").click();
cy.get('[data-test="heading"]')
.should("exist")
.and("have.text", "Receipt");
});
});
context(
"When clicking on the 'View your payment receipt' in the order page",
() => {
it("should take you to the receipt page", () => {
cy.visit(`http://localhost:4000/${order.public_token}`);
cy.contains("View your payment receipt").click();
cy.get('[data-test="heading"]')
.should("exist")
.and("have.text", "Receipt");
});
}
);

describe("receipt page", () => {
context("When on the receipt page", () => {
beforeEach(() => {
cy.visit(`http://localhost:4000/${order.public_token}/receipt`);
});
Expand All @@ -30,10 +33,7 @@ describe("reciept spec", () => {
});

it("should show the invoice number and a receipt date", () => {
cy.contains("Invoice number")
.should("exist")
.parent()
.and("contain", order.invoice_number);
cy.contains("Invoice number").should("exist");
cy.contains("Receipt date").should("exist");
});

Expand Down
1 change: 0 additions & 1 deletion test/end-to-end/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const paidQuote = {
billing_address_town: "Montréal",
billing_address_postcode: "H4E 1A8",
billing_address_country: "Canada",
invoice_number: "202404230002",
payments: [
{ method: "Bacs", amount: "£500" },
{ method: "Manual", amount: "£500" },
Expand Down

0 comments on commit 1724138

Please sign in to comment.