Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
843e7e0
build(deps-dev): bump @types/node from 20.17.30 to 20.17.32 (#2628)
dependabot[bot] Apr 30, 2025
57c3986
build(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] May 6, 2025
54c8866
build(deps-dev): bump @types/node from 20.17.32 to 20.17.43 (#2634)
dependabot[bot] May 7, 2025
cfdb0a3
build(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] May 13, 2025
cdd19b8
build(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] May 28, 2025
d42c9a2
build(deps-dev): bump @types/node from 20.17.43 to 20.17.52 (#2646)
dependabot[bot] May 29, 2025
582a74c
chore: rename team-tundra -> team-extensibility [EXT-6372] (#2649)
BobHemphill76 Jun 2, 2025
b6a4954
build(deps-dev): bump the dev-dependencies group across 1 directory w…
dependabot[bot] Jun 3, 2025
cdf8377
build(deps-dev): bump tar-fs in /test/output-integration/browser (#2651)
dependabot[bot] Jun 3, 2025
6f120e1
build(deps-dev): bump @types/node from 20.17.52 to 20.17.57 (#2654)
dependabot[bot] Jun 4, 2025
08d098f
feat: [GROOT-1871] add concept scheme on concepts (#2652)
momenzadehvida Jun 4, 2025
3de1bf0
test: Taxonomy tests are failing after adding conceptScheme on concep…
momenzadehvida Jun 13, 2025
ca7913d
feat: add forTemplatedSpaces field for env template creation [DX-173]…
whitelisab Jun 24, 2025
8553542
chore: update test entry IDs in TestDefaults for failing integ tests …
elylucas Jun 27, 2025
15bad75
fix: resolve merge conflicts
whitelisab Jun 27, 2025
5dbc062
fix: update lib/index.js imports
whitelisab Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/entities/environment-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type EnvironmentTemplateProps = {
contentTypeTemplates: Array<ContentTypeTemplateProps>
editorInterfaceTemplates: Array<EditorInterfaceTemplateProps>
}
forTemplatedSpaces?: boolean
}

export type CreateEnvironmentTemplateProps = Omit<EnvironmentTemplateProps, 'sys'>
Expand Down
6 changes: 3 additions & 3 deletions test/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ export const TestDefaults = {
withCrossSpaceReferenceId: 'test-content-type33324244',
},
entry: {
testEntryId: '5ETMRzkl9KM4omyMwKAOki',
testEntryId: '3Z76Riu91MIwPWIMG93LNb',
/** Used in the entry references specs */
testEntryReferenceId: '3ZgkmNQJxGjO9TUcnDgNQC',
/** Used in Release specs */
testEntryReleasesId: '11NZX9PeFBvuQPc6LyCRpP',
testEntryReleasesId: '7pw3xjgbpE41JJrenBessW',
/** Used in BulkAction specs */
testEntryBulkActionId: '375PMdQrwWOsifPJYP5Bb9',
testEntryBulkActionId: '6THqkC8vpDqAFtomRQazPu',
},
userId: '0DdCYLZI33Oe1uZ0FLpCzw',
userEmail: '[email protected]',
Expand Down
4 changes: 2 additions & 2 deletions test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CreateHttpClientParams } from 'contentful-sdk-core'
import { createClient } from '../lib.js'
import type { Environment, Organization, Space } from '../lib.js'
import { createClient } from '../lib/index.js'
import type { Environment, Organization, Space } from '../lib/index.js'
import { TestDefaults } from './defaults.js'

import * as testUtils from '@contentful/integration-test-utils'
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-access-token-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type {
Environment,
PlainClientAPI,
AppKeyProps,
} from '../../lib.js'
} from '../../lib/index.js'

describe('AppAccessToken api', { sequential: true }, () => {
let organization: Organization
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-action-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import type { AppActionProps, PlainClientAPI } from '../../lib.js'
import type { AppActionProps, PlainClientAPI } from '../../lib/index.js'
import {
initPlainClient,
getTestOrganization,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-bundle-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { readFileSync } from 'fs'
import { getTestOrganization, getDefaultSpace, timeoutToCalmRateLimiting } from '../helpers.js'
import type { Organization, AppDefinition, AppUpload, Space, Environment } from '../../lib.js'
import type { Organization, AppDefinition, AppUpload, Space, Environment } from '../../lib/index.js'

describe('AppBundle api', { sequential: true }, () => {
let organization: Organization
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-definition-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
getDefaultSpace,
timeoutToCalmRateLimiting,
} from '../helpers.js'
import type { Organization, Space, Environment, AppInstallation } from '../../lib.js'
import type { Organization, Space, Environment, AppInstallation } from '../../lib/index.js'

describe('AppDefinition api', { sequential: true }, () => {
let organization: Organization
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-details-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { initPlainClient, getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { AppIcon, PlainClientAPI, Organization, AppDefinition } from '../../lib.js'
import type { AppIcon, PlainClientAPI, Organization, AppDefinition } from '../../lib/index.js'

describe('AppDetails api', { sequential: true }, () => {
let appDefinition: AppDefinition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { initPlainClient, getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib/index.js'

describe('AppEventSubscription api', { sequential: true }, () => {
let appDefinition: AppDefinition
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-key-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { initPlainClient, getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib/index.js'

describe('AppKey api', { sequential: true }, () => {
let appDefinition: AppDefinition
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-signed-request-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { initPlainClient, getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib/index.js'

describe('AppKey api', { sequential: true }, () => {
let appDefinition: AppDefinition
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-signing-secret-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { initPlainClient, getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib.js'
import type { PlainClientAPI, Organization, AppDefinition } from '../../lib/index.js'

describe('AppSigningSecret api', { sequential: true }, () => {
let appDefinition: AppDefinition
Expand Down
2 changes: 1 addition & 1 deletion test/integration/app-upload-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, describe, test, beforeAll, afterAll } from 'vitest'
import { readFileSync } from 'fs'
import { getTestOrganization, timeoutToCalmRateLimiting } from '../helpers.js'
import type { Organization } from '../../lib.js'
import type { Organization } from '../../lib/index.js'

describe('AppUpload api', { sequential: true }, () => {
let organization: Organization
Expand Down
4 changes: 2 additions & 2 deletions test/integration/bulk-action-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
BulkActionPublishPayload,
BulkActionUnpublishPayload,
BulkActionValidatePayload,
} from '../../lib.js'
import type { Environment, Space } from '../../lib.js'
} from '../../lib/index.js'
import type { Environment, Space } from '../../lib/index.js'
import { waitForBulkActionProcessing } from '../../lib/methods/bulk-action.js'
import { TestDefaults } from '../defaults.js'
import { getDefaultSpace, initPlainClient, timeoutToCalmRateLimiting } from '../helpers.js'
Expand Down
5 changes: 3 additions & 2 deletions test/integration/entry-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Entry Api', () => {
})

test('Gets entry', async () => {
return environment.getEntry('5ETMRzkl9KM4omyMwKAOki').then((response) => {
return environment.getEntry(TestDefaults.entry.testEntryId).then((response) => {
expect(response.sys, 'sys').to.be.ok
expect(response.fields, 'fields').to.be.ok
})
Expand All @@ -45,7 +45,7 @@ describe('Entry Api', () => {
})
})
test('Gets Entry snapshots', async () => {
return environment.getEntry('5ETMRzkl9KM4omyMwKAOki').then((entry) => {
return environment.getEntry(TestDefaults.entry.testEntryId).then((entry) => {
return entry.getSnapshots().then((response) => {
expect(response, 'entry snapshots').ok
expect(response.items, 'entry snapshots items').ok
Expand Down Expand Up @@ -300,6 +300,7 @@ describe('Entry Api', () => {
'dog',
'human',
'kangaroo',
'test-content-type33324244',
'testEntryReferences',
],
'orders'
Expand Down
18 changes: 10 additions & 8 deletions test/integration/entry-references-integration.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { expect, describe, it, beforeAll, afterAll } from 'vitest'
import type { PlainClientAPI } from '../../lib.js'
import type { PlainClientAPI } from '../../lib/index.js'
import type { Environment } from '../../lib/entities/environment.js'
import type { Space } from '../../lib/entities/space.js'
import { TestDefaults } from '../defaults.js'
import { getDefaultSpace, initPlainClient, timeoutToCalmRateLimiting } from '../helpers.js'

const ENTRY_WITH_REFERENCES_ID = TestDefaults.entry.testEntryReferenceId
const WRONG_ENTRY_ID = '123123XD'

describe('Entry References', () => {
Expand All @@ -23,13 +22,16 @@ describe('Entry References', () => {
let entryWithReferences: any

beforeAll(async () => {
entryWithReferences = await testEnvironment.getEntryReferences(ENTRY_WITH_REFERENCES_ID, {
include: 2,
})
entryWithReferences = await testEnvironment.getEntryReferences(
TestDefaults.entry.testEntryReferenceId,
{
include: 2,
}
)
})

it('Get the correct entry with references', () => {
expect(entryWithReferences.items[0].sys.id).toBe(ENTRY_WITH_REFERENCES_ID)
expect(entryWithReferences.items[0].sys.id).toBe(TestDefaults.entry.testEntryReferenceId)
expect(entryWithReferences.includes).not.toBeUndefined()
expect(entryWithReferences.includes.Entry.length).toBeGreaterThan(0)
})
Expand Down Expand Up @@ -62,7 +64,7 @@ describe('Entry References', () => {
plainClient = initPlainClient(defaultParams)

entry = await plainClient.entry.get({
entryId: ENTRY_WITH_REFERENCES_ID,
entryId: TestDefaults.entry.testEntryReferenceId,
})

entryWithReferences = await plainClient.entry.references({
Expand All @@ -72,7 +74,7 @@ describe('Entry References', () => {
})

it('Get the correct entry with references', () => {
expect(entryWithReferences.items[0].sys.id).toBe(ENTRY_WITH_REFERENCES_ID)
expect(entryWithReferences.items[0].sys.id).toBe(TestDefaults.entry.testEntryReferenceId)
expect(entryWithReferences.includes).not.toBeUndefined()
expect(entryWithReferences.includes.Entry.length).toBeGreaterThan(0)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ describe.skip('Environment template API', () => {
contentTypeTemplates: [],
editorInterfaceTemplates: [],
},
forTemplatedSpaces: false,
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion test/unit/plain/resource-provider.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'vitest'
import { createClient } from '../../../lib.js'
import { createClient } from '../../../lib/index.js'
import setupRestAdapter from '../adapters/REST/helpers/setupRestAdapter.js'
import { resourceProviderMock } from '../mocks/entities.js'

Expand Down
2 changes: 1 addition & 1 deletion test/unit/plain/resource-type.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'vitest'
import { createClient } from '../../../lib.js'
import { createClient } from '../../../lib/index.js'
import setupRestAdapter from '../adapters/REST/helpers/setupRestAdapter.js'
import { resourceTypeMock } from '../mocks/entities.js'

Expand Down
2 changes: 1 addition & 1 deletion test/unit/plain/resource.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'vitest'
import { createClient } from '../../../lib.js'
import { createClient } from '../../../lib/index.js'
import setupRestAdapter from '../adapters/REST/helpers/setupRestAdapter.js'
import { resourceMock } from '../mocks/entities.js'

Expand Down
2 changes: 1 addition & 1 deletion test/unit/plain/webhook.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, test, expect } from 'vitest'
import { createClient } from '../../../lib.js'
import { createClient } from '../../../lib/index.js'
import setupRestAdapter from '../adapters/REST/helpers/setupRestAdapter.js'

describe('Webhook', () => {
Expand Down