Skip to content
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
6 changes: 3 additions & 3 deletions app/components/AttachEphemeralIpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ export const AttachEphemeralIpModal = ({
addToast(<>IP <HL>{ephemeralIp.ip}</HL> attached</>)
onDismiss()
},
onError: (err) => {
addToast({ title: 'Error', content: err.message, variant: 'error' })
},
})

const form = useForm({ defaultValues: { pool: defaultPool } })
Expand Down Expand Up @@ -96,6 +93,9 @@ export const AttachEphemeralIpModal = ({
noItemsPlaceholder="No pools available"
/>
</form>
{instanceEphemeralIpAttach.error && (
<p className="text-error mt-4">{instanceEphemeralIpAttach.error.message}</p>
)}
</Modal.Section>
</Modal.Body>
<Modal.Footer
Expand Down
3 changes: 0 additions & 3 deletions app/components/AttachFloatingIpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ export const AttachFloatingIpModal = ({
addToast(<>IP <HL>{floatingIp.name}</HL> attached</>)
onDismiss()
},
onError: (err) => {
addToast({ title: 'Error', content: err.message, variant: 'error' })
},
})
const form = useForm({ defaultValues: { floatingIp: '' } })
const floatingIp = form.watch('floatingIp')
Expand Down
3 changes: 0 additions & 3 deletions app/pages/project/instances/InstancePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,6 @@ export function ResizeInstanceModal({
: undefined, // Only link to the instance if we're not already on that page
})
},
onError: (err) => {
addToast({ title: 'Error', content: err.message, variant: 'error' })
},
})

const form = useForm({
Expand Down
9 changes: 3 additions & 6 deletions test/e2e/instance.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,10 @@ test('resize modal stays open on server error', async ({ page }) => {
await resizeModal.getByRole('textbox', { name: 'Memory' }).fill('20')
await resizeModal.getByRole('button', { name: 'Resize' }).click()

// Wait for the error toast, which confirms the mutation has completed
await expect(page.getByTestId('Toasts')).toContainText('Cannot update instance')

// Modal should stay open so the user can see the error and adjust values
// Error renders inline inside the modal; modal stays open so the user can
// see the error and adjust values.
await expect(resizeModal).toContainText('Cannot update instance')
await expect(resizeModal).toBeVisible()

await closeToast(page)
})

test('delete from instance detail', async ({ page }) => {
Expand Down
Loading