Skip to content
Snippets Groups Projects
Commit f61e3d35 authored by François Grand's avatar François Grand
Browse files

test: e2e check that cancel button is present in variable parameter edition dialog

refs #507
parent 4cdfe3ff
No related branches found
No related tags found
2 merge requests!133Release version 4.15.0,!120Resolve "Ajouter un bouton "Annuler" sur la saisie des paramètres variables"
Pipeline #139373 canceled
......@@ -10,7 +10,10 @@
"name": "Launch Chrome (local webserver)",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"runtimeExecutable": "/usr/bin/chromium-browser"
"runtimeExecutable": "/usr/bin/chromium",
"runtimeArgs": [
"--preserve-symlinks"
]
},
{
"name": "Launch Firefox (local webserver)",
......@@ -19,6 +22,23 @@
"reAttach": true,
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch e2e current file",
"type": "node",
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"args": [
"${workspaceRoot}/protractor.conf.js",
"--specs=${file}"
],
"cwd": "${workspaceRoot}",
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/dist/out-tsc-e2e/*.js"
],
"skipSourceMapSupport": true
}
]
}
\ No newline at end of file
}
import { ListPage } from "./list.po";
import { by, element } from "protractor";
/**
* Check that a cancel button is present in min/max/list edition dialog
* for variable parameters
*/
describe("ngHyd - check cancel button for variable parameters - ", () => {
let listPage: ListPage;
beforeAll(async () => {
listPage = new ListPage();
});
fit("when min/max/list values dialog opens, a cancel button should be present", async () => {
// start page
await listPage.navigateTo();
// open PAB chute
await listPage.clickMenuEntryForCalcType(12);
// click "var" radio on Z1 parameter
const z1btn = element(by.id("mat-button-toggle-2-button"));
await z1btn.click();
// cancel button presence
const cancelbtn = element(by.id("btn-cancel"));
expect(await cancelbtn.isPresent() && await cancelbtn.isDisplayed()).toBeTruthy();
});
});
......@@ -121,7 +121,7 @@
<div mat-dialog-actions [attr.align]="'end'">
<div>
<button mat-raised-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>
<button id="btn-cancel" mat-raised-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>
{{ uitextCancel }}
</button>
<button mat-raised-button color="warn" (click)="onValidate()" [disabled]=" !isFormValid">
......
  • David Dorchies :zany_face: @david.dorchies

    mentioned in issue #509 (closed)

    By Grand Francois on 2022-04-08T16:22:38 (imported from GitLab)

    ·

    mentioned in issue #509 (closed)

    By Grand Francois on 2022-04-08T16:22:38 (imported from GitLab)

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment