test(e2e): validate webhook target url

This commit is contained in:
kolaente 2026-04-21 11:17:55 +02:00 committed by kolaente
parent 8bcdc314b1
commit 2f2aafadfd
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import {test, expect} from '../../support/fixtures'
import {ProjectFactory} from '../../factories/project'
test.describe('Project webhooks', () => {
test.beforeEach(async ({authenticatedPage, currentUser}) => {
await ProjectFactory.create(1, {id: 1, owner_id: currentUser.id}, false)
})
test('validates the target URL', async ({authenticatedPage: page}) => {
await page.goto('/projects/1/settings/webhooks')
await page.waitForLoadState('networkidle')
await page.locator('#targetUrl').fill('not-a-url')
await page.locator('#targetUrl').blur()
await expect(page.locator('.help.is-danger')).toContainText(/valid URL/i)
})
})