Skip to content

Commit

Permalink
Deploy CST templates to test (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Jul 10, 2024
2 parents b97aa48 + a1d718c commit 8392082
Show file tree
Hide file tree
Showing 49 changed files with 481 additions and 339 deletions.
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ body:
Reference the diagram and discussion on [the release process docs](https://docs.calitp.org/benefits/deployment/release/).
* `Regular` release: propagates from `dev` to `test`, and then `test` to `prod`. Only possible if `dev` is ready to deploy.
* `Hotfix` release: fix is merged into `prod`. After release, fix is propagated to `dev` and `test`.
* `Regular` release: propagates from `main` to `test`, and then `test` to `prod`. Only possible if `main` is ready to deploy.
* `Hotfix` release: fix is merged into `prod`. After release, fix is propagated to `main` and `test`.
- type: dropdown
id: type
attributes:
Expand All @@ -78,12 +78,12 @@ body:
label: Regular release checklist
description: Complete these items in sequence as the `Regular` release progresses
options:
- label: Ensure the `dev` branch and secrets are up to date
- label: Ensure the `main` branch and secrets are up to date
- label: Create a branch called release/version from the source branch
- label: Bump the application version
- label: Open a PR for the release branch into `dev`, merge
- label: Open a PR for the release branch into `main`, merge
- label: Ensure `test` secrets are up to date
- label: Open another PR from `dev` to `test`, merge
- label: Open another PR from `main` to `test`, merge
- label: QA the app in test
- label: Ensure `prod` secrets are up to date
- label: Open a PR for the `test` branch into `prod`, merge
Expand All @@ -109,7 +109,7 @@ body:
- label: Create a release in GitHub for the tag, generating release notes
- label: Edit release notes to link back to this Release process issue
- label: Edit release notes with additional context, images, animations, etc. as-needed
- label: Create a branch off `dev`
- label: Create a branch off `main`
- label: Open a PR from `prod` into that branch, merge
- label: (optional) Adapt hotfix to current state of `dev` in that same branch
- label: Merge the PR into `dev`
- label: (optional) Adapt hotfix to current state of `main` in that same branch
- label: Merge the PR into `main`
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "**.js"
- "**.py"
pull_request:
branches: [dev, test, prod]
branches: [main, test, prod]
paths:
- "**.js"
- "**.py"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
branches:
- dev
- main
- test
- prod

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Label dev deploys

on:
pull_request:
branches: [dev]
branches: [main]
types: [opened]
paths:
- ".github/workflows/deploy-*.yml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Label docs

on:
pull_request:
branches: [dev]
branches: [main]
types: [opened]
paths:
- 'docs/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Label infrastructure

on:
pull_request:
branches: [dev]
branches: [main]
types: [opened]
paths:
- 'docs/deployment/**'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ on:
types:
- completed
branches:
- dev
- main
pull_request:
branches:
- dev
- main
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/mkdocs.yml"
push:
branches:
- dev
- main
paths:
- "docs/**"
- "mkdocs.yml"
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
uses: dawidd6/action-download-artifact@v6
with:
workflow: tests-pytest.yml
branch: dev
branch: main
event: push
name: coverage-report
path: docs/tests/coverage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: UI & a11y tests
on:
workflow_dispatch:
pull_request:
branches: [dev, test, prod]
branches: [main, test, prod]

defaults:
run:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% load i18n %}

<h2 class="h2-sm pt-4 pt-lg-8" id="cst-agency-card">{% translate "What is an Agency Card?" %}</h2>
<p class="pt-2 pt-lg-4">
{% blocktranslate trimmed %}
California State Transit issues Agency Cards to riders who qualify for a number of reduced fare programs. This transit benefit may need to be renewed in the future based on the expiration date of the Agency Card. Learn more at the <a href="https://www.agency-website.com" target="_blank" rel="noopener noreferrer">www.agency-website.com</a>.
{% endblocktranslate %}
</p>
6 changes: 6 additions & 0 deletions benefits/core/templates/core/index--cst.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "core/agency-index.html" %}
{% load i18n %}

{% block headline %}
{% translate "Get a reduced fare on CST public transportation when you tap to ride" %}
{% endblock headline %}
29 changes: 29 additions & 0 deletions benefits/eligibility/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,35 @@ def clean(self):
raise forms.ValidationError("reCAPTCHA failed")


class CSTAgencyCard(EligibilityVerificationForm):
"""EligibilityVerification form for the CST Agency Card."""

