Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmwatson committed Oct 8, 2024
1 parent 5e8b049 commit 181dbe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/[locale]/scenarios/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function Page({
</p>
)}
<h1 className="hidden">{t("title")}</h1>
{scenario.format != "bonus" && <h2 className="leading-[1em]">{scenario.title}</h2>}
{scenario.format !== "bonus" && <h2 className="leading-[1em]">{scenario.title}</h2>}
{scenario["sub-title"] && (
<h3 className="text-dark-blueish mb-5 leading-[4.5rem] has-title-ring-wide">
{scenario["sub-title"]}
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/multi-lingual.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ describe("Test scenarios with available locales", () => {
locales.map((locale) => {
cy.readFile(`messages/${locale}.json`).then((messages) => {
messages.global.scenarios.map(
(scenario: { slug: string; title: string }) => {
(scenario: { slug: string; title: string; format: string }) => {
cy.visit(
`http://localhost:3000/${locale}/scenarios/${scenario.slug}`
);
cy.get("h2").should("contain", scenario.title);
if (scenario.format !== "bonus") {
cy.get("h2").should("contain", scenario.title);
}
}
);
});
Expand Down

0 comments on commit 181dbe2

Please sign in to comment.