diff --git a/tests/cypress/utils/helpers.ts b/tests/cypress/utils/helpers.ts index b8962a00..f59beb96 100644 --- a/tests/cypress/utils/helpers.ts +++ b/tests/cypress/utils/helpers.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { createSite, deleteSite, addNode, publishAndWaitJobEnding } from "@jahia/cypress"; +import { createSite, deleteSite, addNode, addPage, publishAndWaitJobEnding } from "@jahia/cypress"; export const addSimplePage = ( parentPathOrId: string, @@ -10,23 +10,17 @@ export const addSimplePage = ( children = [], mixins = [], properties = [], -): any => { - const variables = { +): any => + addPage({ parentPathOrId: parentPathOrId, name: pageName, title: pageTitle, - primaryNodeType: "jnt:page", + language: language, template: template, mixins: mixins, - properties: [ - ...properties, - { name: "jcr:title", value: pageTitle, language: language }, - { name: "j:templateName", type: "STRING", value: template }, - ], + properties: properties, children: children, - }; - return addNode(variables); -}; + }); export const addEventPageAndEvents = ( siteKey: string, diff --git a/tests/package.json b/tests/package.json index c77d020d..29d408b0 100644 --- a/tests/package.json +++ b/tests/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@4tw/cypress-drag-drop": "^2.3.0", - "@jahia/cypress": "^7.0.0", + "@jahia/cypress": "^8.4.0", "@jahia/jahia-reporter": "^1.6.0", "@jahia/jcontent-cypress": "^3.4.0-tests.2", "@types/decompress": "^4.2.7", diff --git a/tests/yarn.lock b/tests/yarn.lock index d22b4d03..23b04c82 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -82,6 +82,13 @@ __metadata: languageName: node linkType: hard +"@faker-js/faker@npm:^10.3.0": + version: 10.6.0 + resolution: "@faker-js/faker@npm:10.6.0" + checksum: 10c0/ee285d597249a019f3a11b6705d1908616ea9e880207ca4f89e6205dbf7e98abd1129f025f5da19484f5e88f556b0629a4363745ff0bbaf1984ebf54cffde6e3 + languageName: node + linkType: hard + "@graphql-typed-document-node/core@npm:^3.1.1": version: 3.1.1 resolution: "@graphql-typed-document-node/core@npm:3.1.1" @@ -105,11 +112,13 @@ __metadata: languageName: node linkType: hard -"@jahia/cypress@npm:^7.0.0": - version: 7.4.0 - resolution: "@jahia/cypress@npm:7.4.0" +"@jahia/cypress@npm:^8.4.0": + version: 8.4.0 + resolution: "@jahia/cypress@npm:8.4.0" dependencies: "@apollo/client": "npm:^3.4.9" + "@faker-js/faker": "npm:^10.3.0" + compare-versions: "npm:^6.1.1" cypress-real-events: "npm:^1.11.0" graphql: "npm:^15.5.0" graphql-tag: "npm:^2.11.0" @@ -118,7 +127,7 @@ __metadata: ci.startup: ./ci.startup.sh env.debug: ./env.debug.sh env.run: ./env.run.sh - checksum: 10c0/e6aff07e5ee6b5616ebbd29d441321b9dbabcb4a1500efecb9f7b6b8e51def3bf0cf1a5bfd4dde1158e34ef993b697fb91839efa4d924582029ad3aa83eb13e9 + checksum: 10c0/8ae40d94931aab5c6bf498838fa035f473c753777de21c57164565a34588cba1efe1cbcd0fd818df4521ad027d4263db4cd23f440c5e5dd6ed505111de36ee31 languageName: node linkType: hard @@ -164,7 +173,7 @@ __metadata: resolution: "@jahia/javascript-modules-engine-cypress@workspace:." dependencies: "@4tw/cypress-drag-drop": "npm:^2.3.0" - "@jahia/cypress": "npm:^7.0.0" + "@jahia/cypress": "npm:^8.4.0" "@jahia/jahia-reporter": "npm:^1.6.0" "@jahia/jcontent-cypress": "npm:^3.4.0-tests.2" "@types/decompress": "npm:^4.2.7"