-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get ready to extract having-problems strings
- Loading branch information
1 parent
9d1a7eb
commit 79c7a3d
Showing
21 changed files
with
48 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { StatusCodes } from 'http-status-codes' | ||
import { html, plainText } from '../html.js' | ||
import { PageResponse } from '../response.js' | ||
|
||
export const createHavingProblemsPage = (): PageResponse => | ||
PageResponse({ | ||
status: StatusCodes.SERVICE_UNAVAILABLE, | ||
title: plainText`Sorry, we’re having problems`, | ||
main: html` | ||
<h1>Sorry, we’re having problems</h1> | ||
<p>Please try again later.</p> | ||
`, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Effect } from 'effect' | ||
import type { PageResponse } from '../response.js' | ||
import { createHavingProblemsPage } from './HavingProblemsPage.js' | ||
|
||
export const HavingProblemsPage: Effect.Effect<PageResponse> = Effect.sync(createHavingProblemsPage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
visual-regression/HavingProblemsPage/HavingProblemsPage.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { createHavingProblemsPage } from '../../src/HavingProblemsPage/HavingProblemsPage.js' | ||
import { expect, test } from '../base.js' | ||
|
||
test('content looks right', async ({ showPage }) => { | ||
const content = await showPage(createHavingProblemsPage()) | ||
|
||
await expect(content).toHaveScreenshot() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...c.ts-snapshots/content-looks-right-1-Desktop-Chrome-Visual-Regression-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...content-looks-right-1-Desktop-Chrome-Visual-Regression-no-JavaScript--linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
.../content-looks-right-1-Desktop-Chrome-high-contrast-Visual-Regression-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...right-1-Desktop-Chrome-high-contrast-Visual-Regression-no-JavaScript--linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions
3
...s/content-looks-right-1-Mobile-Chrome-high-contrast-Visual-Regression-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...-right-1-Mobile-Chrome-high-contrast-Visual-Regression-no-JavaScript--linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
3 changes: 0 additions & 3 deletions
3
...-problems-page-content-looks-right-1-Desktop-Chrome-Visual-Regression-linux.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...content-looks-right-1-Desktop-Chrome-Visual-Regression-no-JavaScript--linux.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...-content-looks-right-1-Desktop-Chrome-high-contrast-Visual-Regression-linux.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...right-1-Desktop-Chrome-high-contrast-Visual-Regression-no-JavaScript--linux.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...e-content-looks-right-1-Mobile-Chrome-high-contrast-Visual-Regression-linux.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...-right-1-Mobile-Chrome-high-contrast-Visual-Regression-no-JavaScript--linux.png
This file was deleted.
Oops, something went wrong.