Skip to content

Commit

Permalink
Merge branch 'main' into single-zip
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears authored Sep 13, 2023
2 parents 16f8738 + f29ccd9 commit ee91305
Show file tree
Hide file tree
Showing 97 changed files with 384 additions and 415 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.20 on 2023-09-13 18:04

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('wagtailcore', '0078_referenceindex'),
('wagtailforms', '0005_alter_formsubmission_form_data'),
('wagtailinventory', '0003_pageblock_id_bigautofield'),
('v1', '0008_deprecate_heading_related_posts_in_sidebar_breakout'),
('wagtailredirects', '0008_add_verbose_name_plural'),
('paying_for_college', '0002_deprecate_iug_sharing'),
]

operations = [
migrations.DeleteModel(
name='RepayingStudentDebtPage',
),
]
5 changes: 1 addition & 4 deletions cfgov/paying_for_college/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@
get_region,
make_divisible_by_6,
)
from paying_for_college.models.pages import (
CollegeCostsPage,
RepayingStudentDebtPage,
)
from paying_for_college.models.pages import CollegeCostsPage
74 changes: 15 additions & 59 deletions cfgov/paying_for_college/models/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,27 @@
from v1.models import CFGOVPage


class PayingForCollegePage(CFGOVPage):
"""A base class for our suite of PFC pages."""
class CollegeCostsPage(CFGOVPage):
"""Breaking down financial aid and loans for prospective students."""

header = StreamField(
[
("hero", molecules.Hero()),
("text_introduction", molecules.TextIntroduction()),
("featured_content", organisms.FeaturedContent()),
],
blank=True,
use_json_field=True,
)

content_panels = CFGOVPage.content_panels + [
FieldPanel("header"),
FieldPanel("content"),
]
# Tab handler interface
edit_handler = TabbedInterface(
[
ObjectList(content_panels, heading="General Content"),
ObjectList(CFGOVPage.sidefoot_panels, heading="Sidebar"),
ObjectList(CFGOVPage.settings_panels, heading="Configuration"),
]
)

class Meta:
abstract = True

def get_context(self, request, *args, **kwargs):
context = super().get_context(request)
context["return_user"] = "iped" in request.GET and request.GET["iped"]
return context


class PayingForCollegeContent(blocks.StreamBlock):
"""A base content block for PFC pages."""

full_width_text = organisms.FullWidthText()
info_unit_group = organisms.InfoUnitGroup()
expandable_group = organisms.ExpandableGroup()
expandable = organisms.Expandable()
well = organisms.Well()
raw_html_block = blocks.RawHTMLBlock(label="Raw HTML block")


class CollegeCostsPage(PayingForCollegePage):
"""Breaking down financial aid and loans for prospective students."""

