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
7 changes: 6 additions & 1 deletion app/ui/lib/CreateButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright Oxide Computer Company
*/

import cn from 'classnames'
import { Link, type LinkProps } from 'react-router-dom'

import { AddRoundel12Icon } from '@oxide/design-system/icons/react'
Expand All @@ -14,7 +15,11 @@ import { Button, buttonStyle, type ButtonProps } from '~/ui/lib/Button'

export const CreateButton = ({ children, ...props }: ButtonProps) => (
<Button size="sm" className="shrink-0" {...props}>
<AddRoundel12Icon className="mr-2 text-accent-secondary" />
<AddRoundel12Icon
// dim the icon color from the default (text accent) because it looks a
// lot brighter than text, but default disabled color is fine
className={cn('mr-2', { 'text-accent-secondary': !props.disabled })}
/>
{children}
</Button>
)
Expand Down
8 changes: 7 additions & 1 deletion test/e2e/instance-networking.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ test('Instance networking tab — NIC table', async ({ page }) => {
'/projects/mock-project/vpcs/mock-vpc'
)

const addNicButton = page.getByRole('button', { name: 'Add network interface' })

// Ensure that the 'Add network interface' button is disabled when the instance is running
await expect(addNicButton).toBeDisabled()

// Have to stop instance to edit NICs
await stopInstance(page)

await page.click('role=button[name="Add network interface"]')
await expect(addNicButton).toBeEnabled()
await addNicButton.click()

// Add network interface
// TODO: modal title is not getting hooked up, IDs are wrong
Expand Down