Skip to content

Commit 3cb8eff

Browse files
committed
wip
1 parent f1a8b33 commit 3cb8eff

File tree

38 files changed

+100
-437
lines changed

38 files changed

+100
-437
lines changed

package-lock.json

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"watch": "lerna run watch --parallel"
3131
},
3232
"dependencies": {
33-
"@axonivy/dataclass-editor": "13.1.0-next.457",
34-
"@axonivy/form-editor": "13.1.0-next.595",
35-
"@axonivy/form-editor-core": "13.1.0-next.595",
33+
"@axonivy/dataclass-editor": "13.1.0-next.461",
34+
"@axonivy/form-editor": "13.1.0-next.597",
35+
"@axonivy/form-editor-core": "13.1.0-next.597",
3636
"@axonivy/process-editor": "13.1.0-next.1423",
3737
"@axonivy/process-editor-inscription": "13.1.0-next.1423",
38-
"@axonivy/variable-editor": "13.1.0-next.605",
38+
"@axonivy/variable-editor": "13.1.0-next.607",
3939
"vscode-messenger-common": "0.4.5"
4040
},
4141
"devDependencies": {

playwright/tests/create-data-class.spec.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
import { test } from './fixtures/baseTest';
2-
import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
32
import { FileExplorer } from './page-objects/explorer-view';
4-
import path from 'path';
53
import { DataClassEditor } from './page-objects/data-class-editor';
64
import { Editor } from './page-objects/editor';
75

86
test.describe('Create Data Class', () => {
9-
test.afterAll(async () => {
10-
const projectPath = path.join(prebuiltWorkspacePath);
11-
removeFromWorkspace(projectPath, 'dataclasses', 'ch');
12-
removeFromWorkspace(projectPath, 'src_dataClasses', 'ch');
13-
});
14-
157
test('Add new Data Class', async ({ page }) => {
168
const explorer = new FileExplorer(page);
179
await explorer.hasDeployProjectStatusMessage();
18-
const dataClassName = randomArtefactName();
10+
const dataClassName = 'testCreateData';
1911
await explorer.addDataClass(dataClassName, 'ch.ivyteam.test.data');
2012
await explorer.hasNode(`${dataClassName}.d.json`);
2113
const dataClassEditor = new DataClassEditor(page, `${dataClassName}.d.json`);

playwright/tests/create-process.spec.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { prebuiltEmptyWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
21
import { expect } from '@playwright/test';
32
import { ProcessEditor } from './page-objects/process-editor';
43
import { FileExplorer } from './page-objects/explorer-view';
@@ -7,22 +6,14 @@ import { test } from './fixtures/baseTest';
76
test.describe('Create Process', () => {
87
let explorer: FileExplorer;
98
let processEditor: ProcessEditor;
10-
let processName: string;
11-
const cleanUp = () => removeFromWorkspace(prebuiltEmptyWorkspacePath, 'processes');
12-
13-
test.use({ workspace: prebuiltEmptyWorkspacePath });
9+
const processName = 'testCreateProcess';
1410

1511
test.beforeEach(async ({ page }) => {
1612
explorer = new FileExplorer(page);
1713
await explorer.hasDeployProjectStatusMessage();
18-
processName = randomArtefactName();
1914
processEditor = new ProcessEditor(page, `${processName}.p.json`);
2015
});
2116

22-
test.afterAll(async () => {
23-
cleanUp();
24-
});
25-
2617
test('Add business process, execute, edit and redeploy', async ({ page }) => {
2718
await processEditor.hasNoStatusMessage();
2819
await explorer.addProcess(processName, 'Business Process');

playwright/tests/create-project.spec.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
import { test } from './fixtures/baseTest';
22
import { ProcessEditor } from './page-objects/process-editor';
3-
import { empty, removeFromWorkspace } from './workspaces/workspace';
3+
import { empty } from './workspaces/workspace';
44
import { FileExplorer } from './page-objects/explorer-view';
55
import { ProblemsView } from './page-objects/problems-view';
66

77
test.describe('Create Project', () => {
8-
const rootFolder = 'parent';
9-
10-
test.beforeAll(async () => {
11-
removeFromWorkspace(empty, rootFolder);
12-
});
13-
14-
test.afterAll(async () => {
15-
removeFromWorkspace(empty, rootFolder);
16-
});
17-
188
test.use({ workspace: empty });
199

2010
test('Add Project and execute init Process', async ({ page }) => {
2111
const explorer = new FileExplorer(page);
22-
await explorer.addNestedProject(rootFolder, 'testProject');
12+
await explorer.addNestedProject('parent', 'testProject');
2313
await explorer.hasStatusMessage('Finished: Create new Project', 60_000);
2414
await explorer.hasNoStatusMessage();
2515

playwright/tests/create-user-dialog.spec.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,21 @@
11
import { test } from './fixtures/baseTest';
2-
import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
32
import { expect } from '@playwright/test';
43
import { ProcessEditor } from './page-objects/process-editor';
54
import { FileExplorer } from './page-objects/explorer-view';
6-
import path from 'path';
75
import { FormEditor } from './page-objects/form-editor';
86

97
test.describe('Create User Dialog', () => {
108
let explorer: FileExplorer;
119
let processEditor: ProcessEditor;
12-
let userDialogName: string;
13-
const cleanUp = () => {
14-
const projectPath = path.join(prebuiltWorkspacePath);
15-
removeFromWorkspace(projectPath, 'src_hd', 'ch');
16-
removeFromWorkspace(projectPath, 'src_dataClasses', 'ch');
17-
};
18-
19-
test.beforeAll(async ({}) => {
20-
cleanUp();
21-
});
10+
const userDialogName = 'testCreateUserDialog';
2211

2312
test.beforeEach(async ({ page }) => {
2413
explorer = new FileExplorer(page);
2514
await explorer.hasDeployProjectStatusMessage();
2615
processEditor = new ProcessEditor(page);
27-
userDialogName = randomArtefactName();
2816
await explorer.hasNoStatusMessage();
2917
});
3018

31-
test.afterAll(async () => {
32-
cleanUp();
33-
});
34-
3519
test('Add Html Dialog', async () => {
3620
await explorer.addUserDialog(userDialogName, 'ch.ivyteam.test', 'Html Dialog');
3721
await explorer.hasNode(`${userDialogName}.xhtml`);

playwright/tests/data-class-editor.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { expect } from 'playwright/test';
22
import { BrowserView } from './page-objects/browser-view';
33
import { test } from './fixtures/baseTest';
44
import { DataClassEditor } from './page-objects/data-class-editor';
5-
import { randomArtefactName } from './workspaces/workspace';
65
import { Editor } from './page-objects/editor';
76

87
test.describe('Data Class Editor', () => {
@@ -21,7 +20,7 @@ test.describe('Data Class Editor', () => {
2120
.viewFrameLoactor()
2221
.getByRole('button', { name: /Add Attribute/ })
2322
.click();
24-
const attributeName = randomArtefactName();
23+
const attributeName = 'testAttributeName';
2524
const dialog = editor.viewFrameLoactor().getByRole('dialog');
2625
await dialog.getByRole('textbox', { name: 'Name' }).fill(attributeName);
2726
await dialog.getByRole('button', { name: 'Create Attribute' }).click();

playwright/tests/form-editor.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { expect } from 'playwright/test';
2-
import { randomArtefactName } from './workspaces/workspace';
32
import { FormEditor } from './page-objects/form-editor';
43
import { BrowserView } from './page-objects/browser-view';
54
import { test } from './fixtures/baseTest';
@@ -23,7 +22,7 @@ test.describe('Form Editor', () => {
2322
const input = editor.locatorFor('.block-input');
2423
await input.dblclick();
2524
const labelProperty = editor.locatorFor('#properties').getByLabel('Label');
26-
const newLabel = randomArtefactName();
25+
const newLabel = 'newTestLabel';
2726
await labelProperty.click();
2827
await expect(labelProperty).toBeFocused();
2928
await page.keyboard.type(newLabel);

playwright/tests/inscription-view.spec.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { expect } from '@playwright/test';
22
import { ProcessEditor } from './page-objects/process-editor';
3-
import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
43
import { BrowserView } from './page-objects/browser-view';
54
import { wait } from './utils/timeout';
65
import { test } from './fixtures/baseTest';
@@ -12,14 +11,6 @@ const namespace = 'testNamespace';
1211

1312
test.describe('Inscription View', () => {
1413
let processEditor: ProcessEditor;
15-
const cleanUp = () => {
16-
removeFromWorkspace(prebuiltWorkspacePath, 'src_hd', 'prebuiltProject');
17-
removeFromWorkspace(prebuiltWorkspacePath, 'processes', namespace);
18-
};
19-
20-
test.beforeAll(async () => {
21-
cleanUp();
22-
});
2314

2415
test.beforeEach(async ({ page }) => {
2516
processEditor = new ProcessEditor(page);
@@ -28,10 +19,6 @@ test.describe('Inscription View', () => {
2819
await processEditor.isViewVisible();
2920
});
3021

31-
test.afterAll(() => {
32-
cleanUp();
33-
});
34-
3522
test('Check Process Editor Connector', async () => {
3623
let element = processEditor.locatorForPID(userDialogPID1);
3724
await expect(element).toBeVisible();
@@ -115,7 +102,7 @@ test.describe('Inscription View', () => {
115102
const processStartField = inscriptionView.parent.getByRole('combobox');
116103
await expect(processStartField).toBeEmpty();
117104
await inscriptionView.clickButton('Create new Sub Process');
118-
const processName = randomArtefactName();
105+
const processName = 'subProcess';
119106
await inscriptionView.provideUserInput(`${namespace}/${processName}`);
120107
await processEditor.isDirty();
121108
await processEditor.isInactive();
@@ -131,7 +118,7 @@ test.describe('Inscription View', () => {
131118
const dialogField = inscriptionView.parent.getByRole('combobox');
132119
await expect(dialogField).toBeEmpty();
133120
await inscriptionView.clickButton('Create new Html Dialog');
134-
const userDialogName = randomArtefactName();
121+
const userDialogName = 'htmlDialog';
135122
await inscriptionView.provideUserInput('JSF');
136123
await inscriptionView.provideUserInput(userDialogName);
137124
await inscriptionView.provideUserInput();
@@ -152,7 +139,7 @@ test.describe('Inscription View', () => {
152139
const dialogField = inscriptionView.parent.getByRole('combobox');
153140
await expect(dialogField).toBeEmpty();
154141
await inscriptionView.clickButton('Create new Html Dialog');
155-
const userDialogName = randomArtefactName();
142+
const userDialogName = 'formDialog';
156143
await inscriptionView.provideUserInput('Form');
157144
await inscriptionView.provideUserInput(userDialogName);
158145
await inscriptionView.provideUserInput();
@@ -171,7 +158,7 @@ test.describe('Inscription View', () => {
171158
const dialogField = inscriptionView.parent.getByRole('combobox');
172159
await expect(dialogField).toBeEmpty();
173160
await inscriptionView.clickButton('Create new Html Dialog');
174-
const userDialogName = randomArtefactName();
161+
const userDialogName = 'offlineDialog';
175162
await inscriptionView.provideUserInput('JSFOffline');
176163
await inscriptionView.provideUserInput(userDialogName);
177164
await inscriptionView.provideUserInput();

playwright/tests/page-objects/variables-editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class VariablesEditor extends Editor {
2929

3030
async selectFirstRow() {
3131
const firstRow = this.viewFrameLoactor().locator('tbody > tr');
32-
await firstRow.click();
32+
await firstRow.first().click();
3333
}
3434

3535
async updateValue(value: string) {

0 commit comments

Comments
 (0)