diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62fde16c..d742dc24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: npm run update:axonivy:next npm install npm run build:production - npm run download:engine https://dev.axonivy.com/permalink/dev/axonivy-engine.zip + npm run download:engine https://dev.axonivy.com/permalink/nightly/axonivy-engine.zip rm -r extension/AxonIvyEngine/system/demo-applications npm run test:playwright:download:vscode extension/AxonIvyEngine/bin/AxonIvyEngine startdaemon diff --git a/build/integration/base/Dockerfile b/build/integration/base/Dockerfile deleted file mode 100644 index f2228163..00000000 --- a/build/integration/base/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM mcr.microsoft.com/playwright:v1.50.1-jammy - -RUN apt-get update && apt-get install -y wget apt-transport-https && \ - wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /usr/share/keyrings/adoptium.asc && \ - echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list && \ - apt-get update && apt-get install -y temurin-21-jdk maven && \ - apt-get purge -y wget && \ - apt-get clean - -ENV CI=true diff --git a/build/integration/base/Jenkinsfile b/build/integration/base/Jenkinsfile deleted file mode 100644 index b4bbc825..00000000 --- a/build/integration/base/Jenkinsfile +++ /dev/null @@ -1,49 +0,0 @@ -pipeline { - agent any - - options { - buildDiscarder(logRotator(numToKeepStr: '60', artifactNumToKeepStr: '2')) - } - - triggers { - cron '@midnight' - } - - parameters { - string(name: 'dockerImageTag', defaultValue: 'dev', description: 'docker image tag') - booleanParam(name: 'forcePush', defaultValue: false, description: 'Force push even if not on master or a release branch') - } - - stages { - stage('build') { - steps { - script { - docker.withRegistry('https://docker-registry.ivyteam.io', 'docker-registry.ivyteam.io') { - sh """ - export IMAGE_TAG=docker-registry.ivyteam.io/axonivy/playwright-base:${params.dockerImageTag} - export PUSH="${pushOption()}" - build/integration/base/build.sh - """ - } - } - } - } - } - - post { - always { - cleanWs() - } - } -} - -def pushOption() { - if(isReleaseOrMasterBranch()) { - return '--push --platform linux/amd64,linux/arm64' - } - return '--load' -} - -def isReleaseOrMasterBranch() { - return env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('release/') || params.forcePush -} diff --git a/build/integration/base/build.sh b/build/integration/base/build.sh deleted file mode 100755 index 17406f04..00000000 --- a/build/integration/base/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [[ -z "${IMAGE_TAG}" ]]; then - IMAGE_TAG="axonivy/playwright-base:local" -fi - -if [[ -z "${PUSH}" ]]; then - PUSH="--load" -fi - -docker buildx create --name mymultibuilder --driver docker-container --bootstrap --use -echo "building image ${IMAGE_TAG}" - -docker buildx build --no-cache --pull --tag ${IMAGE_TAG} ${PUSH} -f build/integration/base/Dockerfile . diff --git a/build/integration/openvscode-server/Dockerfile b/build/integration/openvscode-server/Dockerfile deleted file mode 100644 index 83305c01..00000000 --- a/build/integration/openvscode-server/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM docker-registry.ivyteam.io/axonivy/openvscode-server-base:dev - -ENV IVY_EXTENSION="designer-13.vsix" -ARG IVY_HOME=/usr/lib/axonivy-engine - -COPY extension/${IVY_EXTENSION} /tmp/exts/ -COPY playwright/tests/workspaces/ /home/workspace -COPY extension/AxonIvyEngine/ ${IVY_HOME} - -USER root -SHELL ["/bin/bash", "-c"] -RUN ${OPENVSCODE} --install-builtin-extension /tmp/exts/${IVY_EXTENSION} - -RUN chown -R openvscode-server /home/workspace -RUN mkdir ${IVY_HOME}/logs - -ENTRYPOINT [ "/bin/sh", "-c", "/usr/lib/axonivy-engine/bin/AxonIvyEngine startdaemon & exec ${OPENVSCODE_SERVER_ROOT}/bin/openvscode-server --host 0.0.0.0 --without-connection-token \"${@}\"", "--" ] diff --git a/build/integration/openvscode-server/Jenkinsfile b/build/integration/openvscode-server/Jenkinsfile index 125f2015..1aaea793 100644 --- a/build/integration/openvscode-server/Jenkinsfile +++ b/build/integration/openvscode-server/Jenkinsfile @@ -1,6 +1,11 @@ pipeline { agent any + tools { + jdk 'temurin-jdk-21.0.6.7' + maven '3.9' + } + options { buildDiscarder(logRotator(numToKeepStr: '60', artifactNumToKeepStr: '2')) disableConcurrentBuilds() @@ -12,24 +17,33 @@ pipeline { parameters { string(name: 'engineDownloadUrl', defaultValue: 'https://jenkins.ivyteam.io/job/core_product-engine/job/master/lastSuccessfulBuild/artifact/workspace/ch.ivyteam.ivy.server.product/target/products/*_Slim_*.zip/*zip*/products.zip', description: 'engine that will be packaged') + string(name: 'openvscodeVersion', defaultValue: 'v1.96.4', description: 'openvscode version that will be used') + } + + environment { + JAVA_OPTS_IVY_SYSTEM = '-Divy.engine.testheadless=true' + CI = 'true' + RUN_IN_BRWOSER = 'true' } stages { stage('Build') { - agent { - dockerfile { - filename 'build/Dockerfile' - reuseNode true - } - } - steps { script { - sh 'npm run update:axonivy:next' - sh 'npm install' - sh 'npm run build:production' - sh 'npm run download:engine ' + params.engineDownloadUrl - sh 'npm run package' + nodejs(nodeJSInstallationName: '22.11.0') { + sh """ + npm run update:axonivy:next + npm install + npm run build:production + npm run download:engine ${params.engineDownloadUrl} + wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-${params.openvscodeVersion}/openvscode-server-${params.openvscodeVersion}-linux-x64.tar.gz + tar -xzf openvscode-server-${params.openvscodeVersion}-linux-x64.tar.gz + cp -r extension/. openvscode-server-${params.openvscodeVersion}-linux-x64/extensions/extension + nohup extension/AxonIvyEngine/bin/AxonIvyEngine & + nohup openvscode-server-${params.openvscodeVersion}-linux-x64/bin/openvscode-server --host 0.0.0.0 --without-connection-token --disable-workspace-trust & + npx playwright install --with-deps chromium + """ + } } } } @@ -37,15 +51,13 @@ pipeline { stage('Playwright Tests') { steps { script { - docker.build('openvscode-server', '-f build/integration/openvscode-server/Dockerfile .').withRun("--network host", "--disable-workspace-trust") { container -> - docker.image('docker-registry.ivyteam.io/axonivy/playwright-base:dev').inside("--network host -e RUN_IN_BRWOSER=true") { - catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { - sh 'npm run test:playwright:browser' - } - archiveArtifacts artifacts: '**/playwright/test-results/**', allowEmptyArchive: true - withChecks('WebTests') { - junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/node_modules/**/report.xml' - } + nodejs(nodeJSInstallationName: '22.11.0') { + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { + sh 'npm run test:playwright:browser' + } + archiveArtifacts artifacts: '**/playwright/test-results/**', allowEmptyArchive: true + withChecks('WebTests') { + junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/node_modules/**/report.xml' } } } diff --git a/package-lock.json b/package-lock.json index c8e51b36..0d2edde3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,12 +11,12 @@ "playwright/" ], "dependencies": { - "@axonivy/dataclass-editor": "13.1.0-next.457", - "@axonivy/form-editor": "13.1.0-next.595", - "@axonivy/form-editor-core": "13.1.0-next.595", + "@axonivy/dataclass-editor": "13.1.0-next.461", + "@axonivy/form-editor": "13.1.0-next.597", + "@axonivy/form-editor-core": "13.1.0-next.597", "@axonivy/process-editor": "13.1.0-next.1423", "@axonivy/process-editor-inscription": "13.1.0-next.1423", - "@axonivy/variable-editor": "13.1.0-next.605", + "@axonivy/variable-editor": "13.1.0-next.607", "vscode-messenger-common": "0.4.5" }, "devDependencies": { @@ -187,12 +187,12 @@ } }, "node_modules/@axonivy/dataclass-editor": { - "version": "13.1.0-next.457", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/dataclass-editor/-/dataclass-editor-13.1.0-next.457.tgz", - "integrity": "sha512-a2ksONHSBU/CMujhOYIDGK3ex6vmAUvdel82ohG+EufYscZC1nrmrfR9zyI01n1YzI0RZsH+OTopiJclF+Z0qQ==", + "version": "13.1.0-next.461", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/dataclass-editor/-/dataclass-editor-13.1.0-next.461.tgz", + "integrity": "sha512-Q+9RelaJbWNgobhVHk+CwqCZzW9mAnFLdjsG++vSaxcKWBJPRvPsXx/Gc99DEEGVR+J6VLjpWyy6P22AfakYpA==", "license": "Apache-2.0", "dependencies": { - "@axonivy/dataclass-editor-protocol": "13.1.0-next.457+655c9f6" + "@axonivy/dataclass-editor-protocol": "13.1.0-next.461+79f07cc" }, "peerDependencies": { "@axonivy/jsonrpc": "~13.1.0-next", @@ -204,9 +204,9 @@ } }, "node_modules/@axonivy/dataclass-editor-protocol": { - "version": "13.1.0-next.457", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/dataclass-editor-protocol/-/dataclass-editor-protocol-13.1.0-next.457.tgz", - "integrity": "sha512-2o40Eb+vk5sqljooy/XVapwKnMKnfzuPaPNO1CwiIcCKfrXwUT1mpRdon415OtbhUFflrR+OzHRzD4ATDnj3fg==", + "version": "13.1.0-next.461", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/dataclass-editor-protocol/-/dataclass-editor-protocol-13.1.0-next.461.tgz", + "integrity": "sha512-NojwrTZzMLjQ02mN7p0OQf/5USxqPpDesGHo1+dufP53+NoPvgvFok2RcIp69VuzbydhMzW2ci8kILtQxNC61g==", "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)" }, "node_modules/@axonivy/eslint-config": { @@ -231,12 +231,12 @@ } }, "node_modules/@axonivy/form-editor": { - "version": "13.1.0-next.595", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor/-/form-editor-13.1.0-next.595.tgz", - "integrity": "sha512-qEqXf8qIbao7Ii1/ElaQeRcej26irdt1LyqoonDEFu9Ckh5yo9PXQDYF3xAyYm1Oe/zrPq+oNdWHpryDnfzsPw==", + "version": "13.1.0-next.597", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor/-/form-editor-13.1.0-next.597.tgz", + "integrity": "sha512-qwKO72Qz0jccUp2fEEMU8z0LtmWWKo4aqpYK1x9IxY93tI7uhYZdAd5QkV6EVx7Mr6L6orALL2BtESqPVBuN2Q==", "license": "Apache-2.0", "dependencies": { - "@axonivy/form-editor-protocol": "13.1.0-next.595+5368cd6", + "@axonivy/form-editor-protocol": "13.1.0-next.597+7625728", "@dnd-kit/core": "^6.3.1", "react-aria": "^3.37.0", "react-error-boundary": "^5.0.0" @@ -250,21 +250,21 @@ } }, "node_modules/@axonivy/form-editor-core": { - "version": "13.1.0-next.595", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor-core/-/form-editor-core-13.1.0-next.595.tgz", - "integrity": "sha512-JbhlLaxuaLA496BtxAqVj273p7TtuIYScURCaPkiJqVLluvh4mYEfeNIkvJxRRvDoV5IhPu8Dn55Tg5ekA5U0A==", + "version": "13.1.0-next.597", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor-core/-/form-editor-core-13.1.0-next.597.tgz", + "integrity": "sha512-wKpGRMiZtt10vfiSUqdLxshi4qSrmBD9G8oV8wVPuFMGMSzqcCBgFEHmhRXE58e8yJ7LaoomUEnvy0ZQF7suXg==", "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)", "dependencies": { - "@axonivy/form-editor-protocol": "13.1.0-next.595+5368cd6" + "@axonivy/form-editor-protocol": "13.1.0-next.597+7625728" }, "peerDependencies": { "@axonivy/jsonrpc": "~13.1.0-next" } }, "node_modules/@axonivy/form-editor-protocol": { - "version": "13.1.0-next.595", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor-protocol/-/form-editor-protocol-13.1.0-next.595.tgz", - "integrity": "sha512-sRrmp2LzSXL67EowvQj0MDY0Woy/J17VZz9M8f2yZnOTSpWlZCQtEIfvAEQ4u83oIPWNDdyXZKFfjtHGHRGjKw==", + "version": "13.1.0-next.597", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/form-editor-protocol/-/form-editor-protocol-13.1.0-next.597.tgz", + "integrity": "sha512-w2UWImNRsGciN+xbcWgr7o+sajZvAlTv/EsAMhRuxL+t6WJHiqSRWfOfQPrcGlvpojVeRgWSe7uQzsUueXPv/A==", "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)" }, "node_modules/@axonivy/jsonrpc": { @@ -423,12 +423,12 @@ "peer": true }, "node_modules/@axonivy/variable-editor": { - "version": "13.1.0-next.605", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/variable-editor/-/variable-editor-13.1.0-next.605.tgz", - "integrity": "sha512-ZCnrgkc85RieNdOGz4/xzmILtwd9WnDh6SSAVGXjP2ap7itpjvtyMVYNaoNhZl3/5kEsjXqEVz6D+kvlKjdjLA==", + "version": "13.1.0-next.607", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/variable-editor/-/variable-editor-13.1.0-next.607.tgz", + "integrity": "sha512-dpsOpFk403LZdA0jTuWHLm7NFu6tIPY+PaBS+fgFGSvjvwjkU7Oavbar5+V7QQx+N8L8kMhlKJdErxUYJPL7hQ==", "license": "Apache-2.0", "dependencies": { - "@axonivy/variable-editor-protocol": "13.1.0-next.605+b09bd88", + "@axonivy/variable-editor-protocol": "13.1.0-next.607+c340c8b", "@tanstack/react-virtual": "^3.12.0", "yaml": "^2.7.0" }, @@ -442,9 +442,9 @@ } }, "node_modules/@axonivy/variable-editor-protocol": { - "version": "13.1.0-next.605", - "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/variable-editor-protocol/-/variable-editor-protocol-13.1.0-next.605.tgz", - "integrity": "sha512-fGfobZVWnKA7kwWDs3eSCG9R0wVNMRHbew7cAxPaSseos2O7HXQfsv8RxkR4/nBKtXodILTrvNN15NfciZfdhw==", + "version": "13.1.0-next.607", + "resolved": "https://npmjs-registry.ivyteam.ch/@axonivy/variable-editor-protocol/-/variable-editor-protocol-13.1.0-next.607.tgz", + "integrity": "sha512-Z/BKv3iCPU4jOxnbsbAwg6z5jWtVxgyZXz+VmxBsT41TxD0qF085GwZIRBpF1LN2M7Qa6a7kZXlXFO7xujEwcg==", "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)" }, "node_modules/@axonivy/vscode-extensions-playwright": { diff --git a/package.json b/package.json index 1c2d5fb5..7f9b8c7c 100644 --- a/package.json +++ b/package.json @@ -30,12 +30,12 @@ "watch": "lerna run watch --parallel" }, "dependencies": { - "@axonivy/dataclass-editor": "13.1.0-next.457", - "@axonivy/form-editor": "13.1.0-next.595", - "@axonivy/form-editor-core": "13.1.0-next.595", + "@axonivy/dataclass-editor": "13.1.0-next.461", + "@axonivy/form-editor": "13.1.0-next.597", + "@axonivy/form-editor-core": "13.1.0-next.597", "@axonivy/process-editor": "13.1.0-next.1423", "@axonivy/process-editor-inscription": "13.1.0-next.1423", - "@axonivy/variable-editor": "13.1.0-next.605", + "@axonivy/variable-editor": "13.1.0-next.607", "vscode-messenger-common": "0.4.5" }, "devDependencies": { diff --git a/playwright/playwright.config.ts b/playwright/playwright.config.ts index 345a6c7c..2ca1f96f 100644 --- a/playwright/playwright.config.ts +++ b/playwright/playwright.config.ts @@ -3,7 +3,9 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ use: { permissions: ['clipboard-read'], - trace: 'retain-on-failure' + trace: 'on-first-retry', + screenshot: 'on', + video: 'on-first-retry' }, testDir: './tests', workers: 1, diff --git a/playwright/tests/create-data-class.spec.ts b/playwright/tests/create-data-class.spec.ts index 65d88517..fc12e4de 100644 --- a/playwright/tests/create-data-class.spec.ts +++ b/playwright/tests/create-data-class.spec.ts @@ -1,21 +1,13 @@ import { test } from './fixtures/baseTest'; -import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace'; import { FileExplorer } from './page-objects/explorer-view'; -import path from 'path'; import { DataClassEditor } from './page-objects/data-class-editor'; import { Editor } from './page-objects/editor'; test.describe('Create Data Class', () => { - test.afterAll(async () => { - const projectPath = path.join(prebuiltWorkspacePath); - removeFromWorkspace(projectPath, 'dataclasses', 'ch'); - removeFromWorkspace(projectPath, 'src_dataClasses', 'ch'); - }); - test('Add new Data Class', async ({ page }) => { const explorer = new FileExplorer(page); await explorer.hasDeployProjectStatusMessage(); - const dataClassName = randomArtefactName(); + const dataClassName = 'testCreateData'; await explorer.addDataClass(dataClassName, 'ch.ivyteam.test.data'); await explorer.hasNode(`${dataClassName}.d.json`); const dataClassEditor = new DataClassEditor(page, `${dataClassName}.d.json`); diff --git a/playwright/tests/create-process.spec.ts b/playwright/tests/create-process.spec.ts index 59ab7959..10532a3b 100644 --- a/playwright/tests/create-process.spec.ts +++ b/playwright/tests/create-process.spec.ts @@ -1,4 +1,3 @@ -import { prebuiltEmptyWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace'; import { expect } from '@playwright/test'; import { ProcessEditor } from './page-objects/process-editor'; import { FileExplorer } from './page-objects/explorer-view'; @@ -7,22 +6,14 @@ import { test } from './fixtures/baseTest'; test.describe('Create Process', () => { let explorer: FileExplorer; let processEditor: ProcessEditor; - let processName: string; - const cleanUp = () => removeFromWorkspace(prebuiltEmptyWorkspacePath, 'processes'); - - test.use({ workspace: prebuiltEmptyWorkspacePath }); + const processName = 'testCreateProcess'; test.beforeEach(async ({ page }) => { explorer = new FileExplorer(page); await explorer.hasDeployProjectStatusMessage(); - processName = randomArtefactName(); processEditor = new ProcessEditor(page, `${processName}.p.json`); }); - test.afterAll(async () => { - cleanUp(); - }); - test('Add business process, execute, edit and redeploy', async ({ page }) => { await processEditor.hasNoStatusMessage(); await explorer.addProcess(processName, 'Business Process'); diff --git a/playwright/tests/create-project.spec.ts b/playwright/tests/create-project.spec.ts index f957adcf..33548b3b 100644 --- a/playwright/tests/create-project.spec.ts +++ b/playwright/tests/create-project.spec.ts @@ -1,25 +1,15 @@ import { test } from './fixtures/baseTest'; import { ProcessEditor } from './page-objects/process-editor'; -import { empty, removeFromWorkspace } from './workspaces/workspace'; +import { empty } from './workspaces/workspace'; import { FileExplorer } from './page-objects/explorer-view'; import { ProblemsView } from './page-objects/problems-view'; test.describe('Create Project', () => { - const rootFolder = 'parent'; - - test.beforeAll(async () => { - removeFromWorkspace(empty, rootFolder); - }); - - test.afterAll(async () => { - removeFromWorkspace(empty, rootFolder); - }); - test.use({ workspace: empty }); test('Add Project and execute init Process', async ({ page }) => { const explorer = new FileExplorer(page); - await explorer.addNestedProject(rootFolder, 'testProject'); + await explorer.addNestedProject('parent', 'testProject'); await explorer.hasStatusMessage('Finished: Create new Project', 60_000); await explorer.hasNoStatusMessage(); diff --git a/playwright/tests/create-user-dialog.spec.ts b/playwright/tests/create-user-dialog.spec.ts index 000b5f59..e3fcf822 100644 --- a/playwright/tests/create-user-dialog.spec.ts +++ b/playwright/tests/create-user-dialog.spec.ts @@ -1,37 +1,21 @@ import { test } from './fixtures/baseTest'; -import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace'; import { expect } from '@playwright/test'; import { ProcessEditor } from './page-objects/process-editor'; import { FileExplorer } from './page-objects/explorer-view'; -import path from 'path'; import { FormEditor } from './page-objects/form-editor'; test.describe('Create User Dialog', () => { let explorer: FileExplorer; let processEditor: ProcessEditor; - let userDialogName: string; - const cleanUp = () => { - const projectPath = path.join(prebuiltWorkspacePath); - removeFromWorkspace(projectPath, 'src_hd', 'ch'); - removeFromWorkspace(projectPath, 'src_dataClasses', 'ch'); - }; - - test.beforeAll(async ({}) => { - cleanUp(); - }); + const userDialogName = 'testCreateUserDialog'; test.beforeEach(async ({ page }) => { explorer = new FileExplorer(page); await explorer.hasDeployProjectStatusMessage(); processEditor = new ProcessEditor(page); - userDialogName = randomArtefactName(); await explorer.hasNoStatusMessage(); }); - test.afterAll(async () => { - cleanUp(); - }); - test('Add Html Dialog', async () => { await explorer.addUserDialog(userDialogName, 'ch.ivyteam.test', 'Html Dialog'); await explorer.hasNode(`${userDialogName}.xhtml`); diff --git a/playwright/tests/data-class-editor.spec.ts b/playwright/tests/data-class-editor.spec.ts index 36f51f93..9f7884bd 100644 --- a/playwright/tests/data-class-editor.spec.ts +++ b/playwright/tests/data-class-editor.spec.ts @@ -2,7 +2,6 @@ import { expect } from 'playwright/test'; import { BrowserView } from './page-objects/browser-view'; import { test } from './fixtures/baseTest'; import { DataClassEditor } from './page-objects/data-class-editor'; -import { randomArtefactName } from './workspaces/workspace'; import { Editor } from './page-objects/editor'; test.describe('Data Class Editor', () => { @@ -10,7 +9,6 @@ test.describe('Data Class Editor', () => { const editor = new DataClassEditor(page); await editor.hasDeployProjectStatusMessage(); await editor.openEditorFile(); - await editor.executeCommand('View: Reopen Editor With...', 'Axon Ivy Data Class Editor'); await editor.isViewVisible(); await editor.viewFrameLoactor().getByRole('button', { name: /Help/ }).click(); @@ -21,7 +19,7 @@ test.describe('Data Class Editor', () => { .viewFrameLoactor() .getByRole('button', { name: /Add Attribute/ }) .click(); - const attributeName = randomArtefactName(); + const attributeName = 'testAttributeName'; const dialog = editor.viewFrameLoactor().getByRole('dialog'); await dialog.getByRole('textbox', { name: 'Name' }).fill(attributeName); await dialog.getByRole('button', { name: 'Create Attribute' }).click(); diff --git a/playwright/tests/fixtures/baseTest.ts b/playwright/tests/fixtures/baseTest.ts index 59282e85..50161b05 100644 --- a/playwright/tests/fixtures/baseTest.ts +++ b/playwright/tests/fixtures/baseTest.ts @@ -5,6 +5,8 @@ import path from 'path'; import { prebuiltWorkspacePath } from '../workspaces/workspace'; import { FileExplorer } from '../page-objects/explorer-view'; import { downloadVersion } from '../utils/download-version'; +import os from 'os'; +import fs from 'fs'; export const runInBrowser = process.env.RUN_IN_BRWOSER ? true : false; @@ -23,14 +25,17 @@ const runBrowserTest = async (workspace: string, take: (r: Page) => Promise Promise) => { const vscodePath = await downloadAndUnzipVSCode(downloadVersion); + const tmpWorkspace = await createTmpWorkspace(workspace); const electronApp = await _electron.launch({ executablePath: vscodePath, args: [ @@ -41,7 +46,7 @@ const runElectronAppTest = async (workspace: string, take: (r: Page) => Promise< '--skip-release-notes', '--disable-workspace-trust', `--extensionDevelopmentPath=${path.resolve(__dirname, '../../../extension/')}`, - workspace + tmpWorkspace ] }); const page = await electronApp.firstWindow(); @@ -57,12 +62,17 @@ const runElectronAppTest = async (workspace: string, take: (r: Page) => Promise< test.info().attachments.push({ name: 'screenshot', path: tracePath, contentType: 'image/png' }); } await electronApp.close(); + await fs.promises.rm(tmpWorkspace, { recursive: true }); }; const initialize = async (page: Page) => { const fileExplorer = new FileExplorer(page); await fileExplorer.hasIvyStatusBarIcon(); - await fileExplorer.saveAllFiles(); await fileExplorer.closeAllTabs(); - await fileExplorer.collapseFolders(); +}; + +const createTmpWorkspace = async (workspace: string) => { + const tmpDir = await fs.promises.realpath(await fs.promises.mkdtemp(path.join(os.tmpdir(), 'playwrightTestWorkspace'))); + await fs.promises.cp(workspace, tmpDir, { recursive: true }); + return tmpDir; }; diff --git a/playwright/tests/form-editor.spec.ts b/playwright/tests/form-editor.spec.ts index 58601bc9..7c46ec81 100644 --- a/playwright/tests/form-editor.spec.ts +++ b/playwright/tests/form-editor.spec.ts @@ -1,5 +1,4 @@ import { expect } from 'playwright/test'; -import { randomArtefactName } from './workspaces/workspace'; import { FormEditor } from './page-objects/form-editor'; import { BrowserView } from './page-objects/browser-view'; import { test } from './fixtures/baseTest'; @@ -23,7 +22,7 @@ test.describe('Form Editor', () => { const input = editor.locatorFor('.block-input'); await input.dblclick(); const labelProperty = editor.locatorFor('#properties').getByLabel('Label'); - const newLabel = randomArtefactName(); + const newLabel = 'newTestLabel'; await labelProperty.click(); await expect(labelProperty).toBeFocused(); await page.keyboard.type(newLabel); diff --git a/playwright/tests/inscription-view.spec.ts b/playwright/tests/inscription-view.spec.ts index b49e096c..c9f3d715 100644 --- a/playwright/tests/inscription-view.spec.ts +++ b/playwright/tests/inscription-view.spec.ts @@ -1,6 +1,5 @@ import { expect } from '@playwright/test'; import { ProcessEditor } from './page-objects/process-editor'; -import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace'; import { BrowserView } from './page-objects/browser-view'; import { wait } from './utils/timeout'; import { test } from './fixtures/baseTest'; @@ -12,14 +11,6 @@ const namespace = 'testNamespace'; test.describe('Inscription View', () => { let processEditor: ProcessEditor; - const cleanUp = () => { - removeFromWorkspace(prebuiltWorkspacePath, 'src_hd', 'prebuiltProject'); - removeFromWorkspace(prebuiltWorkspacePath, 'processes', namespace); - }; - - test.beforeAll(async () => { - cleanUp(); - }); test.beforeEach(async ({ page }) => { processEditor = new ProcessEditor(page); @@ -28,10 +19,6 @@ test.describe('Inscription View', () => { await processEditor.isViewVisible(); }); - test.afterAll(() => { - cleanUp(); - }); - test('Check Process Editor Connector', async () => { let element = processEditor.locatorForPID(userDialogPID1); await expect(element).toBeVisible(); @@ -115,7 +102,7 @@ test.describe('Inscription View', () => { const processStartField = inscriptionView.parent.getByRole('combobox'); await expect(processStartField).toBeEmpty(); await inscriptionView.clickButton('Create new Sub Process'); - const processName = randomArtefactName(); + const processName = 'subProcess'; await inscriptionView.provideUserInput(`${namespace}/${processName}`); await processEditor.isDirty(); await processEditor.isInactive(); @@ -131,7 +118,7 @@ test.describe('Inscription View', () => { const dialogField = inscriptionView.parent.getByRole('combobox'); await expect(dialogField).toBeEmpty(); await inscriptionView.clickButton('Create new Html Dialog'); - const userDialogName = randomArtefactName(); + const userDialogName = 'htmlDialog'; await inscriptionView.provideUserInput('JSF'); await inscriptionView.provideUserInput(userDialogName); await inscriptionView.provideUserInput(); @@ -152,7 +139,7 @@ test.describe('Inscription View', () => { const dialogField = inscriptionView.parent.getByRole('combobox'); await expect(dialogField).toBeEmpty(); await inscriptionView.clickButton('Create new Html Dialog'); - const userDialogName = randomArtefactName(); + const userDialogName = 'formDialog'; await inscriptionView.provideUserInput('Form'); await inscriptionView.provideUserInput(userDialogName); await inscriptionView.provideUserInput(); @@ -171,7 +158,7 @@ test.describe('Inscription View', () => { const dialogField = inscriptionView.parent.getByRole('combobox'); await expect(dialogField).toBeEmpty(); await inscriptionView.clickButton('Create new Html Dialog'); - const userDialogName = randomArtefactName(); + const userDialogName = 'offlineDialog'; await inscriptionView.provideUserInput('JSFOffline'); await inscriptionView.provideUserInput(userDialogName); await inscriptionView.provideUserInput(); diff --git a/playwright/tests/page-objects/explorer-view.ts b/playwright/tests/page-objects/explorer-view.ts index e100661a..565a1068 100644 --- a/playwright/tests/page-objects/explorer-view.ts +++ b/playwright/tests/page-objects/explorer-view.ts @@ -107,10 +107,6 @@ export class FileExplorer extends ExplorerView { await this.provideUserInput(dataClass); await this.provideUserInput(namespace); } - - async collapseFolders() { - await this.executeCommand('Collapse Folders in Explorer'); - } } export class ProjectExplorerView extends ExplorerView { diff --git a/playwright/tests/page-objects/variables-editor.ts b/playwright/tests/page-objects/variables-editor.ts index a0baec36..ec6db947 100644 --- a/playwright/tests/page-objects/variables-editor.ts +++ b/playwright/tests/page-objects/variables-editor.ts @@ -29,7 +29,7 @@ export class VariablesEditor extends Editor { async selectFirstRow() { const firstRow = this.viewFrameLoactor().locator('tbody > tr'); - await firstRow.click(); + await firstRow.first().click(); } async updateValue(value: string) { diff --git a/playwright/tests/process-animation.spec.ts b/playwright/tests/process-animation.spec.ts index 42a3c946..ff365229 100644 --- a/playwright/tests/process-animation.spec.ts +++ b/playwright/tests/process-animation.spec.ts @@ -1,18 +1,14 @@ import { expect } from '@playwright/test'; import { ProcessEditor } from './page-objects/process-editor'; -import { animationWorkspacePath } from './workspaces/workspace'; import { FileExplorer } from './page-objects/explorer-view'; import { test } from './fixtures/baseTest'; test.describe('Process Animation', () => { - test.use({ workspace: animationWorkspacePath }); - test.beforeEach(async ({ page }) => { await new FileExplorer(page).hasDeployProjectStatusMessage(); }); test('with activated animation and reset afterwards', async ({ page }) => { - test.skip(process.platform === 'win32'); const processEditor = new ProcessEditor(page, 'Animation.p.json'); await processEditor.openEditorFile(); const start = processEditor.locatorForPID('190EEC366DECC66A-f0'); diff --git a/playwright/tests/utils/app.ts b/playwright/tests/utils/app.ts deleted file mode 100644 index 8808c9d2..00000000 --- a/playwright/tests/utils/app.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { ElectronApplication, _electron } from '@playwright/test'; -import { downloadAndUnzipVSCode } from '@vscode/test-electron'; -import * as path from 'path'; -import { downloadVersion } from './download-version'; - -const args = [ - '--disable-updates', - '--disable-workspace-trust', - '--extensionDevelopmentPath=' + path.resolve(__dirname, '../../../extension/'), - '--new-window', - '--skip-release-notes', - '--skip-welcome', - '--no-sandbox' -]; - -export async function launchElectronApp(workspacePath: string, testTitle: string): Promise { - const executablePath = await downloadAndUnzipVSCode(downloadVersion); - return await _electron.launch({ - executablePath, - args: [...args, workspacePath], - recordVideo: recordVideo(testTitle) - }); -} - -function recordVideo(testTitle: string) { - if (process.platform == 'win32') { - return; - } - return { - dir: path.join(__dirname, '..', '..', 'playwright-videos', testTitle.replaceAll(' ', '_')) - }; -} diff --git a/playwright/tests/variables-editor.spec.ts b/playwright/tests/variables-editor.spec.ts index 211404b6..050c71b5 100644 --- a/playwright/tests/variables-editor.spec.ts +++ b/playwright/tests/variables-editor.spec.ts @@ -1,6 +1,5 @@ import { expect } from '@playwright/test'; import { VariablesEditor } from './page-objects/variables-editor'; -import { randomArtefactName } from './workspaces/workspace'; import { BrowserView } from './page-objects/browser-view'; import { test } from './fixtures/baseTest'; @@ -14,7 +13,7 @@ test('Read, write and open help', async ({ page }) => { await editor.hasKey('originalKey'); await editor.hasValue('originalValue', false); - const newValue = `originalValue-${randomArtefactName()}`; + const newValue = 'newTestValue'; await editor.selectFirstRow(); await editor.updateValue(newValue); await page.waitForTimeout(300); diff --git a/playwright/tests/workspaces/animationProject/.classpath b/playwright/tests/workspaces/animationProject/.classpath deleted file mode 100644 index ee878da7..00000000 --- a/playwright/tests/workspaces/animationProject/.classpath +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/playwright/tests/workspaces/animationProject/.project b/playwright/tests/workspaces/animationProject/.project deleted file mode 100644 index e5338692..00000000 --- a/playwright/tests/workspaces/animationProject/.project +++ /dev/null @@ -1,53 +0,0 @@ - - - animationProject - - - - - - ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder - - - - - ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder - - - - - ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - ch.ivyteam.ivy.project.IvyProjectNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.jem.beaninfo.BeanInfoNature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/playwright/tests/workspaces/animationProject/.settings/ch.ivyteam.ivy.designer.prefs b/playwright/tests/workspaces/animationProject/.settings/ch.ivyteam.ivy.designer.prefs deleted file mode 100644 index 8b7cae87..00000000 --- a/playwright/tests/workspaces/animationProject/.settings/ch.ivyteam.ivy.designer.prefs +++ /dev/null @@ -1,3 +0,0 @@ -ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=animationProject -ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 \ No newline at end of file diff --git a/playwright/tests/workspaces/animationProject/.vscode/settings.json b/playwright/tests/workspaces/animationProject/.vscode/settings.json deleted file mode 100644 index 674f2ca1..00000000 --- a/playwright/tests/workspaces/animationProject/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "engine.runByExtension": false, - "window.zoomLevel": -1, - "extensions.ignoreRecommendations": true, - "git.openRepositoryInParentFolders": "never", - "process.animation.animate": false -} diff --git a/playwright/tests/workspaces/animationProject/config/roles.xml b/playwright/tests/workspaces/animationProject/config/roles.xml deleted file mode 100644 index 59892fed..00000000 --- a/playwright/tests/workspaces/animationProject/config/roles.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Everybody - diff --git a/playwright/tests/workspaces/animationProject/pom.xml b/playwright/tests/workspaces/animationProject/pom.xml deleted file mode 100644 index b942ede2..00000000 --- a/playwright/tests/workspaces/animationProject/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 4.0.0 - animationProject - animationProject - 1.0.0-SNAPSHOT - iar - - 13.1.0-SNAPSHOT - UTF-8 - - - - - com.axonivy.ivy.ci - project-build-plugin - ${project.build.plugin.version} - true - - - - \ No newline at end of file diff --git a/playwright/tests/workspaces/animationProject/target/classes/animationProject/Data.class b/playwright/tests/workspaces/animationProject/target/classes/animationProject/Data.class deleted file mode 100644 index 439637d0..00000000 Binary files a/playwright/tests/workspaces/animationProject/target/classes/animationProject/Data.class and /dev/null differ diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/.classpath b/playwright/tests/workspaces/prebuiltEmptyProject/.classpath deleted file mode 100644 index ee878da7..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/.classpath +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/.project b/playwright/tests/workspaces/prebuiltEmptyProject/.project deleted file mode 100644 index 2b7cda32..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/.project +++ /dev/null @@ -1,53 +0,0 @@ - - - prebuiltEmptyProject - - - - - - ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder - - - - - ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder - - - - - ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - ch.ivyteam.ivy.project.IvyProjectNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.jem.beaninfo.BeanInfoNature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/.settings/ch.ivyteam.ivy.designer.prefs b/playwright/tests/workspaces/prebuiltEmptyProject/.settings/ch.ivyteam.ivy.designer.prefs deleted file mode 100644 index cae18f64..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/.settings/ch.ivyteam.ivy.designer.prefs +++ /dev/null @@ -1,3 +0,0 @@ -ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=prebuiltEmptyProject -ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13 -ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001 \ No newline at end of file diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/.vscode/settings.json b/playwright/tests/workspaces/prebuiltEmptyProject/.vscode/settings.json deleted file mode 100644 index 2314133d..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "engine.runByExtension": false, - "window.zoomLevel": -1, - "extensions.ignoreRecommendations": true, - "git.openRepositoryInParentFolders": "never" -} diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/config/roles.xml b/playwright/tests/workspaces/prebuiltEmptyProject/config/roles.xml deleted file mode 100644 index 59892fed..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/config/roles.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - Everybody - diff --git a/playwright/tests/workspaces/prebuiltEmptyProject/pom.xml b/playwright/tests/workspaces/prebuiltEmptyProject/pom.xml deleted file mode 100644 index 0d765b43..00000000 --- a/playwright/tests/workspaces/prebuiltEmptyProject/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 4.0.0 - prebuiltEmptyProject - prebuiltEmptyProject - 1.0.0-SNAPSHOT - iar - - 13.1.0-SNAPSHOT - UTF-8 - - - - - com.axonivy.ivy.ci - project-build-plugin - ${project.build.plugin.version} - true - - - - \ No newline at end of file diff --git a/playwright/tests/workspaces/animationProject/processes/Animation.p.json b/playwright/tests/workspaces/prebuiltProject/processes/Animation.p.json similarity index 95% rename from playwright/tests/workspaces/animationProject/processes/Animation.p.json rename to playwright/tests/workspaces/prebuiltProject/processes/Animation.p.json index 8a39d1f3..b17092ff 100644 --- a/playwright/tests/workspaces/animationProject/processes/Animation.p.json +++ b/playwright/tests/workspaces/prebuiltProject/processes/Animation.p.json @@ -2,7 +2,7 @@ "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "190EEC366DECC66A", "config" : { - "data" : "animationProject.Data" + "data" : "prebuiltProject.Data" }, "elements" : [ { "id" : "f0", diff --git a/playwright/tests/workspaces/animationProject/processes/Callable.p.json b/playwright/tests/workspaces/prebuiltProject/processes/Callable.p.json similarity index 96% rename from playwright/tests/workspaces/animationProject/processes/Callable.p.json rename to playwright/tests/workspaces/prebuiltProject/processes/Callable.p.json index 4eed409f..3d7cecaa 100644 --- a/playwright/tests/workspaces/animationProject/processes/Callable.p.json +++ b/playwright/tests/workspaces/prebuiltProject/processes/Callable.p.json @@ -3,7 +3,7 @@ "id" : "190EEC3ABECE2C88", "kind" : "CALLABLE_SUB", "config" : { - "data" : "animationProject.Data" + "data" : "prebuiltProject.Data" }, "elements" : [ { "id" : "f0", diff --git a/playwright/tests/workspaces/animationProject/processes/NoAnimation.p.json b/playwright/tests/workspaces/prebuiltProject/processes/NoAnimation.p.json similarity index 95% rename from playwright/tests/workspaces/animationProject/processes/NoAnimation.p.json rename to playwright/tests/workspaces/prebuiltProject/processes/NoAnimation.p.json index b5b098b6..dfcb970b 100644 --- a/playwright/tests/workspaces/animationProject/processes/NoAnimation.p.json +++ b/playwright/tests/workspaces/prebuiltProject/processes/NoAnimation.p.json @@ -2,7 +2,7 @@ "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", "id" : "191A2645F90CDC61", "config" : { - "data" : "animationProject.Data" + "data" : "prebuiltProject.Data" }, "elements" : [ { "id" : "f0", diff --git a/playwright/tests/workspaces/prebuiltProject/src_dataClasses/ch/form/test/testForm/testFormData.java b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/ch/form/test/testForm/testFormData.java new file mode 100644 index 00000000..12f3a6ee --- /dev/null +++ b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/ch/form/test/testForm/testFormData.java @@ -0,0 +1,12 @@ +package ch.form.test.testForm; + +/** + */ +@SuppressWarnings("all") +@javax.annotation.processing.Generated(comments="This is the java file of the ivy data class testFormData", value={"ch.ivyteam.ivy.scripting.streamInOut.IvyScriptJavaClassBuilder"}) +public class testFormData extends ch.ivyteam.ivy.scripting.objects.CompositeObject +{ + /** SerialVersionUID */ + private static final long serialVersionUID = 0L; + +} diff --git a/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/Data.java b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/Data.java new file mode 100644 index 00000000..114cb143 --- /dev/null +++ b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/Data.java @@ -0,0 +1,12 @@ +package prebuiltProject; + +/** + */ +@SuppressWarnings("all") +@javax.annotation.processing.Generated(comments="This is the java file of the ivy data class Data", value={"ch.ivyteam.ivy.scripting.streamInOut.IvyScriptJavaClassBuilder"}) +public class Data extends ch.ivyteam.ivy.scripting.objects.CompositeObject +{ + /** SerialVersionUID */ + private static final long serialVersionUID = 0L; + +} diff --git a/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/DataClassEditorTest.java b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/DataClassEditorTest.java new file mode 100644 index 00000000..37cf6e39 --- /dev/null +++ b/playwright/tests/workspaces/prebuiltProject/src_dataClasses/prebuiltProject/DataClassEditorTest.java @@ -0,0 +1,12 @@ +package prebuiltProject; + +/** + */ +@SuppressWarnings("all") +@javax.annotation.processing.Generated(comments="This is the java file of the ivy data class DataClassEditorTest", value={"ch.ivyteam.ivy.scripting.streamInOut.IvyScriptJavaClassBuilder"}) +public class DataClassEditorTest extends ch.ivyteam.ivy.scripting.objects.CompositeObject +{ + /** SerialVersionUID */ + private static final long serialVersionUID = 0L; + +} diff --git a/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testForm.f.json b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testForm.f.json new file mode 100644 index 00000000..bab79278 --- /dev/null +++ b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testForm.f.json @@ -0,0 +1,14 @@ +{ + "$schema" : "https://json-schema.axonivy.com/form/12.0.2/form.json", + "id" : "7be1d241-f693-453c-ac24-63483cfcc443", + "components" : [ { + "cid" : "text1", + "type" : "Text", + "config" : { + "content" : "This is my test" + } + }, { + "cid" : "input2", + "type" : "Input" + } ] +} \ No newline at end of file diff --git a/playwright/tests/workspaces/animationProject/dataclasses/animationProject/Data.d.json b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormData.d.json similarity index 61% rename from playwright/tests/workspaces/animationProject/dataclasses/animationProject/Data.d.json rename to playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormData.d.json index 8fd81d87..344e6f83 100644 --- a/playwright/tests/workspaces/animationProject/dataclasses/animationProject/Data.d.json +++ b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormData.d.json @@ -1,6 +1,6 @@ { "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", - "simpleName" : "Data", - "namespace" : "animationProject", + "simpleName" : "testFormData", + "namespace" : "ch.form.test.testForm", "isBusinessCaseData" : false } \ No newline at end of file diff --git a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormProcess.p.json b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormProcess.p.json similarity index 72% rename from playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormProcess.p.json rename to playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormProcess.p.json index c7fe9c7b..2d9bc428 100644 --- a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormProcess.p.json +++ b/playwright/tests/workspaces/prebuiltProject/src_hd/ch/form/test/testForm/testFormProcess.p.json @@ -1,9 +1,9 @@ { "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", - "id" : "18E137EF2CD178FF", + "id" : "195431B33918918F", "kind" : "HTML_DIALOG", "config" : { - "data" : "jsf.renderer.test.testData" + "data" : "ch.form.test.testForm.testFormData" }, "elements" : [ { "id" : "f0", @@ -11,7 +11,7 @@ "name" : "start()", "config" : { "signature" : "start", - "guid" : "18E137EF2CE5A489" + "guid" : "195431B33929A3CC" }, "visual" : { "at" : { "x" : 96, "y" : 64 } @@ -23,14 +23,15 @@ "id" : "f1", "type" : "HtmlDialogEnd", "visual" : { - "at" : { "x" : 224, "y" : 64 } + "at" : { "x" : 224, "y" : 64 }, + "labelOffset" : { "x" : 10, "y" : 30 } } }, { "id" : "f3", "type" : "HtmlDialogEventStart", "name" : "close", "config" : { - "guid" : "18E137EF2CE42689" + "guid" : "195431B3395DA174" }, "visual" : { "at" : { "x" : 96, "y" : 160 } @@ -42,7 +43,8 @@ "id" : "f4", "type" : "HtmlDialogExit", "visual" : { - "at" : { "x" : 224, "y" : 160 } + "at" : { "x" : 224, "y" : 160 }, + "labelOffset" : { "x" : 10, "y" : 30 } } } ] } \ No newline at end of file diff --git a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testForm.f.json b/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testForm.f.json deleted file mode 100644 index 10b69eae..00000000 --- a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testForm.f.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/form/12.0.2/form.json", - "id" : "a5c1d16e-1d08-4e1f-a9f0-436c553a3881", - "config" : { - "renderer" : "JSF", - "theme" : "freya-ivy" - }, - "components" : [ { - "cid" : "text1", - "type" : "Text", - "config" : { - "id" : "", - "lgSpan" : "6", - "mdSpan" : "12", - "visible" : "", - "type" : "RAW", - "content" : "This is my test", - "icon" : "", - "iconStyle" : "INLINE" - } - }, { - "cid" : "input2", - "type" : "Input", - "config" : { - "id" : "", - "lgSpan" : "6", - "mdSpan" : "12", - "visible" : "", - "disabled" : "", - "required" : "false", - "requiredMessage" : "", - "updateOnChange" : false, - "label" : "", - "value" : "", - "type" : "TEXT", - "decimalPlaces" : "", - "symbol" : "", - "symbolPosition" : "s" - } - } ] -} \ No newline at end of file diff --git a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormData.d.json b/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormData.d.json deleted file mode 100644 index 2a6edac5..00000000 --- a/playwright/tests/workspaces/prebuiltProject/src_hd/jsf/renderer/testForm/testFormData.d.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json", - "simpleName" : "testData", - "namespace" : "jsf.renderer.test", - "isBusinessCaseData" : false, - "fields" : [ { - "name" : "name", - "type" : "String", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "age", - "type" : "Number", - "modifiers" : [ "PERSISTENT" ] - }, { - "name" : "address", - "type" : "jsf.renderer.Address", - "modifiers" : [ "PERSISTENT" ] - } ] -} \ No newline at end of file diff --git a/playwright/tests/workspaces/prebuiltProject/target/classes/ch/form/test/testForm/testFormData.class b/playwright/tests/workspaces/prebuiltProject/target/classes/ch/form/test/testForm/testFormData.class new file mode 100644 index 00000000..27fa72c8 Binary files /dev/null and b/playwright/tests/workspaces/prebuiltProject/target/classes/ch/form/test/testForm/testFormData.class differ diff --git a/playwright/tests/workspaces/prebuiltProject/target/classes/prebuiltProject/DataClassEditorTest.class b/playwright/tests/workspaces/prebuiltProject/target/classes/prebuiltProject/DataClassEditorTest.class new file mode 100644 index 00000000..f90bab49 Binary files /dev/null and b/playwright/tests/workspaces/prebuiltProject/target/classes/prebuiltProject/DataClassEditorTest.class differ diff --git a/playwright/tests/workspaces/prebuiltProject/target/src_hd/jsf/renderer/testForm/testForm.xhtml b/playwright/tests/workspaces/prebuiltProject/target/src_hd/ch/form/test/testForm/testForm.xhtml similarity index 82% rename from playwright/tests/workspaces/prebuiltProject/target/src_hd/jsf/renderer/testForm/testForm.xhtml rename to playwright/tests/workspaces/prebuiltProject/target/src_hd/ch/form/test/testForm/testForm.xhtml index 16dfd1d1..125c3fce 100644 --- a/playwright/tests/workspaces/prebuiltProject/target/src_hd/jsf/renderer/testForm/testForm.xhtml +++ b/playwright/tests/workspaces/prebuiltProject/target/src_hd/ch/form/test/testForm/testForm.xhtml @@ -4,7 +4,7 @@ xmlns:pe="http://primefaces.org/ui/extensions"> - a5c1d16e-1d08-4e1f-a9f0-436c553a3881 + 7be1d241-f693-453c-ac24-63483cfcc443 @@ -14,8 +14,8 @@ - - + + diff --git a/playwright/tests/workspaces/workspace.ts b/playwright/tests/workspaces/workspace.ts index 38fadb50..9a886711 100644 --- a/playwright/tests/workspaces/workspace.ts +++ b/playwright/tests/workspaces/workspace.ts @@ -1,23 +1,8 @@ import * as path from 'path'; -import fs from 'fs'; -import { randomInt } from 'crypto'; -export const animationWorkspacePath = path.resolve(__dirname, './animationProject'); export const prebuiltWorkspacePath = path.resolve(__dirname, './prebuiltProject'); -export const prebuiltEmptyWorkspacePath = path.resolve(__dirname, './prebuiltEmptyProject'); export const noEngineWorkspacePath = path.resolve(__dirname, './noEngine'); export const noProjectWorkspacePath = path.resolve(__dirname, './noProject'); export const multiProjectWorkspacePath = path.resolve(__dirname, './multiProject'); export const empty = path.resolve(__dirname, './empty'); export const embeddedEngineWorkspace = path.resolve(__dirname, './embeddedEngine'); - -export function removeFromWorkspace(...paths: string[]) { - if (process.env.CI) { - return; - } - fs.rmSync(path.resolve(...paths), { recursive: true, force: true }); -} - -export function randomArtefactName() { - return 'test' + randomInt(10_000).toString(); -}