def __init__(self, *args, **kwargs):
super().__init__(
title=_("Agency card information"),
headline=_("Let’s find the record of your transit benefit."),
blurb=_(
"We use the information on your CST Agency Card to find the record of your transit benefit in our system."
),
name_label=_("Last Name"),
name_placeholder="Hernandez-Demarcos",
name_help_text=_(
"Please enter your last name the same way it is printed on your card, including capital letters and hyphens."
),
sub_label=_("Agency Card number"),
sub_help_text=_("This is a 5-digit number on the front and back of your card."),
sub_placeholder="12345",
name_max_length=255,
sub_input_mode="numeric",
sub_max_length=5,
sub_pattern=r"\d{5}",
sub_custom_validity=_("Please enter a 5-digit number."),
name_custom_validity=_("Please enter your last name."),
*args,
**kwargs,
)


class MSTCourtesyCard(EligibilityVerificationForm):
"""EligibilityVerification form for the MST Courtesy Card."""

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "eligibility/includes/media-item--idcardcheck.html" %}

{% load i18n %}

{% block heading %}
{% translate "Your current Agency Card number" %}
{% endblock heading %}

{% block body %}
<div class="media-body--details">
<p>{% translate "You do not need to have your physical CST Agency Card, but you will need to know the number." %}</p>
</div>
{% endblock body %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "eligibility/includes/selection-label.html" %}
{% load i18n %}

{% block label %}
{% translate "Agency Card" %}
{% endblock label %}

{% block description %}
{% translate "This option is for people who have a current CST Agency Card or a CST Paratransit Eligibility Card." %}
{% endblock description %}
9 changes: 9 additions & 0 deletions benefits/eligibility/templates/eligibility/index--cst.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "eligibility/index.html" %}

{% load i18n %}

{% block explanatory-text %}
<p class="pt-4 pb-4 pb-lg-8">
{% translate "Cal-ITP doesn’t save any of your information. All CST transit benefits reduce fares by 50% for bus service on fixed routes." %}
</p>
{% endblock explanatory-text %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "eligibility/start.html" %}
{% load i18n %}

{% block page-title %}
{% translate "Agency card overview" %}
{% endblock page-title %}

{% block headline %}
<div class="col-lg-8">
<h1>{% translate "You selected an Agency Card transit benefit." %}</h1>
</div>
{% endblock headline %}

{% block media-item %}
{% include "eligibility/includes/media-item--idcardcheck--start--cst-agency-card.html" %}
{% endblock media-item %}

{% block call-to-action %}
<div class="row d-flex justify-content-lg-end">
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8">
{% url "eligibility:confirm" as button_url %}
<a href="{{ button_url }}" class="btn btn-lg btn-primary" role="button">{% translate "Continue" %}</a>
</div>
</div>
{% endblock call-to-action %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "eligibility/unverified.html" %}
{% load i18n %}

{% block unverified-headline %}
{% translate "Your card information may not have been entered correctly." %}
{% endblock unverified-headline %}

{% block unverified-body %}
{% translate "The number and last name must be entered exactly as they appear on your CST Agency Card. Please check your card and try again, or contact your transit agency for help." %}
{% endblock unverified-body %}

{% block unverified-call-to-action %}
{% translate "Try again" as button_text %}
<div class="col-lg-3 col-8">{% include "core/includes/button--origin.html" with button_text=button_text %}</div>
{% endblock unverified-call-to-action %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "enrollment/success.html" %}
{% load i18n %}

{% block headline-message %}
{% blocktranslate trimmed %}
You can now use your contactless card to tap to ride with a reduced fare!
{% endblocktranslate %}
{% endblock headline-message %}

{% block success-message %}
{% blocktranslate trimmed %}
Your contactless card is now enrolled in a CST Agency Card transit benefit. When boarding a CST bus, tap this card and you will be
charged a reduced fare. You will need to re-enroll if you choose to change the card you use to pay for transit service.
{% endblocktranslate %}
{% endblock success-message %}

{% block thank-you-message %}
{% blocktranslate trimmed %}
You were not charged anything today. Thank you for using Cal-ITP Benefits!
{% endblocktranslate %}
{% endblock thank-you-message %}
9 changes: 9 additions & 0 deletions benefits/enrollment/templates/enrollment/success--cst.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "enrollment/success.html" %}
{% load i18n %}

{% block success-message %}
{% blocktranslate trimmed %}
You were not charged anything today. When boarding a CST bus, tap your contactless card and you will be
charged a reduced fare. You will need to re-enroll if you choose to change the card you use to pay for transit service.
{% endblocktranslate %}
{% endblock success-message %}
Loading

0 comments on commit 8392082

Please sign in to comment.