diff --git a/package.json b/package.json index 87ddfc4c..f44c769e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@eslint-react/eslint-plugin": "^3.0.0", "@eslint/compat": "^2.0.3", "@eslint/js": "^10.0.1", - "@jahia/cypress": "^8.0.0", + "@jahia/cypress": "^8.5.0", "@types/node": "^24.12.0", "eslint": "^10.0.3", "globals": "^17.4.0", diff --git a/tests/cypress/support/test-helpers.ts b/tests/cypress/support/test-helpers.ts index 60f62889..00f8f036 100644 --- a/tests/cypress/support/test-helpers.ts +++ b/tests/cypress/support/test-helpers.ts @@ -1,4 +1,4 @@ -import { createSite, deleteSite, addNode, getNodeByPath, publishAndWaitJobEnding } from '@jahia/cypress' +import { createSite, deleteSite, addPage, getNodeByPath, publishAndWaitJobEnding } from '@jahia/cypress' export const addSimplePage = ( parentPathOrId: string, @@ -9,23 +9,17 @@ export const addSimplePage = ( children = [], mixins = [], properties = [], -): Cypress.Chainable => { - const variables = { +): Cypress.Chainable => + 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 createLuxeSite = (siteKey: string, prepackagedSiteURL: string) => { cy.log('Creating sample site ' + siteKey + '...') diff --git a/tests/package.json b/tests/package.json index 55c38f55..b2b234d2 100644 --- a/tests/package.json +++ b/tests/package.json @@ -12,7 +12,7 @@ "author": "", "license": "MIT", "devDependencies": { - "@jahia/cypress": "^8.0.0", + "@jahia/cypress": "^8.5.0", "@jahia/eslint-config": "^2.1.2", "@jahia/jcontent-cypress": "^3.6.0-tests.2", "@types/adm-zip": "^0.5.7", diff --git a/tests/yarn.lock b/tests/yarn.lock index 3728da39..3d78ee19 100644 --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -1783,13 +1783,14 @@ __metadata: languageName: node linkType: hard -"@jahia/cypress@npm:^8.0.0": - version: 8.2.1 - resolution: "@jahia/cypress@npm:8.2.1" +"@jahia/cypress@npm:^8.5.0": + version: 8.5.0 + resolution: "@jahia/cypress@npm:8.5.0" dependencies: "@apollo/client": "npm:^3.4.9" "@faker-js/faker": "npm:^10.3.0" compare-versions: "npm:^6.1.1" + cypress-mailpit: "npm:^1.4.0" cypress-real-events: "npm:^1.11.0" graphql: "npm:^15.5.0" graphql-tag: "npm:^2.11.0" @@ -1798,7 +1799,7 @@ __metadata: ci.startup: ./ci.startup.sh env.debug: ./env.debug.sh env.run: ./env.run.sh - checksum: 10c0/d20f6133e5643801cd19938361ec4725cee96b54950555e18a3d99bb9829ac6e26f008d5b2dd4243731aee6429a0d54e32b15aacf04063e60f663e979ab767ad + checksum: 10c0/f703c7908e3da23d84af52035030f8ec9eccdc8073f38ef7b9fc5dc84e1ff06d5adb7e6f423477e709a917809248454537dd052289aae0c24ac029c05ae9d92f languageName: node linkType: hard @@ -3044,6 +3045,13 @@ __metadata: languageName: node linkType: hard +"cypress-mailpit@npm:^1.4.0": + version: 1.4.0 + resolution: "cypress-mailpit@npm:1.4.0" + checksum: 10c0/4cd3788b228c9869331bedd1abd03f2d4e33ce6fb6e287fd5da569e8283fb5bba62f5866095ebe67c31633fbcb031b547df345a33bfb57953c0c45d0039ecd23 + languageName: node + linkType: hard + "cypress-multi-reporters@npm:^2.0.5": version: 2.0.5 resolution: "cypress-multi-reporters@npm:2.0.5" @@ -5318,7 +5326,7 @@ __metadata: version: 0.0.0-use.local resolution: "luxe-jahia-demo-cypress@workspace:." dependencies: - "@jahia/cypress": "npm:^8.0.0" + "@jahia/cypress": "npm:^8.5.0" "@jahia/eslint-config": "npm:^2.1.2" "@jahia/jcontent-cypress": "npm:^3.6.0-tests.2" "@types/adm-zip": "npm:^0.5.7" diff --git a/yarn.lock b/yarn.lock index 570a202f..da68524f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -857,13 +857,14 @@ __metadata: languageName: node linkType: hard -"@jahia/cypress@npm:^8.0.0": - version: 8.2.1 - resolution: "@jahia/cypress@npm:8.2.1" +"@jahia/cypress@npm:^8.5.0": + version: 8.5.0 + resolution: "@jahia/cypress@npm:8.5.0" dependencies: "@apollo/client": "npm:^3.4.9" "@faker-js/faker": "npm:^10.3.0" compare-versions: "npm:^6.1.1" + cypress-mailpit: "npm:^1.4.0" cypress-real-events: "npm:^1.11.0" graphql: "npm:^15.5.0" graphql-tag: "npm:^2.11.0" @@ -872,7 +873,7 @@ __metadata: ci.startup: ./ci.startup.sh env.debug: ./env.debug.sh env.run: ./env.run.sh - checksum: 10c0/d20f6133e5643801cd19938361ec4725cee96b54950555e18a3d99bb9829ac6e26f008d5b2dd4243731aee6429a0d54e32b15aacf04063e60f663e979ab767ad + checksum: 10c0/f703c7908e3da23d84af52035030f8ec9eccdc8073f38ef7b9fc5dc84e1ff06d5adb7e6f423477e709a917809248454537dd052289aae0c24ac029c05ae9d92f languageName: node linkType: hard @@ -986,7 +987,7 @@ __metadata: "@eslint-react/eslint-plugin": "npm:^3.0.0" "@eslint/compat": "npm:^2.0.3" "@eslint/js": "npm:^10.0.1" - "@jahia/cypress": "npm:^8.0.0" + "@jahia/cypress": "npm:^8.5.0" "@types/node": "npm:^24.12.0" eslint: "npm:^10.0.3" globals: "npm:^17.4.0" @@ -2124,6 +2125,13 @@ __metadata: languageName: node linkType: hard +"cypress-mailpit@npm:^1.4.0": + version: 1.4.0 + resolution: "cypress-mailpit@npm:1.4.0" + checksum: 10c0/4cd3788b228c9869331bedd1abd03f2d4e33ce6fb6e287fd5da569e8283fb5bba62f5866095ebe67c31633fbcb031b547df345a33bfb57953c0c45d0039ecd23 + languageName: node + linkType: hard + "cypress-real-events@npm:^1.11.0": version: 1.15.0 resolution: "cypress-real-events@npm:1.15.0"