Scope the entrypoint edit check's buttons; fit the type row at 360px
check / check (push) Successful in 3m20s
check / check (push) Successful in 3m20s
The browser test's entrypoint edit check clicked any Cancel and Save on the page, which now also match the add target form's hidden buttons, so the clicks timed out. It finds them inside the edit form. The type choice takes p-2 and flex-1 in place of w-32, so it, Next and Cancel share one row on a 360px-wide phone with "Database" shown in full. Model: opus-5-5
This commit is contained in:
@@ -489,9 +489,13 @@ func checkEntrypointEdit(
|
||||
) {
|
||||
t.Helper()
|
||||
|
||||
// Cancel and Save are found inside the edit form, since the add
|
||||
// target form has buttons of the same names.
|
||||
const (
|
||||
editForm = `form[action$="/edit"]`
|
||||
input = editForm + ` input[name="description"]`
|
||||
cancelEdit = `//form[contains(@action, "/edit")]/button[text()="Cancel"]`
|
||||
saveEdit = `//form[contains(@action, "/edit")]/button[text()="Save"]`
|
||||
description = `//span[text()="Entrypoint"]`
|
||||
edit = `//button[text()="Edit"]`
|
||||
)
|
||||
@@ -512,7 +516,7 @@ func checkEntrypointEdit(
|
||||
require.NoError(t, chromedp.Run(
|
||||
ctx, chromedp.SendKeys(input, "draft", chromedp.ByQuery),
|
||||
))
|
||||
click(ctx, t, `//button[text()="Cancel"]`)
|
||||
click(ctx, t, cancelEdit)
|
||||
assert.True(t, hidden(ctx, editForm),
|
||||
"clicking Cancel does not hide the edit form")
|
||||
assert.True(t, shown(ctx, description),
|
||||
@@ -554,7 +558,7 @@ func checkEntrypointEdit(
|
||||
require.NoError(t, chromedp.Run(
|
||||
ctx, chromedp.SendKeys(input, "Billing sender", chromedp.ByQuery),
|
||||
))
|
||||
click(ctx, t, `//button[text()="Save"]`)
|
||||
click(ctx, t, saveEdit)
|
||||
|
||||
assert.True(t, shown(ctx, `//span[text()="Billing sender"]`),
|
||||
"saving the edit form does not change the description")
|
||||
|
||||
Reference in New Issue
Block a user