Skip to content

Commit

Permalink
Merge pull request #1919 from NDLANO/playwright-rich-block-editor
Browse files Browse the repository at this point in the history
Rewrote Rich_block_text_editor to playwright
  • Loading branch information
MaPoKen authored Jul 24, 2023
2 parents d6cc535 + 6a4c7dc commit 1035683
Show file tree
Hide file tree
Showing 15 changed files with 645 additions and 72 deletions.
72 changes: 0 additions & 72 deletions cypress/e2e/Editor/rich_block_text_editor_spec.js

This file was deleted.

1 change: 1 addition & 0 deletions e2e/apiMocks/editor_contains_article.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
84 changes: 84 additions & 0 deletions e2e/apiMocks/editor_draft_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"id": 800,
"oldNdlaUrl": "//red.ndla.no/node/167916",
"revision": 14,
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"title": {
"title": "Misfornøyde kunder er gull verdt Some change",
"language": "nb"
},
"content": {
"content": "<section><p> Cypress test </p></section>",
"language": "nb"
},
"copyright": {
"license": {
"license": "CC-BY-SA-4.0",
"description": "Creative Commons Attribution-ShareAlike 4.0 International",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
},
"origin": "",
"creators": [
{
"type": "Writer",
"name": "Elisabet Romedal"
},
{
"type": "writer",
"name": "Olav Kristensen"
}
],
"processors": [],
"rightsholders": []
},
"tags": {
"tags": ["administrative rutiner", "garanti", "klager", "reklamasjon"],
"language": "nb"
},
"requiredLibraries": [],
"introduction": {
"introduction": "TEST",
"language": "nb"
},
"metaDescription": {
"metaDescription": "TEST",
"language": "nb"
},
"metaImage": {
"url": "https://api.test.ndla.no/image-api/raw/id/23264",
"alt": "Kunde med handleposer",
"language": "nb"
},
"created": "2016-06-28T09:27:41Z",
"updated": "2020-06-26T10:31:57Z",
"updatedBy": "XVtdp6Ik4kdLDjMTQE2CIxnGB6Gvhr2n",
"published": "2017-03-07T18:52:45Z",
"articleType": "standard",
"supportedLanguages": ["nb", "nn"],
"notes": [
{
"note": "Status endret",
"user": "tXiamHcvp3TZ87iSy2A5Ph424l23K4Fi",
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"timestamp": "2020-09-18T15:15:55Z"
}
],
"editorLabels": [],
"grepCodes": [],
"conceptIds": [],
"availability": "everyone",
"relatedContent": [],
"revisions": [
{
"revisionDate": "2030-01-01T00:00:00Z",
"note": "Automatisk revisjonsdato satt av systemet.",
"status": "needs-revision"
}
]
}
173 changes: 173 additions & 0 deletions e2e/apiMocks/editor_draft_history.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
[
{
"id": 800,
"oldNdlaUrl": "//red.ndla.no/node/118121",
"revision": 10,
"status": {
"current": "PUBLISHED",
"other": ["IMPORTED"]
},
"title": {
"title": "Avisa",
"language": "nn"
},
"content": {
"content": "<section><p>Test</p></section>",
"language": "nn"
},
"copyright": {
"license": {
"license": "CC-BY-SA-4.0",
"description": "Creative Commons Attribution-ShareAlike 4.0 International",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
},
"origin": "",
"creators": [
{
"type": "Writer",
"name": "Øyvind Høie"
}
],
"processors": [],
"rightsholders": []
},
"tags": {
"tags": ["mediehistorie", "medieutvikling", "test"],
"language": "nn"
},
"requiredLibraries": [],
"introduction": {
"introduction": "Test",
"language": "nn"
},
"metaDescription": {
"metaDescription": "Test",
"language": "nn"
},
"metaImage": {
"url": "https://test.api.ndla.no/image-api/raw/id/528",
"alt": "ingressbilde til fagressursen Mediehistorier",
"language": "nn"
},
"created": "2013-03-19T14:28:44Z",
"updated": "2019-10-09T06:54:55Z",
"updatedBy": "F0JvFlqhEGwhcobd6uUAW26x",
"published": "2018-01-22T19:28:09Z",
"articleType": "standard",
"supportedLanguages": ["nb", "nn"],
"notes": []
},
{
"id": 533,
"oldNdlaUrl": "//red.ndla.no/node/118121",
"revision": 9,
"status": {
"current": "PUBLISHED",
"other": ["IMPORTED"]
},
"title": {
"title": "Avisa",
"language": "nn"
},
"content": {
"content": "<section><p>Test</p></section>",
"language": "nn"
},
"copyright": {
"license": {
"license": "CC-BY-SA-4.0",
"description": "Creative Commons Attribution-ShareAlike 4.0 International",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
},
"origin": "",
"creators": [
{
"type": "Writer",
"name": "Øyvind Høie"
}
],
"processors": [],
"rightsholders": []
},
"tags": {
"tags": ["mediehistorie", "medieutvikling", "test"],
"language": "nn"
},
"requiredLibraries": [],
"introduction": {
"introduction": "Test",
"language": "nn"
},
"metaDescription": {
"metaDescription": "Test",
"language": "nn"
},
"metaImage": {
"url": "https://test.api.ndla.no/image-api/raw/id/528",
"alt": "ingressbilde til fagressursen Mediehistorier",
"language": "nn"
},
"created": "2013-03-19T14:28:44Z",
"updated": "2019-10-09T06:54:55Z",
"updatedBy": "F0JvFlqhEGwhcobd6uUAW26x",
"published": "2018-01-22T19:28:09Z",
"articleType": "standard",
"supportedLanguages": ["nb", "nn"],
"notes": [
{
"note": "Ny merknad",
"user": "F0JvFlqhEGwhcobd6uUAW26x",
"status": {
"current": "PUBLISHED",
"other": ["IMPORTED"]
},
"timestamp": "2019-09-20T05:25:27Z"
},
{
"note": "Status endret",
"user": "F0JvFlqhEGwhcobd6uUAW26x",
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"timestamp": "2019-09-20T05:25:29Z"
},
{
"note": "Test merknad",
"user": "fsexOCfJFGOKuy1C2e71OsvQwq0NWKAK",
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"timestamp": "2019-10-09T06:21:59Z"
},
{
"note": "Test merknad",
"user": "fsexOCfJFGOKuy1C2e71OsvQwq0NWKAK",
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"timestamp": "2019-10-09T06:25:39Z"
},
{
"note": "Test merknad",
"user": "fsexOCfJFGOKuy1C2e71OsvQwq0NWKAK",
"status": {
"current": "IN_PROGRESS",
"other": ["IMPORTED", "PUBLISHED"]
},
"timestamp": "2019-10-09T06:30:45Z"
},
{
"note": "Status endret",
"user": "F0JvFlqhEGwhcobd6uUAW26x",
"status": {
"current": "PUBLISHED",
"other": ["IMPORTED"]
},
"timestamp": "2019-10-09T06:54:56Z"
}
]
}
]
Loading

0 comments on commit 1035683

Please sign in to comment.