Skip to content
Snippets Groups Projects
Commit 2a836691 authored by Mathias Chouet's avatar Mathias Chouet
Browse files

Add e2e test for Solveur selectors interdependence

parent 433af888
No related branches found
Tags xtpcpp_0.2.17-1
No related merge requests found
...@@ -52,6 +52,10 @@ describe("Solveur - ", () => { ...@@ -52,6 +52,10 @@ describe("Solveur - ", () => {
const ntc = calcPage.getSelectById("select_target_nub"); const ntc = calcPage.getSelectById("select_target_nub");
const ntcV = await calcPage.getSelectValueText(ntc); const ntcV = await calcPage.getSelectValueText(ntc);
expect(ntcV).toContain("PAB : puissance / Puissance dissipée (PV)"); expect(ntcV).toContain("PAB : puissance / Puissance dissipée (PV)");
// check targetted result
const ntt = calcPage.getSelectById("select_target_result");
const nttV = await calcPage.getSelectValueText(ntt);
expect(nttV).toContain("Puissance dissipée (PV)");
// check searched Parameter // check searched Parameter
const sp = calcPage.getSelectById("select_searched_param"); const sp = calcPage.getSelectById("select_searched_param");
const spV = await calcPage.getSelectValueText(sp); const spV = await calcPage.getSelectValueText(sp);
...@@ -66,6 +70,11 @@ describe("Solveur - ", () => { ...@@ -66,6 +70,11 @@ describe("Solveur - ", () => {
// check that result is not empty // check that result is not empty
const hasResults = await calcPage.hasResults(); const hasResults = await calcPage.hasResults();
expect(hasResults).toBe(true); expect(hasResults).toBe(true);
// change targetted Nub, check that targetted result changes too
await calcPage.changeSelectValue(ntc, 0);
const nttV2 = await calcPage.getSelectValueText(ntt);
expect(nttV2).not.toContain("Puissance dissipée (PV)");
}); });
it("create > feed > calculate > clone > calculate clone", async () => { it("create > feed > calculate > clone > calculate clone", async () => {
......
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