Skip to content

Commit

Permalink
feat(pilot-app): rename save
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Jan 27, 2025
1 parent a135c54 commit fb1f788
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions deployables/app/app/routes/edit-route.$data.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ describe('Edit route', () => {
'New route label',
)

await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand Down Expand Up @@ -245,7 +247,9 @@ describe('Edit route', () => {

await userEvent.click(screen.getByRole('option', { name: safe }))

await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand All @@ -269,7 +273,9 @@ describe('Edit route', () => {
screen.getByRole('textbox', { name: 'Piloted Safe' }),
safe,
)
await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand All @@ -295,7 +301,9 @@ describe('Edit route', () => {
await userEvent.click(
screen.getByRole('button', { name: 'Clear piloted Safe' }),
)
await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand Down Expand Up @@ -477,7 +485,9 @@ describe('Edit route', () => {
roleId,
)

await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand Down Expand Up @@ -601,7 +611,9 @@ describe('Edit route', () => {
'MANAGER',
)

await userEvent.click(screen.getByRole('button', { name: 'Save' }))
await userEvent.click(
screen.getByRole('button', { name: 'Save & Close' }),
)

expect(mockPostMessage).toHaveBeenCalledWith(
{
Expand Down
2 changes: 1 addition & 1 deletion deployables/app/app/routes/edit-route.$data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ const EditRoute = ({
intent={Intent.Save}
disabled={state !== 'idle'}
>
Save
Save & Close
</PrimaryButton>
</div>
</Form.Actions>
Expand Down

0 comments on commit fb1f788

Please sign in to comment.