Skip to content

Conversation

@charliepark
Copy link
Contributor

We already had the logic in place to disable the clear button in the subform, we just hadn't applied it to the submit button. This PR applies the same prop logic to both the clear and the add button — you can't take either action if there's no value in the subform; if the value is there, you can take either action.

Closes #2547

@vercel
Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Nov 13, 2024 7:39pm

// addButton should be disabled again, as type has changed but no value has been entered
await expect(addButton).toBeDisabled()
await selectOption(page, subnetNameField, 'mock-subnet')
await expect(addButton).toBeEnabled()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is technically covered by the click() and expectRowVisible on the next two lines, but I think having this line here (along with the expect…Disabled two lines up) makes it clear that the selectOption on the line in the middle of them is what enabled the button.

@david-crespo david-crespo merged commit b886e4b into main Nov 13, 2024
8 checks passed
@david-crespo david-crespo deleted the disallow-submitting-subform-when-no-value branch November 13, 2024 22:20
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Nov 14, 2024
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Nov 14, 2024
oxidecomputer/console@9ef82ba...48fc079

* [48fc079a](oxidecomputer/console@48fc079a)
oxidecomputer/console#2542
* [f3d38103](oxidecomputer/console@f3d38103)
oxidecomputer/console#2545
* [eba6626d](oxidecomputer/console@eba6626d)
bump API for moved system timeseries endpoints
* [6052fdbf](oxidecomputer/console@6052fdbf)
oxidecomputer/console#2549
* [b886e4b8](oxidecomputer/console@b886e4b8)
oxidecomputer/console#2550
* [7303d9d7](oxidecomputer/console@7303d9d7)
oxidecomputer/console#2551
* [e239a8e2](oxidecomputer/console@e239a8e2)
oxidecomputer/console#2540
* [31520a2e](oxidecomputer/console@31520a2e)
move Breadcrumbs component definition into TopBar.tsx
* [ad02edec](oxidecomputer/console@ad02edec)
minor: extract UserMenu component for readability

Co-authored-by: iliana etaoin <iliana@oxide.computer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firewall rules: disallow submitting empty target or host

3 participants