-
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 write-review/add-authors-form strings
Refs: #1817
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
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
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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ import { Doi } from 'doi-ts' | |
import * as E from 'fp-ts/lib/Either.js' | ||
import { missingE } from '../../src/form.js' | ||
import { html } from '../../src/html.js' | ||
import { DefaultLocale } from '../../src/locales/index.js' | ||
import type { PreprintTitle } from '../../src/preprint.js' | ||
import type { EmailAddress } from '../../src/types/email-address.js' | ||
import type { NonEmptyString } from '../../src/types/string.js' | ||
|
@@ -17,13 +18,16 @@ const preprint = { | |
language: 'en', | ||
} satisfies PreprintTitle | ||
|
||
const locale = DefaultLocale | ||
|
||
test('content looks right when there is another author', async ({ showPage }) => { | ||
const response = addAuthorsForm({ | ||
authors: [{ name: 'Josiah Carberry' as NonEmptyString, emailAddress: '[email protected]' as EmailAddress }], | ||
form: { | ||
anotherAuthor: E.right(undefined), | ||
}, | ||
preprint, | ||
locale, | ||
}) | ||
|
||
const content = await showPage(response) | ||
|
@@ -43,6 +47,7 @@ test('content looks right when there are other authors', async ({ showPage }) => | |
anotherAuthor: E.right(undefined), | ||
}, | ||
preprint, | ||
locale, | ||
}) | ||
|
||
const content = await showPage(response) | ||
|
@@ -57,6 +62,7 @@ test('content looks right when fields are missing', async ({ showPage }) => { | |
anotherAuthor: E.left(missingE()), | ||
}, | ||
preprint, | ||
locale, | ||
}) | ||
|
||
const content = await showPage(response) | ||
|