{
- const ReactSelectSelector = 'input#react-select-state_select-input';
-
- describe('when the server responds successfully', () => {
- beforeEach(() => {
- cy.server();
- cy.visitAndWaitFor('/code_schools');
- cy.get('h1').should('have.text', 'Code Schools');
- });
-
- it('renders many code school cards', () => {
- // Arbitrary value, but it proves that the API is working and leading to rendered content
- cy.findAllByTestId('SchoolCard').should('have.length.greaterThan', 30);
- });
-
- it('renders "Cincy Code IT Bootcamps" and "Tech Elevator" after filtering for Ohio', () => {
- cy.get(ReactSelectSelector).type('Ohio', { force: true });
- cy.get(ReactSelectSelector).type('{enter}');
-
- cy.findByTestId('SchoolCard Name: Cincy Code IT Bootcamps').should('exist');
- cy.findByTestId('SchoolCard Name: Tech Elevator').should('exist');
- });
-
- it('only renders relevant schools after clicking on "Schools Accepting GI Bill"', () => {
- cy.findByText('Schools Accepting GI Bill').click();
-
- cy.findAllByTestId('SchoolCard').each(card => {
- cy.wrap(card).findAllByTestId('GI Bill Ribbon').should('exist');
- });
- });
-
- it('only renders code schools with an online option after clicking "Online Schools"', () => {
- cy.findByText('Online Schools').click();
-
- cy.findAllByTestId('SchoolCard').each(card => {
- cy.wrap(card).findAllByTestId('School has online').should('exist');
- });
- });
-
- it('renders no code school cards after filtering for Alaska', () => {
- cy.get(ReactSelectSelector).type('Alaska', { force: true });
- cy.get(ReactSelectSelector).type('{enter}');
-
- cy.findByTestId('SchoolCard').should('have.length', 0);
- });
-
- it('renders no school cards after filtering for Alaska then all after selecting all', () => {
- cy.get(ReactSelectSelector).type('Alaska', { force: true });
- cy.get(ReactSelectSelector).type('{enter}');
-
- cy.findByTestId('SchoolCard').should('have.length', 0);
-
- cy.findByText('All Schools').click();
- cy.findAllByTestId('SchoolCard').should('have.length.greaterThan', 30);
- });
-
- it('renders all cards after un-filtering Alaska', () => {
- cy.get(ReactSelectSelector).type('Alaska', { force: true });
- cy.get(ReactSelectSelector).type('{enter}');
- cy.get(ReactSelectSelector).type('{backspace}');
-
- cy.findAllByTestId('SchoolCard').should('have.length.greaterThan', 30);
- });
-
- it('renders all locations when opening the "view all" modal', () => {
- cy.findAllByTestId(SCHOOL_CARD_LOCATION_LIST_MODAL_BUTTON).first().click();
- cy.findByTestId(MODAL_CONTENT).should('exist').and('be.visible');
- cy.findAllByTestId(SCHOOL_LOCATION_LIST_ITEM).should('have.length.greaterThan', 1);
- cy.findByTestId(CLOSE_BUTTON).click({ force: true });
- cy.findByTestId(MODAL_CONTENT).should('not.exist');
- });
- });
-});
diff --git a/cypress/e2e/modal.spec.js b/cypress/e2e/modal.spec.js
deleted file mode 100644
index 25a596349..000000000
--- a/cypress/e2e/modal.spec.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import {
- CLOSE_BUTTON,
- MODAL_CONTENT,
- MODAL_OVERLAY,
- SCHOOL_CARD_LOCATION_LIST_MODAL_BUTTON,
-} from 'common/constants/testIDs';
-
-describe('when the server responds successfully', () => {
- beforeEach(() => {
- cy.visitAndWaitFor('/code_schools');
- cy.get('h1').should('have.text', 'Code Schools');
- });
-
- it('hides the rest of the app for accessibility purposes', () => {
- cy.get('#__next').should('not.have.attr', 'aria-hidden');
- cy.findAllByTestId(SCHOOL_CARD_LOCATION_LIST_MODAL_BUTTON).first().click();
- setTimeout(() => {
- cy.get('#__next').should('have.attr', 'aria-hidden', 'true');
- }, 2000);
- });
-
- it('closes the modal when the x button is clicked', () => {
- cy.findAllByTestId(SCHOOL_CARD_LOCATION_LIST_MODAL_BUTTON).first().click();
- cy.findByTestId(MODAL_CONTENT).should('exist').and('be.visible');
- cy.findByTestId(CLOSE_BUTTON).click();
- cy.findByTestId(MODAL_CONTENT).should('not.exist');
- });
-
- it('closes the modal when the overlay is clicked', () => {
- cy.findAllByTestId(SCHOOL_CARD_LOCATION_LIST_MODAL_BUTTON).first().click();
- cy.findByTestId(MODAL_CONTENT).should('exist').and('be.visible');
- cy.findByTestId(MODAL_OVERLAY).click({ force: true });
- cy.findByTestId(MODAL_CONTENT).should('not.exist');
- cy.findByTestId(MODAL_OVERLAY).should('not.exist');
- });
-});
diff --git a/next-sitemap.config.js b/next-sitemap.config.js
index fdf22ad8b..d62ecc9c7 100644
--- a/next-sitemap.config.js
+++ b/next-sitemap.config.js
@@ -1,4 +1,4 @@
-const priorities = { '/': '1.00', '/join': '1.00', '/code_schools': '1.00' };
+const priorities = { '/': '1.00', '/join': '1.00' };
/** @type {import('next-sitemap').IConfig} */
module.exports = {
diff --git a/pages/code_schools.js b/pages/code_schools.js
deleted file mode 100644
index 6785f6c93..000000000
--- a/pages/code_schools.js
+++ /dev/null
@@ -1,311 +0,0 @@
-import { useState } from 'react';
-import { array } from 'prop-types';
-import Head from 'components/head';
-import ThemedReactSelect from 'components/Form/Select/ThemedReactSelect';
-import HeroBanner from 'components/HeroBanner/HeroBanner';
-import Content from 'components/Content/Content';
-import FlatCard from 'components/Cards/FlatCard/FlatCard';
-import SchoolCard from 'components/Cards/SchoolCard/SchoolCard';
-import Button from 'components/Buttons/Button/Button';
-import OutboundLink from 'components/OutboundLink/OutboundLink';
-import Modal from 'components/Modal/Modal';
-import { getCodeSchoolsPromise } from 'common/constants/api';
-import States from 'common/constants/dropdown-states-values';
-import { ONE_DAY } from 'common/constants/unitsOfTime';
-import { SCHOOL_LOCATION_LIST_ITEM } from 'common/constants/testIDs';
-import edx from 'static/images/moocs/edx.jpg';
-import treehouse from 'static/images/moocs/treehouse.jpg';
-import udacity from 'static/images/moocs/udacity.jpg';
-import styles from 'styles/code_schools.module.css';
-
-const pageTitle = 'Code Schools';
-
-const moocSchools = [
- {
- logo: edx,
- name: 'edX',
- url: 'https://edx.org',
- text: 'Offers free courses with the option to pay for certificates/grading.',
- },
- {
- logo: treehouse,
- name: 'Team Treehouse',
- url: 'https://teamtreehouse.com',
- text: 'Offers only paid programs, but we have licenses available.',
- },
- {
- logo: udacity,
- name: 'Udacity',
- url: 'https://udacity.com',
- text: 'Offers free courses with the option to pay for certificates/grading.',
- },
-];
-
-export async function getStaticProps() {
- const { data: allSchools } = await getCodeSchoolsPromise();
-
- if (allSchools?.length <= 0) {
- throw new Error('`getCodeSchoolsPromise` returned an empty list');
- }
-
- return {
- props: {
- allSchools,
- },
- revalidate: ONE_DAY,
- };
-}
-
-CodeSchools.propTypes = {
- allSchools: array.isRequired,
-};
-
-function CodeSchools({ allSchools }) {
- const [filteredSchools, setFilterSchools] = useState(allSchools);
- const [selectedStates, setSelectedStates] = useState([]);
- const [locationsModalInfo, setLocationsModalInfo] = useState({ name: '', locations: [] });
-
- const handleModalOpen = ({ name, locations }) => setLocationsModalInfo({ name, locations });
-
- const handleModalClose = () => setLocationsModalInfo({ name: '', locations: [] });
-
- const filterOnline = () => {
- const onlineSchools = allSchools.filter(school => school.hasOnline);
- setFilterSchools(onlineSchools);
- setSelectedStates([]);
- };
-
- const showAllSchools = () => {
- setFilterSchools(allSchools);
- setSelectedStates([]);
- };
-
- const filterState = selectedOptions => {
- if (!selectedOptions) {
- showAllSchools();
- return;
- }
- const states = selectedOptions.map(state => state.value);
- const stateSchools = allSchools.filter(school =>
- school.locations.some(location => states.includes(location.state)),
- );
-
- if (states.length > 0) {
- setFilterSchools(stateSchools);
- setSelectedStates(selectedOptions);
- } else {
- showAllSchools();
- }
- };
-
- const filterVaApproved = () => {
- const vaApproved = allSchools.filter(school =>
- school.locations.some(location => location.vaAccepted),
- );
- setFilterSchools(vaApproved);
- setSelectedStates([]);
- };
-
- const filterVetTecApproved = () => {
- const vetTecApprovedSchools = allSchools.filter(school => school.isVetTecApproved);
- setFilterSchools(vetTecApprovedSchools);
- setSelectedStates([]);
- };
-
- const isModalOpen = Boolean(locationsModalInfo.name);
-
- return (
- <>
-
-
-
-
- Whether you're trying to find out more about a chosen school, or are just gettting
- started in your search, we're here to help. We've even partnered with some
- schools to offer scholarships, and discounts for our members.
-
-
-
-
-
-
-
-
-
-
What Are Code Schools?
-
- Code schools are accelerated learning programs that will prepare you for a career in
- software development. Each school listed below ranges in length, vary in tuition
- costs, and in programming languages. Desirable from an employer's standpoint,
- code schools are founded by software developers who saw a need for more programmers
- and aspired to teach the next generation. We encourage you to check out the schools
- below, do your research, and ask fellow techies in our Slack Community.
-
-
-
-
-
What are MOOCs?
-
- Massive, Open, Online Courses (or MOOCs) are course study programs made available
- over the internet! Typically there are start and end dates, but the work itself is
- done at your own pace. MOOCs are usually free, but there are certain benefits to
- paying for premium aspects of MOOCs.
-
-
-
-
-
What is VET TEC?
-
- This innovative new pilot program pairs eligible Veterans with market-leading
- Training Providers offering the high-tech training and skills development sought by
- employers. You will have your classes and training paid for by VA and will receive a
- monthly housing stipend during your training. When you're accepted into the
- program, you'll train in one of the five areas (computer software, information
- science, computer programming, media application, or data processing) of high-tech
- training.
-
-
-
- Please note that we update our database periodically according to the{' '}
-
- official list of VET TEC Providers
-
- , but we may display incorrect information in regards to VET TEC-approved programs.
-
- Last update: October 2nd, 2019.
-
-
-
- Interested in learning more?
-
- See{' '}
-
- the VA's website about VET TEC info.
-
-