-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(nonlocalizedblocks): add fixture and tests (#244)
* test(nonlocalizedblocks): fixture and initial tests * test(nonlocalizedblocks): include translation test
- Loading branch information
1 parent
87998b8
commit 5811ed4
Showing
4 changed files
with
785 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
dev/src/tests/fields/lexical-editor-with-non-localized-blocks.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { Policy } from "@/payload-types"; | ||
|
||
export const fixture = { | ||
"root": { | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"detail": 0, | ||
"format": 0, | ||
"mode": "normal", | ||
"style": "", | ||
"text": "What happens if a block doesn't have any localized fields?", | ||
"type": "text", | ||
"version": 1 | ||
} | ||
], | ||
"direction": "ltr", | ||
"format": "", | ||
"indent": 0, | ||
"type": "paragraph", | ||
"version": 1, | ||
"textFormat": 0, | ||
"textStyle": "" | ||
}, | ||
{ | ||
"format": "", | ||
"type": "block", | ||
"version": 2, | ||
"fields": { | ||
"id": "678564c06ec4a6f1fcf6a623", | ||
"blockName": "", | ||
"cookieCategoryId": "strictlyNecessary", | ||
"blockType": "cookieTable" | ||
} | ||
}, | ||
{ | ||
"children": [ | ||
{ | ||
"detail": 0, | ||
"format": 0, | ||
"mode": "normal", | ||
"style": "", | ||
"text": "For example - a block that only contains a select field, which is included twice for good measure!", | ||
"type": "text", | ||
"version": 1 | ||
} | ||
], | ||
"direction": "ltr", | ||
"format": "", | ||
"indent": 0, | ||
"type": "paragraph", | ||
"version": 1, | ||
"textFormat": 0, | ||
"textStyle": "" | ||
}, | ||
{ | ||
"format": "", | ||
"type": "block", | ||
"version": 2, | ||
"fields": { | ||
"id": "678564926ec4a6f1fcf6a622", | ||
"blockName": "", | ||
"cookieCategoryId": "functional", | ||
"blockType": "cookieTable" | ||
} | ||
} | ||
], | ||
"direction": "ltr", | ||
"format": "", | ||
"indent": 0, | ||
"type": "root", | ||
"version": 1 | ||
} | ||
} as Policy['content'] |
Oops, something went wrong.