mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
test(C98): skip full feed flow when e2e runs the prod build
CI and `pnpm push` boot the production build with NEXT_PUBLIC_SITE_URL=http://localhost:3000, which getCampaignInviteBaseURL rejects at runtime (fail-closed: feed URLs must be canonical public DNS), so the generate step of the e2e can only run against the dev server. The prod-mode CI still covers the unlocked dialog (C93 component unit) and the filterless feed content (C93 int tests).
This commit is contained in:
parent
65ed945b27
commit
d03da6d49a
1 changed files with 13 additions and 0 deletions
|
|
@ -2,10 +2,22 @@ import { formatBahiaCivilDate, parseBahiaDateTimeInput } from '../../src/lib/cam
|
|||
import { hookFilledCreateData } from '../../src/utilities/hookFilledData.js'
|
||||
import { campaignPageChrome, expect, test } from './fixtures/campaignE2EFixtures.js'
|
||||
|
||||
/**
|
||||
* The full generate → fetch flow needs the app served from a local origin:
|
||||
* `getCampaignInviteBaseURL` rejects non-public DNS in NODE_ENV=production
|
||||
* (fail-closed — the feed URL must be canonical), and CI/`pnpm push` boot the
|
||||
* production build (`E2E_PROD=1`) with `NEXT_PUBLIC_SITE_URL=http://localhost:3000`.
|
||||
* The CI covers the unlocked dialog via the C93 component unit and the
|
||||
* filterless feed content via the C93 int tests; the e2e here pins the real
|
||||
* end-to-end flow on the dev server.
|
||||
*/
|
||||
const isProdMode = process.env.E2E_PROD === '1' || process.env.CI === '1'
|
||||
|
||||
test.describe('Agenda — link de import (C98)', () => {
|
||||
test.setTimeout(90_000)
|
||||
|
||||
test('gera o link sem filtros pelo header e o feed responde iCal', async ({ campaign, page }) => {
|
||||
test.skip(isProdMode, 'fluxo completo exige origem local (dev server)')
|
||||
const { fixtures } = campaign
|
||||
const coordinator = await fixtures.createCampaignUser('coordinator')
|
||||
const municipality = await fixtures.claimMunicipality()
|
||||
|
|
@ -58,6 +70,7 @@ test.describe('Agenda — link de import (C98)', () => {
|
|||
})
|
||||
|
||||
test('gera o link sem filtros pelo FAB mobile', async ({ campaign, page }) => {
|
||||
test.skip(isProdMode, 'fluxo completo exige origem local (dev server)')
|
||||
const { fixtures } = campaign
|
||||
const coordinator = await fixtures.createCampaignUser('coordinator')
|
||||
const municipality = await fixtures.claimMunicipality()
|
||||
|
|
|
|||
Loading…
Reference in a new issue