header = StreamField(
content = StreamField(
[
("hero", molecules.Hero()),
("text_introduction", molecules.TextIntroduction()),
("featured_content", organisms.FeaturedContent()),
("full_width_text", organisms.FullWidthText()),
("info_unit_group", organisms.InfoUnitGroup()),
("expandable_group", organisms.ExpandableGroup()),
("expandable", organisms.Expandable()),
("well", organisms.Well()),
("raw_html_block", blocks.RawHTMLBlock(label="Raw HTML block")),
],
blank=True,
use_json_field=True,
Expand All @@ -69,28 +37,16 @@ class CollegeCostsPage(PayingForCollegePage):
FieldPanel("content"),
]

# Tab handler interface
edit_handler = TabbedInterface(
[
ObjectList(content_panels, heading="General Content"),
# ObjectList(, heading='School and living situation'),
ObjectList(CFGOVPage.settings_panels, heading="Configuration"),
]
)
content = StreamField(
PayingForCollegeContent,
blank=True,
use_json_field=True,
)
template = "paying-for-college/college-costs.html"


class RepayingStudentDebtPage(PayingForCollegePage):
"""A page to serve static subpages in the paying-for-college suite."""
template = "paying-for-college/college-costs.html"

content = StreamField(
PayingForCollegeContent,
blank=True,
use_json_field=True,
)
template = "paying-for-college/repaying-student-debt.html"
def get_context(self, request, *args, **kwargs):
context = super().get_context(request)
context["return_user"] = "iped" in request.GET and request.GET["iped"]
return context
26 changes: 0 additions & 26 deletions cfgov/paying_for_college/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
from paying_for_college.apps import PayingForCollegeConfig
from paying_for_college.models import (
Alias,
CollegeCostsPage,
ConstantCap,
ConstantRate,
Contact,
Nickname,
Notification,
Program,
RepayingStudentDebtPage,
School,
get_region,
make_divisible_by_6,
)
from v1.models import HomePage


class MakeDivisibleTest(TestCase):
Expand All @@ -40,29 +37,6 @@ def test_make_divisible(self):
self.assertTrue(make_divisible_by_6(test_value) == 48)


class PageModelsTest(TestCase):
def setUp(self):
def create_page(model, title, slug, parent):
new_page = model(live=False, title=title, slug=slug)
parent.add_child(instance=new_page)
new_page.save()
return new_page

self.ROOT_PAGE = HomePage.objects.get(slug="cfgov")
self.debt_page = create_page(
RepayingStudentDebtPage,
"Repaying student debt",
"repaying-student-debt",
self.ROOT_PAGE,
)
self.college_costs_page = create_page(
CollegeCostsPage,
"Understanding college costs",
"college-costs",
self.ROOT_PAGE,
)


class SchoolRegionTest(TestCase):
def test_get_region(self):
school = School(school_id="123456", state="NE")
Expand Down
Binary file removed npm-packages-offline-cache/@eslint-js-8.47.0.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/@eslint-js-8.49.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-console-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-core-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-expect-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/@jest-globals-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/babel-jest-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/babel-jest-29.7.0.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/eslint-8.47.0.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/eslint-8.49.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/expect-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/expect-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-29.7.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-circus-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-circus-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-cli-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-cli-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-config-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-config-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-diff-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-diff-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-docblock-29.6.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-each-29.6.3.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-each-29.7.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-haste-map-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-mock-29.6.3.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-mock-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-resolve-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-runner-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-runtime-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-snapshot-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-util-29.6.3.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-util-29.7.0.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-validate-29.6.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-watcher-29.6.4.tgz
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/jest-worker-29.6.4.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/jest-worker-29.7.0.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/postcss-8.4.29.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/prettier-3.0.2.tgz
Binary file not shown.
Binary file added npm-packages-offline-cache/prettier-3.0.3.tgz
Binary file not shown.
Binary file removed npm-packages-offline-cache/pretty-format-29.6.3.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed npm-packages-offline-cache/stylelint-less-1.0.8.tgz
Binary file not shown.
Binary file not shown.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@
"lodash.throttle": "4.1.1",
"number-to-words": "1.2.4",
"papaparse": "5.3.2",
"postcss": "8.4.28",
"postcss": "8.4.29",
"svg-inline-loader": "0.8.2"
},
"devDependencies": {
"cypress": "13.2.0",
"cypress-fail-fast": "7.0.3",
"eslint": "8.47.0",
"eslint": "8.49.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsdoc": "46.5.0",
"eslint-plugin-jsdoc": "46.6.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.33.2",
"jest": "29.6.4",
"jest-cli": "29.6.4",
"jest-environment-jsdom": "29.6.4",
"jest": "29.7.0",
"jest-cli": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-fetch-mock": "3.0.3",
"postcss-less": "6.0.0",
"prettier": "3.0.2",
"snyk": "1.1206.0",
"prettier": "3.0.3",
"snyk": "1.1217.0",
"stylelint": "15.10.3",
"stylelint-config-standard": "34.0.0",
"stylelint-less": "1.0.8"
"stylelint-less": "2.0.0"
},
"scripts": {
"enforce": "enforce-node-version",
Expand Down
Loading

0 comments on commit ee91305

Please sign in to comment.