Skip to content

Commit

Permalink
feat: remove processing message to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
namanaman committed Jan 6, 2025
1 parent a5cd945 commit 7c52c55
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ JavaScript scripts are injected onto the existing application and manually updat
4. Run `npm run build` to build bundled files
5. Run `npm test` to run Cypress tests

## Testing a change

When you make a change and want to see if everything is working, do the following:

1. Edit `.js` file in `src/` directory (edit corresponding Cypress test if relevant)
2. Run `npm run build` to compile files
3. Run `npm test` to ensure tests still pass
4. Open relevant test file in `cypress/fixtures` in browser to ensure change looks okay (edit or add new test file if your scenario is not covered)

## Deployment

1. Clone the `beta` repository in the same local folder that the `paid-leave-claim-status` folder is in
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/claimDetailEligible.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ describe("Claim Detail page - Eligible scenario without next pay date", () => {
.contains("Go to payment information")
.should("have.attr", "onclick")
.and("equal", "paymentDetail()");
cy.contains("Your payment is still processing.").should("be.visible");
cy.get("li")
.contains(
"Payment is usually sent to your benefits debit card a few days after you're approved."
Expand Down
24 changes: 24 additions & 0 deletions cypress/e2e/paymentDetail.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ describe("Payment Detail page - Leave Ended TDI", () => {

describe("Payment Detail page - Max Entitlement", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit(
"./cypress/fixtures/paymentDetail/paymentDetailMaxEntitlement.html"
);
Expand Down Expand Up @@ -140,6 +143,9 @@ describe("Payment Detail page - Max Entitlement", () => {

describe("Payment Detail page - No Additional Benefits", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit("./cypress/fixtures/paymentDetail/paymentDetailNoAdditional.html");

cy.contains("PAYMENT DETAIL").should("not.exist"); // Rendered on original HTML, without script change
Expand Down Expand Up @@ -168,6 +174,9 @@ describe("Payment Detail page - No Additional Benefits", () => {

describe("Payment Detail page - P30 received FLI", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit(
"./cypress/fixtures/paymentDetail/paymentDetailP30ReceivedFLI.html"
);
Expand Down Expand Up @@ -201,6 +210,9 @@ describe("Payment Detail page - P30 received FLI", () => {

describe("Payment Detail page - P30 received TDI", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit(
"./cypress/fixtures/paymentDetail/paymentDetailP30ReceivedTDI.html"
);
Expand Down Expand Up @@ -241,6 +253,9 @@ describe("Payment Detail page - P30 received TDI", () => {

describe("Payment Detail page - P30 sent", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit("./cypress/fixtures/paymentDetail/paymentDetailP30Sent.html");

cy.contains("PAYMENT DETAIL").should("not.exist"); // Rendered on original HTML, without script change
Expand Down Expand Up @@ -272,6 +287,9 @@ describe("Payment Detail page - P30 sent", () => {

describe("Payment Detail page - Pay code 99/6", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit("./cypress/fixtures/paymentDetail/paymentDetailPayCode996.html");

cy.contains("PAYMENT DETAIL").should("not.exist"); // Rendered on original HTML, without script change
Expand Down Expand Up @@ -300,6 +318,9 @@ describe("Payment Detail page - Pay code 99/6", () => {

describe("Payment Detail page - Recovered", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit("./cypress/fixtures/paymentDetail/paymentDetailRecovered.html");

cy.contains("PAYMENT DETAIL").should("not.exist"); // Rendered on original HTML, without script change
Expand Down Expand Up @@ -328,6 +349,9 @@ describe("Payment Detail page - Recovered", () => {

describe("Payment Detail page - Scheduled", () => {
it("renders with updated content", () => {
const fixedDate = new Date(2024, 9, 1); // October 1, 2024
cy.clock(fixedDate.getTime());

cy.visit("./cypress/fixtures/paymentDetail/paymentDetailScheduled.html");

cy.contains("PAYMENT DETAIL").should("not.exist"); // Rendered on original HTML, without script change
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/claimDetail/claimDetail.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/claimDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ function getStatusBodyHtml(
benefits debit card about 2 business days later.`
: hasClaimEnded
? "Your claim has ended."
: "Your payment is still processing."}
: ""}
</div>
<button
style="background-color: #0076D6; border: none; color: #fff; padding: 12px 20px; cursor: pointer; border-radius: 4px; font-weight: 700; font-size: 16px; line-height: 24px; margin-top: 16px; outline-offset: 0.25rem"
Expand Down

0 comments on commit 7c52c55

Please sign in to comment.