Skip to content

Commit

Permalink
Merge pull request #2129 from veteransaffairscanada/develop
Browse files Browse the repository at this point in the history
Hot fixes - disabling summary page + styling fixes to fallback page
  • Loading branch information
Sarah Thompson authored May 1, 2019
2 parents eecc577 + 906cf95 commit 44dd108
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 61 deletions.
43 changes: 25 additions & 18 deletions components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,33 @@ class Layout extends Component {
<ErrorBoundary>
<Content>
<SkipToMainContent skipLink={skipLink} t={t} />
<div id="header_css" css={black_bg}>
{!this.props.parentIsFallbackPage ? (
<div id="header_css" css={black_bg}>
{t("current-language-code") === "en" ? (
<VacHeaderEn t={t} url={url} />
) : (
<VacHeaderFr t={t} url={url} />
)}
</div>
) : null}
<main id="main">{this.props.children}</main>
</Content>
{!this.props.parentIsFallbackPage ? (
<div css={backgoundColour1}>
<Container>
<FeedbackBar t={t} />
</Container>
</div>
) : null}
{!this.props.parentIsFallbackPage ? (
<div id="footer_styles" css={fontStyle}>
{t("current-language-code") === "en" ? (
<VacHeaderEn t={t} url={url} />
<VacFooterEn />
) : (
<VacHeaderFr t={t} url={url} />
<VacFooterFr />
)}
</div>
<main id="main">{this.props.children}</main>
</Content>
<div css={backgoundColour1}>
<Container>
<FeedbackBar t={t} />
</Container>
</div>
<div id="footer_styles" css={fontStyle}>
{t("current-language-code") === "en" ? (
<VacFooterEn />
) : (
<VacFooterFr />
)}
</div>
) : null}
</ErrorBoundary>
{noScriptTag}
</div>
Expand All @@ -119,7 +125,8 @@ Layout.propTypes = {
url: PropTypes.object.isRequired,
skipLink: PropTypes.string.isRequired,
title: PropTypes.string,
backgroundColor: PropTypes.string
backgroundColor: PropTypes.string,
parentIsFallbackPage: PropTypes.bool
};

Layout.defaultProps = {
Expand Down
12 changes: 6 additions & 6 deletions cypress/integration/guided_experience_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("Guided Experience", function() {
cy.url().should("include", "benefits-directory");
});

it("can choose some options and get to summary and benefits directory", () => {
it("can choose some options and get to benefits directory", () => {
cy.contains(patronTypeVeteran).click();
cy.get("#nextButton").click();
cy.url().should("include", "serviceType?");
Expand All @@ -29,9 +29,9 @@ describe("Guided Experience", function() {
cy.contains(patronTypeVeteran);
});

it("can go back from summary and edit answer", () => {
cy.visit("summary");
cy.get("#edit-patronType").click();
cy.contains("Select who would be receiving the benefits.");
});
// it("can go back from summary and edit answer", () => {
// cy.visit("summary");
// cy.get("#edit-patronType").click();
// cy.contains("Select who would be receiving the benefits.");
// });
});
81 changes: 44 additions & 37 deletions fallback-pages/browser-incompatible.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,53 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Your browser is not supported | Ton navigateur n'est pas supporté</title>
<link href="//cdn.muicss.com/mui-0.9.39-rc1/css/mui.min.css" rel="stylesheet" type="text/css"/>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>
Your browser is not supported | Ton navigateur n'est pas supporté
</title>
<link
href="//cdn.muicss.com/mui-0.9.39-rc1/css/mui.min.css"
rel="stylesheet"
type="text/css"
/>
<style>
/**
* Body CSS
*/
html,
body {
height: 100%;
}
html,
body
{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
}
/**
html,
body {
height: 100%;
}
html,
body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
}
/**
* Content CSS
*/
#content-wrapper {
min-height: 100%;
}
</style>
</head>
<body>
<div id="content-wrapper" class="mui--text-center">
<br/>
<br/>
<p>
Your current version of this browser is not supported. Please update to the latest version.
To see a list of all benefits click <a href='/all-benefits'>here</a>.
</p>
<p>
Votre version actuelle de ce navigateur n'est pas supportée. S'il vous plaît mettre à jour à la dernière version.
Pour voir la liste complète des avantages, cliquez <a href='/all-benefits'>ici</a>.
</p>
</div>
</body>
#content-wrapper {
min-height: 100%;
}
</style>
</head>
<body>
<div id="content-wrapper" class="mui--text-center">
<br />
<br />
<p>
Your current version of this browser is not supported. Please update to
the latest version. To see a list of all benefits click
<a href="/all-benefits">here</a>.
</p>
<p>
Votre version actuelle de ce navigateur n'est pas supportée. S'il vous
plaît mettre à jour à la dernière version. Pour voir la liste complète
des avantages, cliquez <a href="/all-benefits?lng=fr">ici</a>.
</p>
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions pages/all-benefits.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { connect } from "react-redux";
import BenefitList from "../components/benefit_list";
import Container from "../components/container";
import Header from "../components/typography/header";
import { globalTheme } from "../theme";

const header = css`
padding-bottom: 10px;
Expand All @@ -28,6 +29,8 @@ export class AllBenefits extends Component {
title={t("titles.all_benefits")}
skipLink="#mainContent"
url={url}
backgroundColor={globalTheme.colour.paleGreyTwo}
parentIsFallbackPage={true}
>
<Container id="mainContent">
<Header size="xl" headingLevel="h1" paddingTop="30" styles={header}>
Expand Down
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ Promise.resolve(getAllData()).then(allData => {
res
.status(404)
.send("The Favourites page only exists on the staging app.");
} else if (req.url.includes("summary") && !staging) {
res
.status(404)
.send("The summary page only exists on the staging app.");
} else {
const favouriteBenefits = new Cookies(req.headers.cookie).get(
"favouriteBenefits"
Expand Down

0 comments on commit 44dd108

Please sign in to comment.