diff --git a/.env.sample b/.env.sample index 4ea4af189..807966ef6 100644 --- a/.env.sample +++ b/.env.sample @@ -8,12 +8,9 @@ DJANGO_DB_FILE=django.db DJANGO_DB_FIXTURES="benefits/core/migrations/local_fixtures.json" auth_provider_client_id=benefits-oauth-client-id -courtesy_card_verifier_api_auth_key=server-auth-token -mobility_pass_verifier_api_auth_key=server-auth-token +agency_card_verifier_api_auth_key=server-auth-token client_private_key='-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA1pt0ZoOuPEVPJJS+5r884zcjZLkZZ2GcPwr79XOLDbOi46on\nCa79kjRnhS0VUK96SwUPS0z9J5mDA5LSNL2RoxFb5QGaevnJY828NupzTNdUd0sY\nJK3kRjKUggHWuB55hwJcH/Dx7I3DNH4NL68UAlK+VjwJkfYPrhq/bl5z8ZiurvBa\n5C1mDxhFpcTZlCfxQoas7D1d+uPACF6mEMbQNd3RaIaSREO50NvNywXIIt/OmCiR\nqI7JtOcn4eyh1I4j9WtlbMhRJLfwPMAgY5epTsWcURmhVofF2wVoFbib3JGCfA7t\nz/gmP5YoEKnf/cumKmF3e9LrZb8zwm7bTHUViwIDAQABAoIBAQCIv0XMjNvZS9DC\nXoXGQtVpcxj6dXfaiDgnc7hZDubsNCr3JtT5NqgdIYdVNQUABNDIPNEiCkzFjuwM\nuuF2+dRzM/x6UCs/cSsCjXYBCCOwMwV/fjpEJQnwMQqwTLulVsXZYYeSUtXVBf/8\n0tVULRty34apLFhsyX30UtboXQdESfpmm5ZsqsZJlYljw+M7JxRMneQclI19y/ya\nhPWlfhLB9OffVEJXGaWx1NSYnKoCMKqE/+4krROr6V62xXaNyX6WtU6XiT7C6R5A\nPBxfhmoeFdVCF6a+Qq0v2fKThYoZnV4sn2q2An9YPfynFYnlgzdfnAFSejsqxQd0\nfxYLOtMBAoGBAP1jxjHDJngZ1N+ymw9MIpRgr3HeuMP5phiSTbY2tu9lPzQd+TMX\nfhr1bQh2Fd/vU0u7X0yPnTWtUrLlCd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\nAlK+VjwJkfYPrhq/bl5z8ZiurvBa5C1mDxhFpcTZlCfxQoas7D1d+uPACF6mEMbQ\nNd3RaIaSREO50NvNywXIIt/OmCiRqI7JtOcn4eyh1I4j9WtlbMhRJLfwPMAgY5ep\nTsWcURmhVofF2wVoFbib3JGCfA7tz/gmP5YoEKnf/cumKmF3e9LrZb8zwm7bTHUV\niwIDAQAB\n-----END PUBLIC KEY-----' -mst_payment_processor_client_secret=secret -sacrt_payment_processor_client_secret=secret -sbmtd_payment_processor_client_secret=secret +cst_payment_processor_client_secret=secret testsecret="Hello from the local environment!" diff --git a/benefits/core/migrations/local_fixtures.json b/benefits/core/migrations/local_fixtures.json index 4ea7cc35e..942ad116f 100644 --- a/benefits/core/migrations/local_fixtures.json +++ b/benefits/core/migrations/local_fixtures.json @@ -3,7 +3,7 @@ "model": "core.pemdata", "pk": 1, "fields": { - "label": "(MST) eligibility server public key", + "label": "(CST) eligibility server public key", "text_secret_name": null, "remote_url": "https://raw.githubusercontent.com/cal-itp/eligibility-server/main/keys/server.pub" } @@ -11,15 +11,6 @@ { "model": "core.pemdata", "pk": 2, - "fields": { - "label": "(SBMTD) eligibility server public key", - "text_secret_name": null, - "remote_url": "https://raw.githubusercontent.com/cal-itp/eligibility-server/main/keys/server.pub" - } - }, - { - "model": "core.pemdata", - "pk": 3, "fields": { "label": "Benefits client private key", "text_secret_name": "client-private-key", @@ -28,7 +19,7 @@ }, { "model": "core.pemdata", - "pk": 4, + "pk": 3, "fields": { "label": "Benefits client public key", "text_secret_name": "client-public-key", @@ -68,9 +59,9 @@ "pk": 1, "fields": { "name": "senior", - "label": "(MST) Senior Discount", + "label": "(CST) Senior Discount", "group_id": "group123", - "enrollment_success_template": "enrollment/success--mst.html" + "enrollment_success_template": "enrollment/success--cst.html" } }, { @@ -78,56 +69,25 @@ "pk": 2, "fields": { "name": "veteran", - "label": "(MST) Veteran Discount", + "label": "(CST) Veteran Discount", "group_id": "group123", - "enrollment_success_template": "enrollment/success--mst.html" + "enrollment_success_template": "enrollment/success--cst.html" } }, { "model": "core.eligibilitytype", "pk": 3, "fields": { - "name": "courtesy_card", - "label": "(MST) Courtesy Card Discount", + "name": "agency_card", + "label": "(CST) Agency Card Discount", "group_id": "group123", "enrollment_index_template": "enrollment/index--agency-card.html", - "enrollment_success_template": "enrollment/success--mst-courtesy-card.html" + "enrollment_success_template": "enrollment/success--cst-agency-card.html" } }, { "model": "core.eligibilitytype", "pk": 4, - "fields": { - "name": "senior", - "label": "(SacRT) Senior Discount", - "group_id": "group123", - "enrollment_success_template": "enrollment/success--sacrt.html" - } - }, - { - "model": "core.eligibilitytype", - "pk": 5, - "fields": { - "name": "senior", - "label": "(SBMTD) Senior Discount", - "group_id": "group123", - "enrollment_success_template": "enrollment/success--sbmtd.html" - } - }, - { - "model": "core.eligibilitytype", - "pk": 6, - "fields": { - "name": "mobility_pass", - "label": "(SBMTD) Mobility Pass Discount", - "group_id": "group123", - "enrollment_index_template": "enrollment/index--agency-card.html", - "enrollment_success_template": "enrollment/success--sbmtd-mobility-pass.html" - } - }, - { - "model": "core.eligibilitytype", - "pk": 7, "fields": { "name": "calfresh", "label": "CalFresh", @@ -136,14 +96,14 @@ "expiration_days": 5, "expiration_reenrollment_days": 3, "reenrollment_error_template": "enrollment/reenrollment-error--calfresh.html", - "enrollment_success_template": "enrollment/success--mst.html" + "enrollment_success_template": "enrollment/success--cst.html" } }, { "model": "core.eligibilityverifier", "pk": 1, "fields": { - "name": "(MST) oauth claims via Login.gov", + "name": "(CST) oauth claims via Login.gov", "display_order": 1, "active": true, "api_url": null, @@ -164,7 +124,7 @@ "model": "core.eligibilityverifier", "pk": 2, "fields": { - "name": "(MST) VA.gov - veteran", + "name": "(CST) VA.gov - veteran", "display_order": 3, "active": true, "api_url": null, @@ -185,101 +145,36 @@ "model": "core.eligibilityverifier", "pk": 3, "fields": { - "name": "(MST) eligibility server verifier", + "name": "(CST) eligibility server verifier", "display_order": 4, "active": true, "api_url": "http://server:8000/verify", "api_auth_header": "X-Server-API-Key", - "api_auth_key_secret_name": "courtesy-card-verifier-api-auth-key", + "api_auth_key_secret_name": "agency-card-verifier-api-auth-key", "eligibility_type": 3, "public_key": 1, "jwe_cek_enc": "A256CBC-HS512", "jwe_encryption_alg": "RSA-OAEP", "jws_signing_alg": "RS256", "auth_provider": null, - "selection_label_template": "eligibility/includes/selection-label--mst-courtesy-card.html", - "start_template": "eligibility/start--mst-courtesy-card.html", - "form_class": "benefits.eligibility.forms.MSTCourtesyCard", - "unverified_template": "eligibility/unverified--mst-courtesy-card.html", - "help_template": "core/includes/help--mst-courtesy-card.html" + "selection_label_template": "eligibility/includes/selection-label--cst-agency-card.html", + "start_template": "eligibility/start--cst-agency-card.html", + "form_class": "benefits.eligibility.forms.CSTAgencyCard", + "unverified_template": "eligibility/unverified--cst-agency-card.html", + "help_template": "core/includes/help--cst-agency-card.html" } }, { "model": "core.eligibilityverifier", "pk": 4, "fields": { - "name": "(SacRT) oauth claims via Login.gov", - "display_order": 5, - "active": false, - "api_url": null, - "api_auth_header": null, - "api_auth_key_secret_name": null, - "eligibility_type": 4, - "public_key": null, - "jwe_cek_enc": null, - "jwe_encryption_alg": null, - "jws_signing_alg": null, - "auth_provider": 1, - "selection_label_template": "eligibility/includes/selection-label--senior.html", - "start_template": "eligibility/start--senior.html", - "form_class": null - } - }, - { - "model": "core.eligibilityverifier", - "pk": 5, - "fields": { - "name": "(SBMTD) oauth claims via Login.gov", - "display_order": 6, - "active": false, - "api_url": null, - "api_auth_header": null, - "api_auth_key_secret_name": null, - "eligibility_type": 5, - "public_key": null, - "jwe_cek_enc": null, - "jwe_encryption_alg": null, - "jws_signing_alg": null, - "auth_provider": 1, - "selection_label_template": "eligibility/includes/selection-label--senior.html", - "start_template": "eligibility/start--senior.html", - "form_class": null - } - }, - { - "model": "core.eligibilityverifier", - "pk": 6, - "fields": { - "name": "(SBMTD) eligibility server verifier", - "display_order": 7, - "active": true, - "api_url": "http://server:8000/verify", - "api_auth_header": "X-Server-API-Key", - "api_auth_key_secret_name": "mobility-pass-verifier-api-auth-key", - "eligibility_type": 6, - "public_key": 2, - "jwe_cek_enc": "A256CBC-HS512", - "jwe_encryption_alg": "RSA-OAEP", - "jws_signing_alg": "RS256", - "auth_provider": null, - "selection_label_template": "eligibility/includes/selection-label--sbmtd-mobility-pass.html", - "start_template": "eligibility/start--sbmtd-mobility-pass.html", - "form_class": "benefits.eligibility.forms.SBMTDMobilityPass", - "unverified_template": "eligibility/unverified--sbmtd-mobility-pass.html", - "help_template": "core/includes/help--sbmtd-mobility-pass.html" - } - }, - { - "model": "core.eligibilityverifier", - "pk": 7, - "fields": { - "name": "(MST) CalFresh oauth claims via Login.gov", + "name": "(CST) CalFresh oauth claims via Login.gov", "display_order": 2, "active": true, "api_url": null, "api_auth_header": null, "api_auth_key_secret_name": null, - "eligibility_type": 7, + "eligibility_type": 4, "public_key": null, "jwe_cek_enc": null, "jwe_encryption_alg": null, @@ -295,38 +190,10 @@ "model": "core.paymentprocessor", "pk": 1, "fields": { - "name": "(MST) test payment processor", - "api_base_url": "http://server:8000", - "client_id": "", - "client_secret_name": "mst-payment-processor-client-secret", - "audience": "", - "card_tokenize_url": "http://server:8000/static/tokenize.js", - "card_tokenize_func": "tokenize", - "card_tokenize_env": "test" - } - }, - { - "model": "core.paymentprocessor", - "pk": 2, - "fields": { - "name": "(SacRT) test payment processor", + "name": "(CST) test payment processor", "api_base_url": "http://server:8000", "client_id": "", - "client_secret_name": "sacrt-payment-processor-client-secret", - "audience": "", - "card_tokenize_url": "http://server:8000/static/tokenize.js", - "card_tokenize_func": "tokenize", - "card_tokenize_env": "test" - } - }, - { - "model": "core.paymentprocessor", - "pk": 3, - "fields": { - "name": "(SBMTD) test payment processor", - "api_base_url": "http://server:8000", - "client_id": "", - "client_secret_name": "sbmtd-payment-processor-client-secret", + "client_secret_name": "cst-payment-processor-client-secret", "audience": "", "card_tokenize_url": "http://server:8000/static/tokenize.js", "card_tokenize_func": "tokenize", @@ -337,63 +204,21 @@ "model": "core.transitagency", "pk": 1, "fields": { - "slug": "mst", - "short_name": "MST (local)", - "long_name": "Monterey-Salinas Transit (local)", - "agency_id": "mst", - "info_url": "https://mst.org/benefits", - "phone": "888-678-2871", + "slug": "cst", + "short_name": "CST (local)", + "long_name": "California State Transit (local)", + "agency_id": "cst", + "info_url": "https://www.agency-website.com", + "phone": "1-800-555-5555", "active": true, "payment_processor": 1, - "private_key": 3, - "public_key": 4, - "jws_signing_alg": "RS256", - "index_template": "core/index--mst.html", - "eligibility_index_template": "eligibility/index--mst.html", - "eligibility_types": [1, 7, 2, 3], - "eligibility_verifiers": [1, 7, 2, 3] - } - }, - { - "model": "core.transitagency", - "pk": 2, - "fields": { - "slug": "sacrt", - "short_name": "SacRT (local)", - "long_name": "Sacramento Regional Transit (local)", - "agency_id": "sacrt", - "info_url": "https://sacrt.com/", - "phone": "916-321-2877", - "active": true, - "payment_processor": 2, - "private_key": 3, - "public_key": 4, - "jws_signing_alg": "RS256", - "index_template": "core/index--sacrt.html", - "eligibility_index_template": "eligibility/index--sacrt.html", - "eligibility_types": [4], - "eligibility_verifiers": [4] - } - }, - { - "model": "core.transitagency", - "pk": 3, - "fields": { - "slug": "sbmtd", - "short_name": "SBMTD (local)", - "long_name": "Santa Barbara MTD (local)", - "agency_id": "sbmtd", - "info_url": "https://sbmtd.gov/taptoride/", - "phone": "805-963-3366", - "active": true, - "payment_processor": 3, - "private_key": 3, - "public_key": 4, + "private_key": 2, + "public_key": 3, "jws_signing_alg": "RS256", - "index_template": "core/index--sbmtd.html", - "eligibility_index_template": "eligibility/index--sbmtd.html", - "eligibility_types": [5, 6], - "eligibility_verifiers": [5, 6] + "index_template": "core/index--cst.html", + "eligibility_index_template": "eligibility/index--cst.html", + "eligibility_types": [1, 2, 3, 4], + "eligibility_verifiers": [1, 2, 3, 4] } } ] diff --git a/tests/cypress/plugins/helpers.js b/tests/cypress/plugins/helpers.js index a5ac68c21..db5f80496 100644 --- a/tests/cypress/plugins/helpers.js +++ b/tests/cypress/plugins/helpers.js @@ -22,10 +22,10 @@ export const selectAgency = () => { return agency; }; -export const selectCourtesyCard = () => { +export const selectAgencyCard = () => { cy.location("pathname").should("eq", `/eligibility/${agency.slug}`); - cy.contains("MST Courtesy Card").click(); + cy.contains("CST Agency Card").click(); cy.contains("Choose this benefit").click(); cy.contains("Continue").click(); }; diff --git a/tests/cypress/specs/courtesy-cards.cy.js b/tests/cypress/specs/agency-cards.cy.js similarity index 93% rename from tests/cypress/specs/courtesy-cards.cy.js rename to tests/cypress/specs/agency-cards.cy.js index 823f1db60..125e1d5e1 100644 --- a/tests/cypress/specs/courtesy-cards.cy.js +++ b/tests/cypress/specs/agency-cards.cy.js @@ -1,12 +1,12 @@ const helpers = require("../plugins/helpers"); const users = require("../fixtures/users.json"); -describe("Courtesy Cards", () => { +describe("Agency Cards", () => { beforeEach(() => { cy.visit("/"); helpers.selectAgency(); - helpers.selectCourtesyCard(); + helpers.selectAgencyCard(); }); it("Confirms an eligible user", () => { diff --git a/tests/cypress/specs/benefit-select.cy.js b/tests/cypress/specs/benefit-select.cy.js index 9ee369c5a..75101d78a 100644 --- a/tests/cypress/specs/benefit-select.cy.js +++ b/tests/cypress/specs/benefit-select.cy.js @@ -10,7 +10,7 @@ describe("Benefit selection", () => { it("User sees 4 radio buttons", () => { cy.get("input:radio").should("have.length", 4); - cy.contains("Courtesy Card"); + cy.contains("Agency Card"); cy.contains("65 years"); }); diff --git a/tests/cypress/specs/rate-limit.cy.js b/tests/cypress/specs/rate-limit.cy.js index bfc534de6..ebb245ea1 100644 --- a/tests/cypress/specs/rate-limit.cy.js +++ b/tests/cypress/specs/rate-limit.cy.js @@ -10,7 +10,7 @@ describe("Rate limiting feature spec", () => { cy.visit("/"); helpers.selectAgency(); - helpers.selectCourtesyCard(); + helpers.selectAgencyCard(); }); it("Limits excess requests", () => {