Skip to content

Commit 2aaf8f6

Browse files
committed
test(org): reach Generic Secrets' way back and read the tools search as a searchbox
1 parent 33dc524 commit 2aaf8f6

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

‎apps/sim/scripts/test-assistant-actions-e2e.ts‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ try {
602602
assert.equal(data.account.credentialId, account.credentialId)
603603
assert.equal(data.tools.length > 0, account.supported, account.name)
604604
await integrationRow(account.name).click()
605-
const permissions = page.getByRole('textbox', { name: 'Search tools', exact: true })
605+
const permissions = page.getByRole('searchbox', { name: 'Search tools', exact: true })
606606
if (account.supported) {
607607
await expect(permissions).toBeVisible()
608608
await expect(page.getByRole('radio').first()).toBeVisible()
@@ -629,7 +629,9 @@ try {
629629
})
630630
await expect(firstAccount).toBeVisible()
631631
await expect(secondAccount).toBeVisible()
632-
await expect(page.getByRole('textbox', { name: 'Search tools', exact: true })).toHaveCount(0)
632+
await expect(page.getByRole('searchbox', { name: 'Search tools', exact: true })).toHaveCount(
633+
0
634+
)
633635
await capture('integration-multiple-accounts')
634636
await expect(
635637
page.getByRole('button', { name: 'Jira integration actions', exact: true })
@@ -694,7 +696,9 @@ try {
694696
await expect(
695697
page.getByText('This account is no longer connected.', { exact: true })
696698
).toBeVisible()
697-
await expect(page.getByRole('textbox', { name: 'Search tools', exact: true })).toHaveCount(0)
699+
await expect(page.getByRole('searchbox', { name: 'Search tools', exact: true })).toHaveCount(
700+
0
701+
)
698702
const states =
699703
await sql`select id, managed_oauth_status from credential where id in (${credentialId}, ${secondCredentialId})`
700704
assert.equal(
@@ -740,7 +744,9 @@ try {
740744
page.getByText('This account is no longer connected.', { exact: true })
741745
).toBeVisible()
742746
await expect(page.getByRole('button', { name: /^Manage / })).toHaveCount(0)
743-
await expect(page.getByRole('textbox', { name: 'Search tools', exact: true })).toHaveCount(0)
747+
await expect(page.getByRole('searchbox', { name: 'Search tools', exact: true })).toHaveCount(
748+
0
749+
)
744750
await sql`update organization_search_integration set approved = false where organization_id = ${organizationId} and connector_type = 'coda'`
745751
try {
746752
await page.goto(`${baseUrl.origin}${root}/integrations`)

‎apps/sim/scripts/test-org-redesign-e2e.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,14 +2131,14 @@ async function integrationChecks() {
21312131
const saved = page.waitForRequest(
21322132
(request) => request.method() !== 'GET' && request.url().includes('permissions')
21332133
)
2134-
await group.getByRole('radio', { name: 'Block', exact: true }).check({ force: true })
2134+
await group.getByRole('radio', { name: 'Block', exact: true }).click({ force: true })
21352135
const body = (await saved).postDataJSON()
21362136
assert(
21372137
JSON.stringify(body).includes('revision') || body.expectedRevision !== undefined,
21382138
'The save carries a revision'
21392139
)
21402140
await expect(group.getByRole('radio', { name: 'Block', exact: true })).toBeChecked()
2141-
await group.getByRole('radio', { name: 'Ask', exact: true }).check({ force: true })
2141+
await group.getByRole('radio', { name: 'Ask', exact: true }).click({ force: true })
21422142
})
21432143
}
21442144
)
@@ -2168,10 +2168,7 @@ async function integrationChecks() {
21682168
address.pathname === `${root}/integrations/secrets` &&
21692169
address.searchParams.get('q') === 'secret'
21702170
)
2171-
await page
2172-
.getByRole('link', { name: /Integrations/ })
2173-
.first()
2174-
.click()
2171+
await page.locator(`a[href$="${root}/integrations?q=secret"]`).first().click()
21752172
await expect(page).toHaveURL(
21762173
(address) =>
21772174
address.pathname === `${root}/integrations` && address.searchParams.get('q') === 'secret'

0 commit comments

Comments
 (0)