forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kie-issues#947: Playwright expansion phase - part 3 - DRDs (apache#2462)
- Loading branch information
Showing
15 changed files
with
760 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { Page } from "@playwright/test"; | ||
|
||
export class Drds { | ||
constructor(public page: Page) {} | ||
|
||
public async toggle() { | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").getByTitle("Select or edit DRD").click(); | ||
} | ||
|
||
public async create(args: { name: string }) { | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector-popover").getByTitle("New DRD").click(); | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").locator("input").fill(args.name); | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").locator("input").press("Tab"); | ||
} | ||
|
||
public async rename(args: { newName: string }) { | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").locator("input").fill(args.newName); | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").locator("input").press("Tab"); | ||
} | ||
|
||
public async remove(args: { name: string }) { | ||
await this.navigateTo({ name: args.name }); | ||
await this.page.getByTitle("Remove DRD").click(); | ||
} | ||
|
||
public async navigateTo(args: { name: string }) { | ||
await this.page.getByTestId("kie-tools--dmn-editor--drd-list").getByText(args.name).click({ force: true }); | ||
} | ||
|
||
public async getCurrent() { | ||
return await this.page.getByTestId("kie-tools--dmn-editor--drd-selector").locator("input").inputValue(); | ||
} | ||
|
||
public async getAll() { | ||
return await this.page.getByTestId("kie-tools--dmn-editor--drd-list").locator("button").allInnerTexts(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { Page } from "@playwright/test"; | ||
import { Diagram } from "./diagram"; | ||
|
||
export class DrgNodes { | ||
constructor( | ||
public diagram: Diagram, | ||
public page: Page | ||
) {} | ||
|
||
public async open() { | ||
await this.page.getByTitle("DRG Nodes").click(); | ||
} | ||
|
||
public popover() { | ||
return this.page.getByTestId("kie-tools--dmn-editor--palette-nodes-popover"); | ||
} | ||
|
||
public async dragNode(args: { name: string; targetPosition: { x: number; y: number } }) { | ||
await this.popover() | ||
.getByText(args.name, { exact: true }) | ||
.dragTo(this.diagram.get(), { targetPosition: args.targetPosition }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+40.2 KB
...sts-e2e/__screenshots__/Google-Chrome/drds/drds-decision-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.8 KB
...-e2e/__screenshots__/Google-Chrome/drds/drds-decision-no-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+40.2 KB
...or/tests-e2e/__screenshots__/chromium/drds/drds-decision-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.8 KB
...tests-e2e/__screenshots__/chromium/drds/drds-decision-no-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.8 KB
...itor/tests-e2e/__screenshots__/webkit/drds/drds-decision-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.1 KB
...r/tests-e2e/__screenshots__/webkit/drds/drds-decision-no-missing-dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.