Skip to content

Commit

Permalink
test(contentful): disable all caches in ContentfulManage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpinol committed Jun 16, 2021
1 parent ee9efdb commit 7ff7245
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ describe('ManageContentful assets', () => {

test('TEST: createAsset and removeAsset', async () => {
const context = ctxt({ locale: ENGLISH })
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
const sut = testManageContentful()
let assetId: string
const file = JSON.stringify({ a: rndStr(), b: rndStr() })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { ctxt, testManageContentful } from './manage-contentful.helper'
describe('ManageContentful entries', () => {
const context = ctxt({ locale: ENGLISH })
test('TEST: createContent and deleteContent', async () => {
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
const sut = testManageContentful()
const id = rndStr()
const TEST_NEW_CONTENT_ID = new TopContentId(ContentType.TEXT, id)
Expand Down Expand Up @@ -83,7 +86,10 @@ describe('ManageContentful entries', () => {

test('TEST: updateFields is able to manage fields of type ButtonStyle and FollowUps', async () => {
const sut = testManageContentful()
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
const NEW_CONTENT = new TopContentId(ContentType.TEXT, rndStr())
const FOLLOW_UP_CONTENT = new TopContentId(ContentType.TEXT, rndStr())
const name = rndStr()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ describe('ManageContentful fields', () => {
'627QkyJrFo3grJryj0vu6L' //TEST_MANAGE_CMS
)
const RESTORE_TEXT_VALUE = undefined // so that it fallbacks to English
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
// @ts-ignore
let fallbackLocaleContent: cms.Text = undefined

Expand Down Expand Up @@ -58,7 +61,10 @@ describe('ManageContentful fields', () => {
newValue: string | undefined,
expectedValue: string
) {
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
const oldTextValue = (
await contentful.text(
TEST_CONTENT_ID.id,
Expand Down Expand Up @@ -152,7 +158,10 @@ describe('ManageContentful fields', () => {
test(
'TEST: copyField buttons',
async () => {
const contentful = testContentful({ disableCache: true })
const contentful = testContentful({
disableCache: true,
disableFallbackCache: true,
})
const oldContent = await contentful.text(TEST_CONTENT_ID.id)
const sut = testManageContentful()
const FROM_LOCALE = ENGLISH
Expand Down

0 comments on commit 7ff7245

Please sign in to comment.