Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflow): step 2 email subtitle #7766

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,61 @@ export const Step2Empty = {
},
}

export const Step2FixedEmailDefault = {
// due to the double registration of 'workflow_type' there would be a weird interaction
KenLSM marked this conversation as resolved.
Show resolved Hide resolved
// where the default value will be reset
// thus we have to manually select the field again
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
const canvas = within(canvasElement)
await waitFor(
async () =>
expect(await canvas.getByText('Save step')).not.toBeDisabled(),
{
timeout: 5000,
},
)
await waitFor(
async () => {
await userEvent.click(await canvas.getByText('Fixed email(s)'))
},
{
timeout: 5000,
},
)
},
args: {
stepNumber: 1,
defaultValues: {
workflow_type: WorkflowType.Static,
emails: ['me@open.gov.sg', 'invalidemail'],
},
},
}
export const Step2FixedEmailEmpty = {
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
const canvas = within(canvasElement)
await waitFor(
async () =>
expect(await canvas.getByText('Save step')).not.toBeDisabled(),
KenLSM marked this conversation as resolved.
Show resolved Hide resolved
{
timeout: 5000,
},
)
await waitFor(
async () => {
await userEvent.click(await canvas.getByText('Fixed email(s)'))
},
{
timeout: 5000,
},
)
},

args: {
stepNumber: 1,
},
}

export const DeletedApprovalFieldSelected = {
args: {
stepNumber: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const StaticRespondentOption = ({
/>
<FormErrorMessage>{staticTagInputErrorMessage}</FormErrorMessage>
{!staticTagInputErrorMessage ? (
<Text textStyle="body-2" mt="0.5rem">
<Text textStyle="body-2" color="secondary.400" mt="0.5rem">
Separate multiple emails with a comma
</Text>
) : null}
Expand Down
Loading