Skip to content

Commit

Permalink
Test: Mock data updated/modified
Browse files Browse the repository at this point in the history
  • Loading branch information
antonyagustine committed Nov 16, 2023
1 parent 421fe13 commit 5df0df6
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"blt9946d3cca9edec1a": {
"test-uid-2": {
"title": "P1 Entry 1",
"block_1": [
{
"gf_1": {
"reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }],
"json_rte": { "uid": "645499f51bd042b5b8c00d0c4aba2ad1", "__v": 2 },
"reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }],
"json_rte": { "uid": "test-uid-3", "__v": 2 },
"group": { "group": { "reference": [], "group_1": { "reference": [] } } },
"_metadata": { "uid": "cse9969de09204484a" }
"_metadata": { "uid": "test-uid-4" }
}
},
{
"gf_1": {
"reference": [],
"json_rte": { "uid": "56f96390513d45d18b96f23947521a9e", "__v": 2 },
"json_rte": { "uid": "test-uid-5", "__v": 2 },
"group": { "group": { "reference": [], "group_1": { "reference": [] } } },
"_metadata": { "uid": "csbcf9341f4640fea8" }
"_metadata": { "uid": "test-uid-6" }
}
},
{
"group": {
"group": {
"reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }],
"reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }],
"json_rte": {
"type": "doc",
"attrs": {},
"uid": "37dbbe4f26844e64a438dd6fd712d1fd",
"uid": "test-uid-7",
"children": [
{
"type": "p",
"attrs": { "style": {}, "redactor-attributes": {}, "dir": "ltr" },
"uid": "948a27e7bf0942078c10e9a8887e6d96",
"uid": "test-uid-8",
"children": [{ "text": "" }]
},
{
"uid": "faa9e47da4624c2cb6e2f37e52dad328",
"uid": "test-uid-9",
"type": "reference",
"attrs": {
"display-type": "block",
"type": "entry",
"class-name": "embedded-entry redactor-component block-entry",
"entry-uid": "blt7de1517c79624a3e",
"entry-uid": "test-uid-1",
"locale": "en-us",
"content-type-uid": "page_0"
},
Expand All @@ -50,30 +50,30 @@
"_version": 1
}
},
"_metadata": { "uid": "csee87e42598d0a795" }
"_metadata": { "uid": "test-uid-13" }
}
}
],
"group_1": { "reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }] },
"group_1": { "reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }] },
"json_rte": {
"type": "doc",
"attrs": {},
"uid": "04d936d578814a229ef2098ece9bfe5e",
"uid": "test-uid-10",
"children": [
{
"type": "p",
"attrs": { "style": {}, "redactor-attributes": {}, "dir": "ltr" },
"uid": "bacb480045144db18aef6d89b6749a0f",
"uid": "test-uid-11",
"children": [{ "text": "" }]
},
{
"uid": "44fe70e03ec54ae8b72fe4b410519ebd",
"uid": "test-uid-12",
"type": "reference",
"attrs": {
"display-type": "block",
"type": "entry",
"class-name": "embedded-entry redactor-component block-entry",
"entry-uid": "blt7de1517c79624a3e",
"entry-uid": "test-uid-1",
"locale": "en-us",
"content-type-uid": "page_0"
},
Expand All @@ -82,10 +82,10 @@
],
"_version": 1
},
"reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }],
"reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }],
"tags": [],
"locale": "en-us",
"uid": "blt9946d3cca9edec1a",
"uid": "test-uid-2",
"ACL": {},
"_version": 1,
"_in_progress": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"blt339c9bd476039d76": {
"locale-uid-1": {
"code": "en-us",
"fallback_locale": null,
"uid": "blt339c9bd476039d76",
"uid": "locale-uid-1",
"name": "English - United States"
}
}
32 changes: 16 additions & 16 deletions packages/contentstack-audit/test/unit/mock/mock.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,43 +85,43 @@
"entryBlock": [
{
"gf_1": {
"reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }],
"json_rte": { "uid": "645499f51bd042b5b8c00d0c4aba2ad1", "__v": 2 },
"reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }],
"json_rte": { "uid": "test-uid-3", "__v": 2 },
"group": { "group": { "reference": [], "group_1": { "reference": [] } } },
"_metadata": { "uid": "cse9969de09204484a" }
"_metadata": { "uid": "test-uid-4" }
}
},
{
"gf_1": {
"reference": [],
"json_rte": { "uid": "56f96390513d45d18b96f23947521a9e", "__v": 2 },
"json_rte": { "uid": "test-uid-5", "__v": 2 },
"group": { "group": { "reference": [], "group_1": { "reference": [] } } },
"_metadata": { "uid": "csbcf9341f4640fea8" }
"_metadata": { "uid": "test-uid-6" }
}
},
{
"group": {
"group": {
"reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }],
"reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }],
"json_rte": {
"type": "doc",
"attrs": {},
"uid": "37dbbe4f26844e64a438dd6fd712d1fd",
"uid": "test-uid-7",
"children": [
{
"type": "p",
"attrs": { "style": {}, "redactor-attributes": {}, "dir": "ltr" },
"uid": "948a27e7bf0942078c10e9a8887e6d96",
"uid": "test-uid-8",
"children": [{ "text": "" }]
},
{
"uid": "faa9e47da4624c2cb6e2f37e52dad328",
"uid": "test-uid-9",
"type": "reference",
"attrs": {
"display-type": "block",
"type": "entry",
"class-name": "embedded-entry redactor-component block-entry",
"entry-uid": "blt7de1517c79624a3e",
"entry-uid": "test-uid-1",
"locale": "en-us",
"content-type-uid": "page_0"
},
Expand All @@ -131,7 +131,7 @@
"_version": 1
}
},
"_metadata": { "uid": "csee87e42598d0a795" }
"_metadata": { "uid": "test-uid-13" }
}
}
],
Expand Down Expand Up @@ -160,22 +160,22 @@
"entryJsonRTE": {
"type": "doc",
"attrs": {},
"uid": "04d936d578814a229ef2098ece9bfe5e",
"uid": "test-uid-10",
"children": [
{
"type": "p",
"attrs": { "style": {}, "redactor-attributes": {}, "dir": "ltr" },
"uid": "bacb480045144db18aef6d89b6749a0f",
"uid": "test-uid-11",
"children": [{ "text": "" }]
},
{
"uid": "44fe70e03ec54ae8b72fe4b410519ebd",
"uid": "test-uid-12",
"type": "reference",
"attrs": {
"display-type": "block",
"type": "entry",
"class-name": "embedded-entry redactor-component block-entry",
"entry-uid": "blt7de1517c79624a3e",
"entry-uid": "test-uid-1",
"locale": "en-us",
"content-type-uid": "page_0"
},
Expand Down Expand Up @@ -218,5 +218,5 @@
"non_localizable": false,
"unique": false
},
"entryGroupField": { "reference": [{ "uid": "blt7de1517c79624a3e", "_content_type_uid": "page_0" }] }
"entryGroupField": { "reference": [{ "uid": "test-uid-1", "_content_type_uid": "page_0" }] }
}
6 changes: 3 additions & 3 deletions packages/contentstack-audit/test/unit/modules/entries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('Entries module', () => {
class Class extends Entries {
public entries: Record<string, EntryStruct> = (
require('../mock/contents/entries/page_1/en-us/e7f6e3cc-64ca-4226-afb3-7794242ae5f5-entries.json') as any
)['blt9946d3cca9edec1a'];
)['test-uid-2'];

constructor() {
super(constructorParam);
Expand Down Expand Up @@ -217,7 +217,7 @@ describe('Entries module', () => {
data_type: undefined,
missingRefs: [
{
uid: 'blt7de1517c79624a3e',
uid: 'test-uid-1',
_content_type_uid: 'page_0',
},
],
Expand All @@ -239,7 +239,7 @@ describe('Entries module', () => {
const ctInstance = new (class Class extends Entries {
public entries: Record<string, EntryStruct> = (
require('../mock/contents/entries/page_1/en-us/e7f6e3cc-64ca-4226-afb3-7794242ae5f5-entries.json') as any
)['blt9946d3cca9edec1a'];
)['test-uid-2'];
})(constructorParam);
await ctInstance.validateGlobalField([], ctInstance.ctSchema as any, ctInstance.entries as any);

Expand Down

0 comments on commit 5df0df6

Please sign in to comment.