mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-12 22:13:05 +00:00
test(e2e): alinha o acervo à Central pública retirada (S47)
Some checks failed
Deploy / preflight (push) Has been cancelled
Deploy / verify (push) Has been cancelled
Deploy / deploy staging (teqo-staging) (push) Has been cancelled
Deploy / requeue when main advanced (push) Has been cancelled
Deploy / deploy production (teqo-1313) (push) Has been cancelled
Some checks failed
Deploy / preflight (push) Has been cancelled
Deploy / verify (push) Has been cancelled
Deploy / deploy staging (teqo-staging) (push) Has been cancelled
Deploy / requeue when main advanced (push) Has been cancelled
Deploy / deploy production (teqo-1313) (push) Has been cancelled
Os testes de exclusão da Central deixam de esperar o antigo /conteudos/<slug> (200/404) e passam a pinar o redirect permanente para /artigos, mantendo o contrato do arquivo privado no /campanha.
This commit is contained in:
parent
5635e6522c
commit
93bda37c29
1 changed files with 12 additions and 5 deletions
|
|
@ -1839,10 +1839,15 @@ test.describe('communication vertical (C154/C162)', () => {
|
||||||
)
|
)
|
||||||
expect(ficha).toContain('Apagar')
|
expect(ficha).toContain('Apagar')
|
||||||
|
|
||||||
|
// S47 — the public Central routes are retired: the slug and its media
|
||||||
|
// answer the permanent redirect regardless of the piece state.
|
||||||
const publicBefore = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
const publicBefore = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
||||||
try {
|
try {
|
||||||
expect((await publicBefore.get(`/conteudos/${slug}`)).status()).toBe(200)
|
for (const path of [`/conteudos/${slug}`, `/conteudos/${slug}/midia`]) {
|
||||||
expect((await publicBefore.get(`/conteudos/${slug}/midia`)).status()).toBe(200)
|
const response = await publicBefore.get(path, { maxRedirects: 0 })
|
||||||
|
expect(response.status()).toBe(308)
|
||||||
|
expect(new URL(response.headers().location, campaign.baseURL).pathname).toBe('/artigos')
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
await publicBefore.dispose()
|
await publicBefore.dispose()
|
||||||
}
|
}
|
||||||
|
|
@ -1874,8 +1879,10 @@ test.describe('communication vertical (C154/C162)', () => {
|
||||||
|
|
||||||
const anonymous = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
const anonymous = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
||||||
try {
|
try {
|
||||||
expect((await anonymous.get(`/conteudos/${slug}`)).status()).toBe(404)
|
expect((await anonymous.get(`/conteudos/${slug}`, { maxRedirects: 0 })).status()).toBe(308)
|
||||||
expect((await anonymous.get(`/conteudos/${slug}/midia`)).status()).toBe(404)
|
expect(
|
||||||
|
(await anonymous.get(`/conteudos/${slug}/midia`, { maxRedirects: 0 })).status(),
|
||||||
|
).toBe(308)
|
||||||
} finally {
|
} finally {
|
||||||
await anonymous.dispose()
|
await anonymous.dispose()
|
||||||
}
|
}
|
||||||
|
|
@ -1950,7 +1957,7 @@ test.describe('communication vertical (C154/C162)', () => {
|
||||||
|
|
||||||
const anonymous = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
const anonymous = await playwrightRequest.newContext({ baseURL: campaign.baseURL })
|
||||||
try {
|
try {
|
||||||
expect((await anonymous.get(`/conteudos/${slug}`)).status()).toBe(404)
|
expect((await anonymous.get(`/conteudos/${slug}`, { maxRedirects: 0 })).status()).toBe(308)
|
||||||
} finally {
|
} finally {
|
||||||
await anonymous.dispose()
|
await anonymous.dispose()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue