Skip to content

Commit 4af2880

Browse files
committed
test(assistant-actions): read integration states inside the page while it streams
1 parent 288b157 commit 4af2880

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,9 @@ try {
738738
const detailUrl = page.url()
739739
const connect = page.getByRole('button', { name: 'Coda', exact: true })
740740
await expect(connect).toBeEnabled()
741-
await expect(page.getByText('Connect your Coda account', { exact: true })).toBeVisible()
741+
await expect(
742+
page.getByRole('main').getByText('Connect your Coda account', { exact: true })
743+
).toBeVisible()
742744
await expect(page.getByText('meetings@acme.example', { exact: true })).toHaveCount(0)
743745
await capture('integration-enabled-empty')
744746
const forgedUrl = new URL(detailUrl)
@@ -757,7 +759,9 @@ try {
757759
await expect(integrationRow('Coda')).toBeVisible()
758760
await integrationRow('Coda').click()
759761
await expect(page).toHaveURL((url) => url.pathname === `${root}/integrations/coda`)
760-
await expect(page.getByText('Disabled by your organization', { exact: true })).toBeVisible()
762+
await expect(
763+
page.getByRole('main').getByText('Disabled by your organization', { exact: true })
764+
).toBeVisible()
761765
await expect(connect).toBeDisabled()
762766
await capture('integration-disabled-empty')
763767
} finally {
@@ -767,7 +771,9 @@ try {
767771
try {
768772
await page.reload()
769773
await expect(
770-
page.getByText('Connections are paused by your organization', { exact: true })
774+
page
775+
.getByRole('main')
776+
.getByText('Connections are paused by your organization', { exact: true })
771777
).toBeVisible()
772778
await expect(connect).toBeDisabled()
773779
await capture('integration-paused-empty')
@@ -782,7 +788,9 @@ try {
782788
await expect(salesforce).toBeVisible()
783789
await salesforce.click()
784790
await expect(page).toHaveURL((url) => url.pathname === `${root}/integrations/salesforce`)
785-
await expect(page.getByText('Connections unavailable', { exact: true })).toBeVisible()
791+
await expect(
792+
page.getByRole('main').getByText('Connections unavailable', { exact: true })
793+
).toBeVisible()
786794
await expect(page.getByRole('region', { name: 'Connected credential' })).toHaveCount(0)
787795
await expect(page.getByRole('button', { name: 'Salesforce', exact: true })).toBeDisabled()
788796
await capture('integration-disabled-app-empty')

0 commit comments

Comments
 (0)