-
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.
Prefer a named constructor to casting
- Loading branch information
1 parent
6ce5eba
commit 16ea422
Showing
24 changed files
with
80 additions
and
80 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 |
---|---|---|
|
@@ -22,7 +22,7 @@ import { type MutableRedirectUri, OAuth2Server } from 'oauth2-mock-server' | |
import { Orcid } from 'orcid-id-ts' | ||
import type { BrowserContextOptions } from 'playwright-core' | ||
import { URL } from 'url' | ||
import type { Uuid } from 'uuid-ts' | ||
import { Uuid } from 'uuid-ts' | ||
import { | ||
EmptyDepositionC, | ||
InProgressDepositionC, | ||
|
@@ -1999,7 +1999,7 @@ export const hasAnUnverifiedEmailAddress: Fixtures< | |
ContactEmailAddressC.encode( | ||
new UnverifiedContactEmailAddress({ | ||
value: EmailAddress('[email protected]'), | ||
verificationToken: 'ff0d6f8e-7dca-4a26-b68b-93f2d2bc3c2a' as Uuid, | ||
verificationToken: Uuid('ff0d6f8e-7dca-4a26-b68b-93f2d2bc3c2a'), | ||
}), | ||
), | ||
) | ||
|
@@ -2104,7 +2104,7 @@ export const invitedToBeAnAuthor: Fixtures< | |
name: 'Josiah Carberry' as NonEmptyString, | ||
emailAddress: EmailAddress('[email protected]'), | ||
}, | ||
'bec5727e-9992-4f3b-85be-6712df617b9d' as Uuid, | ||
Uuid('bec5727e-9992-4f3b-85be-6712df617b9d'), | ||
{ | ||
author: 'Josiah Carberry', | ||
preprint: { | ||
|
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
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
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { Either } from 'effect' | ||
import { DefaultLocale } from '../../../src/locales/index.js' | ||
import { EmailAddress, type Uuid } from '../../../src/types/index.js' | ||
import { EmailAddress, Uuid } from '../../../src/types/index.js' | ||
import * as EnterEmailAddressForm from '../../../src/WriteCommentFlow/EnterEmailAddressPage/EnterEmailAddressForm.js' | ||
import * as _ from '../../../src/WriteCommentFlow/EnterEmailAddressPage/EnterEmailAddressPage.js' | ||
import { expect, test } from '../../base.js' | ||
|
||
test('content looks right', async ({ showPage }) => { | ||
const response = _.EnterEmailAddressPage({ | ||
commentId: '7ad2f67d-dc01-48c5-b6ac-3490d494f67d' as Uuid.Uuid, | ||
commentId: Uuid.Uuid('7ad2f67d-dc01-48c5-b6ac-3490d494f67d'), | ||
form: new EnterEmailAddressForm.EmptyForm(), | ||
locale: DefaultLocale, | ||
}) | ||
|
@@ -19,7 +19,7 @@ test('content looks right', async ({ showPage }) => { | |
|
||
test('content looks right when there is an email address', async ({ showPage }) => { | ||
const response = _.EnterEmailAddressPage({ | ||
commentId: '7ad2f67d-dc01-48c5-b6ac-3490d494f67d' as Uuid.Uuid, | ||
commentId: Uuid.Uuid('7ad2f67d-dc01-48c5-b6ac-3490d494f67d'), | ||
form: new EnterEmailAddressForm.CompletedForm({ | ||
emailAddress: EmailAddress.EmailAddress('[email protected]'), | ||
}), | ||
|
@@ -33,7 +33,7 @@ test('content looks right when there is an email address', async ({ showPage }) | |
|
||
test('content looks right when the email address is missing', async ({ showPage }) => { | ||
const response = _.EnterEmailAddressPage({ | ||
commentId: '7ad2f67d-dc01-48c5-b6ac-3490d494f67d' as Uuid.Uuid, | ||
commentId: Uuid.Uuid('7ad2f67d-dc01-48c5-b6ac-3490d494f67d'), | ||
form: new EnterEmailAddressForm.InvalidForm({ emailAddress: Either.left(new EnterEmailAddressForm.Missing()) }), | ||
locale: DefaultLocale, | ||
}) | ||
|
@@ -45,7 +45,7 @@ test('content looks right when the email address is missing', async ({ showPage | |
|
||
test('content looks right when the email address is invalid', async ({ showPage }) => { | ||
const response = _.EnterEmailAddressPage({ | ||
commentId: '7ad2f67d-dc01-48c5-b6ac-3490d494f67d' as Uuid.Uuid, | ||
commentId: Uuid.Uuid('7ad2f67d-dc01-48c5-b6ac-3490d494f67d'), | ||
form: new EnterEmailAddressForm.InvalidForm({ | ||
emailAddress: Either.left(new EnterEmailAddressForm.Invalid({ value: 'not an email address' })), | ||
}), | ||
|
4 changes: 2 additions & 2 deletions
4
...ession/WriteCommentFlow/NeedToVerifyEmailAddressPage/NeedToVerifyEmailAddressPage.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { DefaultLocale } from '../../../src/locales/index.js' | ||
import { EmailAddress, type Uuid } from '../../../src/types/index.js' | ||
import { EmailAddress, Uuid } from '../../../src/types/index.js' | ||
import * as _ from '../../../src/WriteCommentFlow/NeedToVerifyEmailAddressPage/NeedToVerifyEmailAddressPage.js' | ||
import { expect, test } from '../../base.js' | ||
|
||
test('content looks right', async ({ showPage }) => { | ||
const response = _.NeedToVerifyEmailAddressPage({ | ||
commentId: '7ad2f67d-dc01-48c5-b6ac-3490d494f67d' as Uuid.Uuid, | ||
commentId: Uuid.Uuid('7ad2f67d-dc01-48c5-b6ac-3490d494f67d'), | ||
emailAddress: EmailAddress.EmailAddress('[email protected]'), | ||
locale: DefaultLocale, | ||
}) | ||
|
4 changes: 2 additions & 2 deletions
4
visual-regression/WriteCommentFlow/PublishedPage/PublishedPage.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
4 changes: 2 additions & 2 deletions
4
visual-regression/WriteCommentFlow/PublishingPage/PublishingPage.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
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
Oops, something went wrong.