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

MPDX-8384- Tasks modal - task type reset #1152

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Conversation

wjames111
Copy link
Contributor

Description

  • Jira Ticket 8384
  • Description: In a task modal, if I have a task type selected like Text Message, then change the phase, the task type is cleared, even if Text Message was a valid option.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@wjames111 wjames111 added On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview labels Oct 23, 2024
@wjames111 wjames111 self-assigned this Oct 23, 2024
Copy link

Preview branch generated at https://MPDX-8384-task-type-reset.d3dytjb8adxkk5.amplifyapp.com

Copy link

github-actions bot commented Oct 23, 2024

Bundle sizes [mpdx-react]

Compared against fb060bb

No significant changes found

@wjames111 wjames111 requested a review from canac October 23, 2024 16:33
Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is close! Changing the phase doesn't update the Task Name field though. We might need to trigger the handleTaskActionChange logic inside of handleTaskPhaseChange.

handleTaskPhaseChange({
phase,
setFieldValue,
setResultSelected,
setActionSelected,
setPhaseId,
setSelectedSuggestedTags,
activities,
activityRef,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing in a ref, let's pass in a focusActivity function.

Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it works!

'Phone Call',
);
await waitFor(() => {
expect(getByLabelText(/Task Name/i)).toHaveValue('Phone Appointment');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does getByRole('textbox', { name: 'Subject' }) not work here and following?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why I did it that way originally, I updated them to getByRole('textbox', { name: 'Subject' }).

@wjames111 wjames111 merged commit 44a98de into main Oct 28, 2024
17 of 18 checks passed
@wjames111 wjames111 deleted the MPDX-8384-task-type-reset branch October 28, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants