@datagrok/hit-triage 1.10.9 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.grokignore +2 -0
- package/.turbo/turbo-build.log +25 -3
- package/CHANGELOG.md +78 -0
- package/CLAUDE.md +87 -10
- package/README_HD.md +14 -14
- package/README_HT.md +6 -6
- package/README_PH.md +110 -0
- package/bdd/bdd.config.json +3 -1
- package/bdd/bindings/campaign.ts +626 -0
- package/bdd/bindings/hit-design.ts +36 -42
- package/bdd/bindings/landing.ts +839 -0
- package/bdd/bindings/pepti-hit.ts +35 -0
- package/bdd/features/campaign/crumbs.feature +22 -0
- package/bdd/features/campaign/grid.feature +56 -0
- package/bdd/features/campaign/merge.feature +105 -0
- package/bdd/features/campaign/molecule-vid.feature +40 -0
- package/bdd/features/campaign/permissions.feature +46 -0
- package/bdd/features/campaign/progress-tracker.feature +89 -0
- package/bdd/features/campaign/refresh-hint.feature +33 -0
- package/bdd/features/campaign/ribbon.feature +49 -0
- package/bdd/features/campaign/stage-choices.feature +39 -0
- package/bdd/features/campaign/submit.feature +135 -0
- package/bdd/features/campaign/tracker-cards.feature +46 -0
- package/bdd/features/campaign/view-only.feature +37 -0
- package/bdd/features/landing/campaign-deep-links.feature +61 -0
- package/bdd/features/landing/hit-design-campaigns-fixes.feature +116 -0
- package/bdd/features/landing/hit-design-campaigns.feature +153 -0
- package/bdd/features/landing/hit-triage-campaigns.feature +99 -0
- package/bdd/features/landing/new-campaign.feature +69 -0
- package/bdd/features/landing/pep-triage-campaigns.feature +41 -0
- package/bdd/features/landing/pepti-hit-landing.feature +132 -0
- package/bdd/features/pepti-hit/helm-edit.feature +47 -0
- package/bdd/features/templates/template-editor.feature +130 -0
- package/bdd/features/templates/template-picker.feature +112 -0
- package/bdd/features/templates/triage-forms.feature +59 -0
- package/bdd/fixtures/bar-chart.layout +1 -0
- package/bdd/fixtures/merge-local.csv +2 -0
- package/bdd/generated/campaign/crumbs.test.ts +33 -0
- package/bdd/generated/campaign/grid.test.ts +79 -0
- package/bdd/generated/campaign/merge.test.ts +134 -0
- package/bdd/generated/campaign/molecule-vid.test.ts +52 -0
- package/bdd/generated/campaign/permissions.test.ts +58 -0
- package/bdd/generated/campaign/progress-tracker.test.ts +129 -0
- package/bdd/generated/campaign/refresh-hint.test.ts +44 -0
- package/bdd/generated/campaign/ribbon.test.ts +65 -0
- package/bdd/generated/campaign/stage-choices.test.ts +55 -0
- package/bdd/generated/campaign/submit.test.ts +167 -0
- package/bdd/generated/campaign/tracker-cards.test.ts +49 -0
- package/bdd/generated/campaign/view-only.test.ts +51 -0
- package/bdd/generated/hit-design/campaign-column-metadata.test.ts +1 -0
- package/bdd/generated/landing/campaign-deep-links.test.ts +68 -0
- package/bdd/generated/landing/hit-design-campaigns-fixes.test.ts +99 -0
- package/bdd/generated/landing/hit-design-campaigns.test.ts +160 -0
- package/bdd/generated/landing/hit-triage-campaigns.test.ts +107 -0
- package/bdd/generated/landing/new-campaign.test.ts +78 -0
- package/bdd/generated/landing/pep-triage-campaigns.test.ts +52 -0
- package/bdd/generated/landing/pepti-hit-landing.test.ts +130 -0
- package/bdd/generated/pepti-hit/helm-edit.test.ts +64 -0
- package/bdd/generated/templates/template-editor.test.ts +137 -0
- package/bdd/generated/templates/template-picker.test.ts +119 -0
- package/bdd/generated/templates/triage-forms.test.ts +68 -0
- package/css/hit-triage.css +27 -23
- package/dist/package-test.js +690 -4
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +318 -73
- package/dist/package.js.map +1 -1
- package/package.json +11 -7
- package/queries/locks.sql +37 -0
- package/src/app/accordeons/layout-input.ts +52 -44
- package/src/app/accordeons/new-campaign-accordeon.ts +91 -54
- package/src/app/accordeons/new-hit-design-campaign-accordeon.ts +3 -67
- package/src/app/accordeons/new-pep-triage-template-accordeon.ts +39 -41
- package/src/app/accordeons/new-template-accordeon.ts +41 -24
- package/src/app/ai/view-functions.ts +22 -19
- package/src/app/base-view.ts +99 -8
- package/src/app/consts.ts +8 -5
- package/src/app/dialogs/functions-dialog.ts +14 -9
- package/src/app/dialogs/merge-table-dialog.ts +181 -325
- package/src/app/hit-app-base.ts +61 -90
- package/src/app/hit-design-app.ts +481 -886
- package/src/app/hit-design-views/info-view.ts +57 -407
- package/src/app/hit-design-views/submit-view.ts +216 -111
- package/src/app/hit-design-views/tiles-view.ts +168 -123
- package/src/app/hit-design-views/utils.css +0 -8
- package/src/app/hit-triage-app.ts +69 -38
- package/src/app/hit-triage-views/info-view.ts +70 -371
- package/src/app/pep-triage-app.ts +2 -2
- package/src/app/pep-triage-views/info-view.ts +42 -83
- package/src/app/pepti-hit-app.ts +32 -183
- package/src/app/pepti-hits-views/info-view.ts +15 -37
- package/src/app/shared/campaign-catalog.ts +408 -0
- package/src/app/shared/campaign-session.ts +557 -0
- package/src/app/shared/compute-editor.ts +274 -0
- package/src/app/shared/hit-home.ts +45 -0
- package/src/app/shared/new-campaign-form.ts +90 -0
- package/src/app/shared/permissions-editor.ts +93 -0
- package/src/app/shared/template-editor.ts +331 -0
- package/src/app/shared/template-picker.ts +154 -0
- package/src/app/utils/merge-table.ts +183 -78
- package/src/app/utils.ts +34 -325
- package/src/package-api.ts +29 -8
- package/src/package-test.ts +17 -2
- package/src/package.g.ts +12 -8
- package/src/package.ts +19 -7
- package/src/tests/ai.ts +244 -0
- package/src/tests/campaign-layout.ts +82 -0
- package/src/tests/campaign-session.ts +168 -0
- package/src/tests/campaigns.ts +23 -0
- package/src/tests/catalog.ts +156 -0
- package/src/tests/compat.ts +482 -0
- package/src/tests/compute.ts +165 -0
- package/src/tests/fixtures.ts +359 -0
- package/src/tests/merge.ts +149 -0
- package/src/tests/owners.ts +11 -0
- package/src/tests/save-lock.ts +932 -0
- package/src/tests/storage.ts +106 -0
- package/src/tests/template-editor.ts +538 -0
- package/src/tests/templates.ts +143 -0
- package/src/tests/triage-start.ts +81 -0
- package/src/tests/u2-guards.ts +384 -0
- package/src/tests/vid.ts +77 -0
- package/src/app/accordeons/new-hit-design-template-accordeon.ts +0 -238
- package/src/app/dialogs/permissions-dialog.ts +0 -66
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/progress-tracker.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
13
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
14
|
+
import {addStage, closeViewByName, hitDesignCampaign, noLockHeld, openByLink, savedCell, savedVersion} from '../../bindings/campaign.js';
|
|
15
|
+
import {inside} from '@datagrok-libraries/bdd/bindings/common/geometry';
|
|
16
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
17
|
+
import {clickOn, pressKey, shouldBe, shouldOffer} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
18
|
+
import {valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
19
|
+
import {openDatasetRows, switchView} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
20
|
+
import {doubleClickArea, infoBalloonText, readingIs, readingReads} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
21
|
+
import {dragAreaOntoWidget} from '@datagrok-libraries/bdd/bindings/tiers/viewers/widgets';
|
|
22
|
+
import {ds, el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
23
|
+
|
|
24
|
+
test.describe("The progress tracker of a Hit Design campaign", () => {
|
|
25
|
+
const session = feature(test, "features/campaign/progress-tracker.feature", import.meta.url);
|
|
26
|
+
test("The tracker covers the campaign view with a lane per stage, in the template's order, empty ones included", async ({browser}) => {
|
|
27
|
+
const page = await session.page(browser);
|
|
28
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
29
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
30
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
31
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
32
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
33
|
+
await session.step(24, "Then grid should be inside \"Progress Tracker\" dialog", () => inside(page, el("grid"), el("\"Progress Tracker\" dialog")));
|
|
34
|
+
await session.step(25, "And the \"lane names\" reading of \"Tile Viewer\" viewer should be \"Idea, Design, Make\"", () => readingReads(page, "lane names", el("\"Tile Viewer\" viewer"), "Idea, Design, Make"));
|
|
35
|
+
await session.step(26, "And the 'tiles in lane \"Make\"' reading of \"Tile Viewer\" viewer should be 0", () => readingIs(page, "tiles in lane \"Make\"", el("\"Tile Viewer\" viewer"), 0));
|
|
36
|
+
await session.step(27, "And the \"lane of row 1\" reading of \"Tile Viewer\" viewer should be \"Idea\"", () => readingReads(page, "lane of row 1", el("\"Tile Viewer\" viewer"), "Idea"));
|
|
37
|
+
await session.step(28, "And the \"lane of row 2\" reading of \"Tile Viewer\" viewer should be \"Design\"", () => readingReads(page, "lane of row 2", el("\"Tile Viewer\" viewer"), "Design"));
|
|
38
|
+
await session.step(29, "And CLOSE button in \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("CLOSE button in \"Progress Tracker\" dialog"), "visible"));
|
|
39
|
+
await session.step(30, "And \"Modify Stages\" button in \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Modify Stages\" button in \"Progress Tracker\" dialog"), "visible"));
|
|
40
|
+
await session.step(31, "And CANCEL button in \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("CANCEL button in \"Progress Tracker\" dialog"), "absent"));
|
|
41
|
+
await session.step(32, "And OK button in \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("OK button in \"Progress Tracker\" dialog"), "absent"));
|
|
42
|
+
});
|
|
43
|
+
test("A card dragged to another lane moves its row there, and CLOSE saves it with a balloon", async ({browser}) => {
|
|
44
|
+
const page = await session.page(browser);
|
|
45
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
46
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
47
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
48
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
49
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
50
|
+
await session.step(35, "When user drags the \"tile of row 1\" area of \"Tile Viewer\" viewer onto the 'lane content \"Make\"' area of \"Tile Viewer\" viewer", () => dragAreaOntoWidget(page, "tile of row 1", el("\"Tile Viewer\" viewer"), "lane content \"Make\"", el("\"Tile Viewer\" viewer")));
|
|
51
|
+
await session.step(36, "Then the \"lane of row 1\" reading of \"Tile Viewer\" viewer should be \"Make\"", () => readingReads(page, "lane of row 1", el("\"Tile Viewer\" viewer"), "Make"));
|
|
52
|
+
await session.step(37, "And the value of \"Stage\" column in row 1 should be \"Make\"", () => valueInRow(page, "Stage", 1, "Make"));
|
|
53
|
+
await session.step(38, "When user clicks on CLOSE button in \"Progress Tracker\" dialog", () => clickOn(page, el("CLOSE button in \"Progress Tracker\" dialog")));
|
|
54
|
+
await session.step(39, "Then \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "absent"));
|
|
55
|
+
await session.step(40, "And an info balloon containing \"Campaign saved successfully\" should have been shown", () => infoBalloonText(page, "Campaign saved successfully"));
|
|
56
|
+
await session.step(41, "And the campaign \"BDD Tracker\" should be saved with \"Make\" in row 1 of the \"Stage\" column", () => savedCell(page, "BDD Tracker", "Make", 1, "Stage"));
|
|
57
|
+
});
|
|
58
|
+
test("Modify Stages adds a stage, saves the campaign and reopens the tracker with the new lane", async ({browser}) => {
|
|
59
|
+
const page = await session.page(browser);
|
|
60
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
61
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
62
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
63
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
64
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
65
|
+
await session.step(45, "When user clicks on \"Modify Stages\" button in \"Progress Tracker\" dialog", () => clickOn(page, el("\"Modify Stages\" button in \"Progress Tracker\" dialog")));
|
|
66
|
+
await session.step(46, "Then \"Modify Stages\" dialog should be visible", () => shouldBe(page, el("\"Modify Stages\" dialog"), "visible"));
|
|
67
|
+
await session.step(47, "And CANCEL button in \"Modify Stages\" dialog should be enabled", () => shouldBe(page, el("CANCEL button in \"Modify Stages\" dialog"), "enabled"));
|
|
68
|
+
await session.step(48, "When user adds the stage \"Test\" in \"Modify Stages\" dialog", () => addStage(page, "Test", el("\"Modify Stages\" dialog")));
|
|
69
|
+
await session.step(49, "And user clicks on OK button in \"Modify Stages\" dialog", () => clickOn(page, el("OK button in \"Modify Stages\" dialog")));
|
|
70
|
+
await session.step(50, "Then \"Modify Stages\" dialog should be absent", () => shouldBe(page, el("\"Modify Stages\" dialog"), "absent"));
|
|
71
|
+
await session.step(51, "And an info balloon containing \"Campaign saved successfully\" should have been shown", () => infoBalloonText(page, "Campaign saved successfully"));
|
|
72
|
+
await session.step(52, "And \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
73
|
+
await session.step(53, "And the \"lane names\" reading of \"Tile Viewer\" viewer should be \"Idea, Design, Make, Test\"", () => readingReads(page, "lane names", el("\"Tile Viewer\" viewer"), "Idea, Design, Make, Test"));
|
|
74
|
+
await session.step(54, "When user clicks on CLOSE button in \"Progress Tracker\" dialog", () => clickOn(page, el("CLOSE button in \"Progress Tracker\" dialog")));
|
|
75
|
+
await session.step(55, "Then \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "absent"));
|
|
76
|
+
await session.step(56, "When user double-clicks on the \"cell 1 of Stage\" area of grid", () => doubleClickArea(page, "cell 1 of Stage", el("grid")));
|
|
77
|
+
await session.step(57, "Then cell editor should offer \"Idea, Design, Make, Test\"", () => shouldOffer(page, el("cell editor"), "Idea, Design, Make, Test"));
|
|
78
|
+
});
|
|
79
|
+
test("The tracker hides while another view is current and comes back with the campaign view", async ({browser}) => {
|
|
80
|
+
const page = await session.page(browser);
|
|
81
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
82
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
83
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
84
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
85
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
86
|
+
await session.step(60, "Given user opens demog-1000 dataset keeping the first 10 rows", () => openDatasetRows(page, ds("demog-1000"), 10));
|
|
87
|
+
await session.step(61, "Then \"Progress Tracker\" dialog should be hidden", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "hidden"));
|
|
88
|
+
await session.step(62, "When user switches to the \"BDD Tracker\" view", () => switchView(page, "BDD Tracker"));
|
|
89
|
+
await session.step(63, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
90
|
+
await session.step(64, "And the \"lane names\" reading of \"Tile Viewer\" viewer should be \"Idea, Design, Make\"", () => readingReads(page, "lane names", el("\"Tile Viewer\" viewer"), "Idea, Design, Make"));
|
|
91
|
+
});
|
|
92
|
+
test("Closing the campaign view while its tracker is hidden takes the tracker away", async ({browser}) => {
|
|
93
|
+
const page = await session.page(browser);
|
|
94
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
95
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
96
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
97
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
98
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
99
|
+
await session.step(67, "Given user opens demog-1000 dataset keeping the first 10 rows", () => openDatasetRows(page, ds("demog-1000"), 10));
|
|
100
|
+
await session.step(68, "Then \"Progress Tracker\" dialog should be hidden", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "hidden"));
|
|
101
|
+
await session.step(69, "When user closes the \"BDD Tracker\" view", () => closeViewByName(page, "BDD Tracker"));
|
|
102
|
+
await session.step(70, "Then \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "absent"));
|
|
103
|
+
});
|
|
104
|
+
test("Escape and the close button keep the moves and save them, as CLOSE does", async ({browser}) => {
|
|
105
|
+
const page = await session.page(browser);
|
|
106
|
+
await session.step(14, "Given user is logged in", () => loggedIn(page));
|
|
107
|
+
await session.step(15, "And the Hit Design campaign \"BDD Tracker\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Tracker", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
108
|
+
await session.step(19, "When user opens the campaign \"BDD Tracker\" by its link", () => openByLink(page, "BDD Tracker"));
|
|
109
|
+
await session.step(20, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
110
|
+
await session.step(21, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
111
|
+
await session.step(73, "When user drags the \"tile of row 1\" area of \"Tile Viewer\" viewer onto the 'lane content \"Make\"' area of \"Tile Viewer\" viewer", () => dragAreaOntoWidget(page, "tile of row 1", el("\"Tile Viewer\" viewer"), "lane content \"Make\"", el("\"Tile Viewer\" viewer")));
|
|
112
|
+
await session.step(74, "Then the \"lane of row 1\" reading of \"Tile Viewer\" viewer should be \"Make\"", () => readingReads(page, "lane of row 1", el("\"Tile Viewer\" viewer"), "Make"));
|
|
113
|
+
await session.step(75, "When user presses Escape", () => pressKey(page, "Escape"));
|
|
114
|
+
await session.step(76, "Then \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "absent"));
|
|
115
|
+
await session.step(77, "And the value of \"Stage\" column in row 1 should be \"Make\"", () => valueInRow(page, "Stage", 1, "Make"));
|
|
116
|
+
await session.step(78, "And the campaign \"BDD Tracker\" should be at version 2 on the server", () => savedVersion(page, "BDD Tracker", 2));
|
|
117
|
+
await session.step(79, "And the campaign \"BDD Tracker\" should be saved with \"Make\" in row 1 of the \"Stage\" column", () => savedCell(page, "BDD Tracker", "Make", 1, "Stage"));
|
|
118
|
+
await session.step(80, "When user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
119
|
+
await session.step(81, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
120
|
+
await session.step(82, "When user drags the \"tile of row 2\" area of \"Tile Viewer\" viewer onto the 'lane content \"Idea\"' area of \"Tile Viewer\" viewer", () => dragAreaOntoWidget(page, "tile of row 2", el("\"Tile Viewer\" viewer"), "lane content \"Idea\"", el("\"Tile Viewer\" viewer")));
|
|
121
|
+
await session.step(83, "Then the \"lane of row 2\" reading of \"Tile Viewer\" viewer should be \"Idea\"", () => readingReads(page, "lane of row 2", el("\"Tile Viewer\" viewer"), "Idea"));
|
|
122
|
+
await session.step(84, "When user clicks on close button of \"Progress Tracker\" dialog", () => clickOn(page, el("close button of \"Progress Tracker\" dialog")));
|
|
123
|
+
await session.step(85, "Then \"Progress Tracker\" dialog should be absent", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "absent"));
|
|
124
|
+
await session.step(86, "And the value of \"Stage\" column in row 2 should be \"Idea\"", () => valueInRow(page, "Stage", 2, "Idea"));
|
|
125
|
+
await session.step(87, "And the campaign \"BDD Tracker\" should be at version 3 on the server", () => savedVersion(page, "BDD Tracker", 3));
|
|
126
|
+
await session.step(88, "And the campaign \"BDD Tracker\" should be saved with \"Idea\" in row 2 of the \"Stage\" column", () => savedCell(page, "BDD Tracker", "Idea", 2, "Stage"));
|
|
127
|
+
await session.step(89, "And the campaign \"BDD Tracker\" should hold no lock on the server", () => noLockHeld(page, "BDD Tracker"));
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/refresh-hint.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
13
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
14
|
+
import {hitDesignCampaign, openByLink, otherSessionSaves} from '../../bindings/campaign.js';
|
|
15
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
16
|
+
import {clickOn, hoverOver, shouldHaveText} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
17
|
+
import {valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
18
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
19
|
+
import {elementHinted, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
20
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
21
|
+
|
|
22
|
+
test.describe("A Hit Design campaign view tells when another session saved the campaign", () => {
|
|
23
|
+
const session = feature(test, "features/campaign/refresh-hint.feature", import.meta.url);
|
|
24
|
+
test("Another session's save lights the Refresh icon, and Refresh brings its row in", async ({browser}) => {
|
|
25
|
+
const page = await session.page(browser);
|
|
26
|
+
await session.step(12, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(13, "And the Hit Design campaign \"BDD Refresh\" with the stages \"Idea, Design\" and a table of:", () => hitDesignCampaign(page, "BDD Refresh", "Idea, Design", [["Molecule","Stage","V-iD","MW"],["CCO","Design","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Design","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
28
|
+
await session.step(17, "When user opens the campaign \"BDD Refresh\" by its link", () => openByLink(page, "BDD Refresh"));
|
|
29
|
+
await session.step(20, "When user hovers over \"Refresh\" icon in toolbar", () => hoverOver(page, el("\"Refresh\" icon in toolbar")));
|
|
30
|
+
await session.step(21, "Then tooltip should have text \"Refresh Campaign\"", () => shouldHaveText(page, el("tooltip"), "Refresh Campaign"));
|
|
31
|
+
await session.step(22, "When another session saves the campaign \"BDD Refresh\" with a new row of \"CCN\"", () => otherSessionSaves(page, "BDD Refresh", "CCN"));
|
|
32
|
+
await session.step(23, "Then \"Refresh\" icon in toolbar should be hinted", () => elementHinted(page, el("\"Refresh\" icon in toolbar")));
|
|
33
|
+
await session.step(24, "When user hovers over \"Refresh\" icon in toolbar", () => hoverOver(page, el("\"Refresh\" icon in toolbar")));
|
|
34
|
+
await session.step(25, "Then tooltip should have text \"New changes available. Click to refresh campaign.\"", () => shouldHaveText(page, el("tooltip"), "New changes available. Click to refresh campaign."));
|
|
35
|
+
await session.step(26, "And the table should have 2 rows", () => rowCount(page, 2));
|
|
36
|
+
await session.step(27, "When user clicks on \"Refresh\" icon in toolbar", () => clickOn(page, el("\"Refresh\" icon in toolbar")));
|
|
37
|
+
await session.step(28, "Then the table should have 3 rows", () => rowCount(page, 3));
|
|
38
|
+
await session.step(29, "And the \"BDD Refresh\" view should be current", () => viewIsCurrent(page, "BDD Refresh"));
|
|
39
|
+
await session.step(30, "And the value of \"Molecule\" column in row 3 should be \"CCN\"", () => valueInRow(page, "Molecule", 3, "CCN"));
|
|
40
|
+
await session.step(31, "And the value of \"Stage\" column in row 3 should be \"Idea\"", () => valueInRow(page, "Stage", 3, "Idea"));
|
|
41
|
+
await session.step(32, "When user hovers over \"Refresh\" icon in toolbar", () => hoverOver(page, el("\"Refresh\" icon in toolbar")));
|
|
42
|
+
await session.step(33, "Then tooltip should have text \"Refresh Campaign\"", () => shouldHaveText(page, el("tooltip"), "Refresh Campaign"));
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/ribbon.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
13
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
14
|
+
import {hitDesignCampaign, openByLink, ribbonLastGroup} from '../../bindings/campaign.js';
|
|
15
|
+
import {notClipped, windowSize} from '@datagrok-libraries/bdd/bindings/common/geometry';
|
|
16
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
17
|
+
import {clickOn, hoverOver, shouldBe, shouldHaveText} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
18
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
19
|
+
import {contextPanelOpen, toolboxPaneShown, urlShouldContain} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
20
|
+
import {menuLists, noBalloons, viewerCount} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
21
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
22
|
+
|
|
23
|
+
test.describe("The Hit Design campaign view's ribbon and crumbs", () => {
|
|
24
|
+
const session = feature(test, "features/campaign/ribbon.feature", import.meta.url);
|
|
25
|
+
test("The ribbon ends with the package's actions, and the crumbs name the app and the campaign", async ({browser}) => {
|
|
26
|
+
const page = await session.page(browser);
|
|
27
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
28
|
+
await session.step(17, "And the Hit Design campaign \"BDD Ribbon\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Ribbon", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
29
|
+
await session.step(21, "When user opens the campaign \"BDD Ribbon\" by its link", () => openByLink(page, "BDD Ribbon"));
|
|
30
|
+
await session.step(24, "Then the last group of the ribbon should list \"Refresh, Add new row, Merge another table into the campaign, Calculate additional properties, Edit campaign permissions, Apply template layout (Loaded from mounted file storage), Progress tracker, Submit...\"", () => ribbonLastGroup(page, "Refresh, Add new row, Merge another table into the campaign, Calculate additional properties, Edit campaign permissions, Apply template layout (Loaded from mounted file storage), Progress tracker, Submit..."));
|
|
31
|
+
await session.step(25, "And \"Save\" button in toolbar should be hidden", () => shouldBe(page, el("\"Save\" button in toolbar"), "hidden"));
|
|
32
|
+
await session.step(26, "And \"Hit Design\" breadcrumb should be visible", () => shouldBe(page, el("\"Hit Design\" breadcrumb"), "visible"));
|
|
33
|
+
await session.step(27, "And \"BDD Ribbon\" breadcrumb should be visible", () => shouldBe(page, el("\"BDD Ribbon\" breadcrumb"), "visible"));
|
|
34
|
+
await session.step(28, "And the page address should contain \"campaignId=BDDBDDRIBBON-1\"", () => urlShouldContain(page, "campaignId=BDDBDDRIBBON-1"));
|
|
35
|
+
await session.step(29, "When user hovers over \"Refresh\" icon in toolbar", () => hoverOver(page, el("\"Refresh\" icon in toolbar")));
|
|
36
|
+
await session.step(30, "Then tooltip should have text \"Refresh Campaign\"", () => shouldHaveText(page, el("tooltip"), "Refresh Campaign"));
|
|
37
|
+
await session.step(31, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
38
|
+
});
|
|
39
|
+
test("Apply template layout loads the template's layout file into the view", async ({browser}) => {
|
|
40
|
+
const page = await session.page(browser);
|
|
41
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
42
|
+
await session.step(17, "And the Hit Design campaign \"BDD Ribbon\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Ribbon", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
43
|
+
await session.step(21, "When user opens the campaign \"BDD Ribbon\" by its link", () => openByLink(page, "BDD Ribbon"));
|
|
44
|
+
await session.step(34, "Then the open tableview should have 0 Bar chart viewers", () => viewerCount(page, 0, "Bar chart"));
|
|
45
|
+
await session.step(35, "When user clicks on \"Apply template layout (Loaded from mounted file storage)\" icon in toolbar", () => clickOn(page, el("\"Apply template layout (Loaded from mounted file storage)\" icon in toolbar")));
|
|
46
|
+
await session.step(36, "Then the open tableview should have 4 Bar chart viewers", () => viewerCount(page, 4, "Bar chart"));
|
|
47
|
+
await session.step(37, "And the table should have 2 rows", () => rowCount(page, 2));
|
|
48
|
+
});
|
|
49
|
+
test("At 1366 px the primary buttons stay in view and the package's icons are one menu away", async ({browser}) => {
|
|
50
|
+
const page = await session.page(browser);
|
|
51
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
52
|
+
await session.step(17, "And the Hit Design campaign \"BDD Ribbon\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Ribbon", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Design","","78.11"]]);
|
|
53
|
+
await session.step(21, "When user opens the campaign \"BDD Ribbon\" by its link", () => openByLink(page, "BDD Ribbon"));
|
|
54
|
+
await session.step(40, "Given the toolbox pane is shown", () => toolboxPaneShown(page));
|
|
55
|
+
await session.step(41, "And the context panel is open", () => contextPanelOpen(page));
|
|
56
|
+
await session.step(42, "When the window is 1366 by 768 px", () => windowSize(page, 1366, 768));
|
|
57
|
+
await session.step(43, "Then \"Submit...\" button in toolbar should not be clipped", () => notClipped(page, el("\"Submit...\" button in toolbar")));
|
|
58
|
+
await session.step(44, "And \"Progress tracker\" button in toolbar should not be clipped", () => notClipped(page, el("\"Progress tracker\" button in toolbar")));
|
|
59
|
+
await session.step(45, "And \"Merge another table into the campaign\" icon in toolbar should be hidden", () => shouldBe(page, el("\"Merge another table into the campaign\" icon in toolbar"), "hidden"));
|
|
60
|
+
await session.step(46, "When user clicks on \"More actions\" icon in toolbar", () => clickOn(page, el("\"More actions\" icon in toolbar")));
|
|
61
|
+
await session.step(47, "Then the open menu should list \"Refresh Campaign\"", () => menuLists(page, "Refresh Campaign"));
|
|
62
|
+
await session.step(48, "And the open menu should list \"Merge another table into the campaign...\"", () => menuLists(page, "Merge another table into the campaign..."));
|
|
63
|
+
await session.step(49, "And the open menu should list \"Edit campaign permissions...\"", () => menuLists(page, "Edit campaign permissions..."));
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/stage-choices.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
13
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
14
|
+
import {hitDesignCampaign, openByLink, savedCell, savedVersion} from '../../bindings/campaign.js';
|
|
15
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
16
|
+
import {pressKey, selectIn, shouldBe, shouldHaveValue, shouldOffer} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
17
|
+
import {valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
18
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
19
|
+
import {doubleClickArea, noBalloons, readingReads} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
20
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
21
|
+
|
|
22
|
+
test.describe("The Stage cell of a Hit Design campaign is a choice of the template's stages", () => {
|
|
23
|
+
const session = feature(test, "features/campaign/stage-choices.feature", import.meta.url);
|
|
24
|
+
test("The Stage cell offers the template's stages, and the stage picked is saved with no balloon", async ({browser}) => {
|
|
25
|
+
const page = await session.page(browser);
|
|
26
|
+
await session.step(12, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(13, "And the Hit Design campaign \"BDD Stage Choices\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Stage Choices", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Mkae","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Mkae","","78.11"]]);
|
|
28
|
+
await session.step(17, "When user opens the campaign \"BDD Stage Choices\" by its link", () => openByLink(page, "BDD Stage Choices"));
|
|
29
|
+
await session.step(18, "Then the table should have 2 rows", () => rowCount(page, 2));
|
|
30
|
+
await session.step(21, "When user double-clicks on the \"cell 1 of Stage\" area of grid", () => doubleClickArea(page, "cell 1 of Stage", el("grid")));
|
|
31
|
+
await session.step(22, "Then cell editor should offer \"Idea, Design, Make\"", () => shouldOffer(page, el("cell editor"), "Idea, Design, Make"));
|
|
32
|
+
await session.step(23, "When user selects \"Make\" in cell editor", () => selectIn(page, "Make", el("cell editor")));
|
|
33
|
+
await session.step(24, "Then the campaign \"BDD Stage Choices\" should be saved with \"Make\" in row 1 of the \"Stage\" column", () => savedCell(page, "BDD Stage Choices", "Make", 1, "Stage"));
|
|
34
|
+
await session.step(25, "And the campaign \"BDD Stage Choices\" should be at version 2 on the server", () => savedVersion(page, "BDD Stage Choices", 2));
|
|
35
|
+
await session.step(26, "And the value of \"Stage\" column in row 1 should be \"Make\"", () => valueInRow(page, "Stage", 1, "Make"));
|
|
36
|
+
await session.step(27, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
37
|
+
});
|
|
38
|
+
test("A stage the template does not have still shows, in the grid and in its dropdown, and Enter keeps it", async ({browser}) => {
|
|
39
|
+
const page = await session.page(browser);
|
|
40
|
+
await session.step(12, "Given user is logged in", () => loggedIn(page));
|
|
41
|
+
await session.step(13, "And the Hit Design campaign \"BDD Stage Choices\" with the stages \"Idea, Design, Make\" and a table of:", () => hitDesignCampaign(page, "BDD Stage Choices", "Idea, Design, Make", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Mkae","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["c1ccccc1","Mkae","","78.11"]]);
|
|
42
|
+
await session.step(17, "When user opens the campaign \"BDD Stage Choices\" by its link", () => openByLink(page, "BDD Stage Choices"));
|
|
43
|
+
await session.step(18, "Then the table should have 2 rows", () => rowCount(page, 2));
|
|
44
|
+
await session.step(30, "Then the \"text of cell 2 of Stage\" reading of grid should be \"Mkae\"", () => readingReads(page, "text of cell 2 of Stage", el("grid"), "Mkae"));
|
|
45
|
+
await session.step(31, "When user double-clicks on the \"cell 2 of Stage\" area of grid", () => doubleClickArea(page, "cell 2 of Stage", el("grid")));
|
|
46
|
+
await session.step(32, "Then cell editor should offer \"Idea, Design, Make, Mkae\"", () => shouldOffer(page, el("cell editor"), "Idea, Design, Make, Mkae"));
|
|
47
|
+
await session.step(33, "And cell editor should have the value \"Mkae\"", () => shouldHaveValue(page, el("cell editor"), "Mkae"));
|
|
48
|
+
await session.step(34, "When user presses Enter", () => pressKey(page, "Enter"));
|
|
49
|
+
await session.step(35, "Then cell editor should be absent", () => shouldBe(page, el("cell editor"), "absent"));
|
|
50
|
+
await session.step(36, "And the campaign \"BDD Stage Choices\" should be at version 2 on the server", () => savedVersion(page, "BDD Stage Choices", 2));
|
|
51
|
+
await session.step(37, "And the campaign \"BDD Stage Choices\" should be saved with \"Mkae\" in row 2 of the \"Stage\" column", () => savedCell(page, "BDD Stage Choices", "Mkae", 2, "Stage"));
|
|
52
|
+
await session.step(38, "And the value of \"Stage\" column in row 2 should be \"Mkae\"", () => valueInRow(page, "Stage", 2, "Mkae"));
|
|
53
|
+
await session.step(39, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/submit.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
13
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
14
|
+
import {hitDesignCampaignWithMolecule, openByLink, savedName, savedStatus, structureInRow, suggests, summaryIs, takeSuggestion} from '../../bindings/campaign.js';
|
|
15
|
+
import {clearOf} from '@datagrok-libraries/bdd/bindings/common/geometry';
|
|
16
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
17
|
+
import {clearField, clickOn, downloadThrough, downloadedContains, fileDownloaded, pressKeyIn, selectIn, shouldBe, shouldContainText, shouldHaveValue, typeInto, watchDownloads} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
18
|
+
import {shouldHaveError, shouldHaveNoError} from '@datagrok-libraries/bdd/bindings/common/u2-steps';
|
|
19
|
+
import {errorBalloonText, infoBalloonText} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
20
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
21
|
+
|
|
22
|
+
test.describe("The Submit dialog of a Hit Design campaign", () => {
|
|
23
|
+
const session = feature(test, "features/campaign/submit.feature", import.meta.url);
|
|
24
|
+
test("The summary lists the campaign's keys in order, and CANCEL closes the dialog", async ({browser}) => {
|
|
25
|
+
const page = await session.page(browser);
|
|
26
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
28
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
29
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
30
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
31
|
+
await session.step(30, "Then the summary in \"Submit\" dialog should be:", () => summaryIs(page, el("\"Submit\" dialog"), [["Name","BDD Submit"],["Code","BDDBDDSUBMIT-1"],["Template","BDD Submit"],["File Path","System.AppData/HitTriage/Hit Design/campaigns…"],["Create Date","2026/10/15"],["Chemist","BDD chemist"],["Reference compound","*"],["Number of Molecules","2"],["Enrichment Methods","*"]]), [["Name","BDD Submit"],["Code","BDDBDDSUBMIT-1"],["Template","BDD Submit"],["File Path","System.AppData/HitTriage/Hit Design/campaigns…"],["Create Date","2026/10/15"],["Chemist","BDD chemist"],["Reference compound","*"],["Number of Molecules","2"],["Enrichment Methods","*"]]);
|
|
32
|
+
await session.step(40, "And \"Status\" input in \"Submit\" dialog should have value \"In Progress\"", () => shouldHaveValue(page, el("\"Status\" input in \"Submit\" dialog"), "In Progress"));
|
|
33
|
+
await session.step(41, "And \"Submit function\" input in \"Submit\" dialog should have value \"Demo File Submit\"", () => shouldHaveValue(page, el("\"Submit function\" input in \"Submit\" dialog"), "Demo File Submit"));
|
|
34
|
+
await session.step(42, "And CANCEL button in \"Submit\" dialog should be enabled", () => shouldBe(page, el("CANCEL button in \"Submit\" dialog"), "enabled"));
|
|
35
|
+
await session.step(43, "When user clicks on CANCEL button in \"Submit\" dialog", () => clickOn(page, el("CANCEL button in \"Submit\" dialog")));
|
|
36
|
+
await session.step(44, "Then \"Submit\" dialog should be absent", () => shouldBe(page, el("\"Submit\" dialog"), "absent"));
|
|
37
|
+
});
|
|
38
|
+
test("The status suggests the statuses campaigns already have, and Save stores it with a balloon", async ({browser}) => {
|
|
39
|
+
const page = await session.page(browser);
|
|
40
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
41
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
42
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
43
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
44
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
45
|
+
await session.step(47, "When user clears \"Status\" input in \"Submit\" dialog", () => clearField(page, el("\"Status\" input in \"Submit\" dialog")));
|
|
46
|
+
await session.step(48, "And user types \"Progr\" into \"Status\" input in \"Submit\" dialog", () => typeInto(page, "Progr", el("\"Status\" input in \"Submit\" dialog")));
|
|
47
|
+
await session.step(49, "Then \"Status\" input in \"Submit\" dialog should suggest \"In Progress\"", () => suggests(page, el("\"Status\" input in \"Submit\" dialog"), "In Progress"));
|
|
48
|
+
await session.step(50, "When user takes the suggestion \"In Progress\" of \"Status\" input in \"Submit\" dialog", () => takeSuggestion(page, "In Progress", el("\"Status\" input in \"Submit\" dialog")));
|
|
49
|
+
await session.step(51, "Then \"Status\" input in \"Submit\" dialog should have value \"In Progress\"", () => shouldHaveValue(page, el("\"Status\" input in \"Submit\" dialog"), "In Progress"));
|
|
50
|
+
await session.step(52, "When user clears \"Status\" input in \"Submit\" dialog", () => clearField(page, el("\"Status\" input in \"Submit\" dialog")));
|
|
51
|
+
await session.step(53, "And user types \"BDD reviewed\" into \"Status\" input in \"Submit\" dialog", () => typeInto(page, "BDD reviewed", el("\"Status\" input in \"Submit\" dialog")));
|
|
52
|
+
await session.step(54, "And user clicks on Save button in \"Submit\" dialog", () => clickOn(page, el("Save button in \"Submit\" dialog")));
|
|
53
|
+
await session.step(55, "Then \"Submit\" dialog should be absent", () => shouldBe(page, el("\"Submit\" dialog"), "absent"));
|
|
54
|
+
await session.step(56, "And an info balloon containing \"Campaign saved successfully\" should have been shown", () => infoBalloonText(page, "Campaign saved successfully"));
|
|
55
|
+
await session.step(57, "And the campaign \"BDD Submit\" should be saved with the status \"BDD reviewed\"", () => savedStatus(page, "BDD Submit", "BDD reviewed"));
|
|
56
|
+
});
|
|
57
|
+
test("Submit calls the demo submit function with the campaign's rows, saves the status and says so", async ({browser}) => {
|
|
58
|
+
const page = await session.page(browser);
|
|
59
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
60
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
61
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
62
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
63
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
64
|
+
await session.step(60, "When user clears \"Status\" input in \"Submit\" dialog", () => clearField(page, el("\"Status\" input in \"Submit\" dialog")));
|
|
65
|
+
await session.step(61, "And user types \"Submitted\" into \"Status\" input in \"Submit\" dialog", () => typeInto(page, "Submitted", el("\"Status\" input in \"Submit\" dialog")));
|
|
66
|
+
await session.step(62, "And user clicks on Submit button in \"Submit\" dialog", () => clickOn(page, el("Submit button in \"Submit\" dialog")));
|
|
67
|
+
await session.step(63, "Then \"Submit\" dialog should be absent", () => shouldBe(page, el("\"Submit\" dialog"), "absent"));
|
|
68
|
+
await session.step(64, "And an info balloon containing \"Submitted successfully\" should have been shown", () => infoBalloonText(page, "Submitted successfully"));
|
|
69
|
+
await session.step(65, "And an info balloon containing \"Campaign saved successfully\" should have been shown", () => infoBalloonText(page, "Campaign saved successfully"));
|
|
70
|
+
await session.step(66, "And an info balloon containing \"Molecule\" should have been shown", () => infoBalloonText(page, "Molecule"));
|
|
71
|
+
await session.step(67, "And the campaign \"BDD Submit\" should be saved with the status \"Submitted\"", () => savedStatus(page, "BDD Submit", "Submitted"));
|
|
72
|
+
});
|
|
73
|
+
test("Without a submit function Submit stays, disabled, saying why", async ({browser}) => {
|
|
74
|
+
const page = await session.page(browser);
|
|
75
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
76
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
77
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
78
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
79
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
80
|
+
await session.step(70, "When user selects \"\" in \"Submit function\" input in \"Submit\" dialog", () => selectIn(page, "", el("\"Submit function\" input in \"Submit\" dialog")));
|
|
81
|
+
await session.step(71, "Then Save button in \"Submit\" dialog should be enabled", () => shouldBe(page, el("Save button in \"Submit\" dialog"), "enabled"));
|
|
82
|
+
await session.step(72, "And Submit button in \"Submit\" dialog should be disabled", () => shouldBe(page, el("Submit button in \"Submit\" dialog"), "disabled"));
|
|
83
|
+
await session.step(73, "And \"Submit\" dialog should contain text \"Choose a submit function\"", () => shouldContainText(page, el("\"Submit\" dialog"), "Choose a submit function"));
|
|
84
|
+
await session.step(74, "When user selects \"Demo File Submit\" in \"Submit function\" input in \"Submit\" dialog", () => selectIn(page, "Demo File Submit", el("\"Submit function\" input in \"Submit\" dialog")));
|
|
85
|
+
await session.step(75, "Then Submit button in \"Submit\" dialog should be enabled", () => shouldBe(page, el("Submit button in \"Submit\" dialog"), "enabled"));
|
|
86
|
+
});
|
|
87
|
+
test("Enrichment Methods names the template's compute by its friendly name", async ({browser}) => {
|
|
88
|
+
const page = await session.page(browser);
|
|
89
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
90
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
91
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
92
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
93
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
94
|
+
await session.step(78, "Then the summary in \"Submit\" dialog should be:", () => summaryIs(page, el("\"Submit\" dialog"), [["Name","*"],["Code","*"],["Template","*"],["File Path","*"],["Create Date","*"],["Chemist","*"],["Reference compound","*"],["Number of Molecules","*"],["Enrichment Methods","Chemical Properties"]]), [["Name","*"],["Code","*"],["Template","*"],["File Path","*"],["Create Date","*"],["Chemist","*"],["Reference compound","*"],["Number of Molecules","*"],["Enrichment Methods","Chemical Properties"]]);
|
|
95
|
+
});
|
|
96
|
+
test("A Molecule field shows its structure in the value column, on a row as tall as the picture", async ({browser}) => {
|
|
97
|
+
const page = await session.page(browser);
|
|
98
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
99
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
100
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
101
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
102
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
103
|
+
await session.step(90, "Then the structure of the \"Reference compound\" row in \"Submit\" dialog should sit in the value column of its row", () => structureInRow(page, "Reference compound", el("\"Submit\" dialog")));
|
|
104
|
+
await session.step(91, "And \"Reference compound\" input in \"Submit\" dialog should not overlap \"Number of Molecules\" input in \"Submit\" dialog", () => clearOf(page, el("\"Reference compound\" input in \"Submit\" dialog"), el("\"Number of Molecules\" input in \"Submit\" dialog")));
|
|
105
|
+
});
|
|
106
|
+
test("The pencil opens the name; Escape and Cancel put it back, an empty name is refused under it", async ({browser}) => {
|
|
107
|
+
const page = await session.page(browser);
|
|
108
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
109
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
110
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
111
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
112
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
113
|
+
await session.step(95, "Then \"Name\" input in \"Submit\" dialog should be read-only", () => shouldBe(page, el("\"Name\" input in \"Submit\" dialog"), "read-only"));
|
|
114
|
+
await session.step(96, "When user clicks on \"Edit Campaign Name\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Edit Campaign Name\" icon in \"Submit\" dialog")));
|
|
115
|
+
await session.step(97, "Then \"Name\" input in \"Submit\" dialog should be editable", () => shouldBe(page, el("\"Name\" input in \"Submit\" dialog"), "editable"));
|
|
116
|
+
await session.step(98, "And \"Name\" input in \"Submit\" dialog should be focused", () => shouldBe(page, el("\"Name\" input in \"Submit\" dialog"), "focused"));
|
|
117
|
+
await session.step(99, "When user types \"BDD Submit renamed\" into \"Name\" input in \"Submit\" dialog", () => typeInto(page, "BDD Submit renamed", el("\"Name\" input in \"Submit\" dialog")));
|
|
118
|
+
await session.step(100, "And user presses Escape in \"Name\" input in \"Submit\" dialog", () => pressKeyIn(page, "Escape", el("\"Name\" input in \"Submit\" dialog")));
|
|
119
|
+
await session.step(101, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
120
|
+
await session.step(102, "And \"Name\" input in \"Submit\" dialog should have value \"BDD Submit\"", () => shouldHaveValue(page, el("\"Name\" input in \"Submit\" dialog"), "BDD Submit"));
|
|
121
|
+
await session.step(103, "And \"Name\" input in \"Submit\" dialog should be read-only", () => shouldBe(page, el("\"Name\" input in \"Submit\" dialog"), "read-only"));
|
|
122
|
+
await session.step(104, "When user clicks on \"Edit Campaign Name\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Edit Campaign Name\" icon in \"Submit\" dialog")));
|
|
123
|
+
await session.step(105, "And user clears \"Name\" input in \"Submit\" dialog", () => clearField(page, el("\"Name\" input in \"Submit\" dialog")));
|
|
124
|
+
await session.step(106, "And user clicks on \"Save\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Save\" icon in \"Submit\" dialog")));
|
|
125
|
+
await session.step(107, "Then \"Name\" input in \"Submit\" dialog should have the error \"Campaign name can not be empty\"", () => shouldHaveError(page, el("\"Name\" input in \"Submit\" dialog"), "Campaign name can not be empty"));
|
|
126
|
+
await session.step(108, "When user clicks on \"Cancel\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Cancel\" icon in \"Submit\" dialog")));
|
|
127
|
+
await session.step(109, "Then \"Name\" input in \"Submit\" dialog should have value \"BDD Submit\"", () => shouldHaveValue(page, el("\"Name\" input in \"Submit\" dialog"), "BDD Submit"));
|
|
128
|
+
await session.step(110, "And \"Name\" input in \"Submit\" dialog should have no error", () => shouldHaveNoError(page, el("\"Name\" input in \"Submit\" dialog")));
|
|
129
|
+
});
|
|
130
|
+
test("Enter saves the new name with the campaign and leaves the dialog open", async ({browser}) => {
|
|
131
|
+
const page = await session.page(browser);
|
|
132
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
133
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
134
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
135
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
136
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
137
|
+
await session.step(113, "When user clicks on \"Edit Campaign Name\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Edit Campaign Name\" icon in \"Submit\" dialog")));
|
|
138
|
+
await session.step(114, "And user types \"BDD Submit renamed\" into \"Name\" input in \"Submit\" dialog", () => typeInto(page, "BDD Submit renamed", el("\"Name\" input in \"Submit\" dialog")));
|
|
139
|
+
await session.step(115, "And user presses Enter in \"Name\" input in \"Submit\" dialog", () => pressKeyIn(page, "Enter", el("\"Name\" input in \"Submit\" dialog")));
|
|
140
|
+
await session.step(116, "Then an info balloon containing \"Campaign saved successfully\" should have been shown", () => infoBalloonText(page, "Campaign saved successfully"));
|
|
141
|
+
await session.step(117, "And the campaign \"BDD Submit\" should be saved with the name \"BDD Submit renamed\"", () => savedName(page, "BDD Submit", "BDD Submit renamed"));
|
|
142
|
+
await session.step(118, "And \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
143
|
+
await session.step(119, "And \"Name\" input in \"Submit\" dialog should have value \"BDD Submit renamed\"", () => shouldHaveValue(page, el("\"Name\" input in \"Submit\" dialog"), "BDD Submit renamed"));
|
|
144
|
+
await session.step(120, "And \"Name\" input in \"Submit\" dialog should be read-only", () => shouldBe(page, el("\"Name\" input in \"Submit\" dialog"), "read-only"));
|
|
145
|
+
});
|
|
146
|
+
test("The pencil opens the file path, a folder that does not exist is refused, and the download icon saves the rows", async ({browser}) => {
|
|
147
|
+
const page = await session.page(browser);
|
|
148
|
+
await session.step(20, "Given user is logged in", () => loggedIn(page));
|
|
149
|
+
await session.step(21, "And the Hit Design campaign \"BDD Submit\" with the stages \"Idea, Design\", the molecule field \"Reference compound\" set to \"c1ccc2[nH]ccc2c1\" and a table of:", () => hitDesignCampaignWithMolecule(page, "BDD Submit", "Idea, Design", "Reference compound", "c1ccc2[nH]ccc2c1", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"],["CCN","Idea","","45.08"]]);
|
|
150
|
+
await session.step(25, "When user opens the campaign \"BDD Submit\" by its link", () => openByLink(page, "BDD Submit"));
|
|
151
|
+
await session.step(26, "And user clicks on \"Submit...\" button in toolbar", () => clickOn(page, el("\"Submit...\" button in toolbar")));
|
|
152
|
+
await session.step(27, "Then \"Submit\" dialog should be visible", () => shouldBe(page, el("\"Submit\" dialog"), "visible"));
|
|
153
|
+
await session.step(123, "Given user watches downloads", () => watchDownloads(page));
|
|
154
|
+
await session.step(124, "When user clicks on \"Edit file path\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Edit file path\" icon in \"Submit\" dialog")));
|
|
155
|
+
await session.step(125, "Then \"File Path\" input in \"Submit\" dialog should be editable", () => shouldBe(page, el("\"File Path\" input in \"Submit\" dialog"), "editable"));
|
|
156
|
+
await session.step(126, "When user types \"System.AppData/HitTriage/BDD no such folder\" into \"File Path\" input in \"Submit\" dialog", () => typeInto(page, "System.AppData/HitTriage/BDD no such folder", el("\"File Path\" input in \"Submit\" dialog")));
|
|
157
|
+
await session.step(127, "And user clicks on \"Save\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Save\" icon in \"Submit\" dialog")));
|
|
158
|
+
await session.step(128, "Then \"File Path\" input in \"Submit\" dialog should have the error \"Given folder does not exist\"", () => shouldHaveError(page, el("\"File Path\" input in \"Submit\" dialog"), "Given folder does not exist"));
|
|
159
|
+
await session.step(129, "And an error balloon containing \"Given folder does not exist\" should have been shown", () => errorBalloonText(page, "Given folder does not exist"));
|
|
160
|
+
await session.step(130, "When user clicks on \"Cancel\" icon in \"Submit\" dialog", () => clickOn(page, el("\"Cancel\" icon in \"Submit\" dialog")));
|
|
161
|
+
await session.step(131, "Then \"File Path\" input in \"Submit\" dialog should have value \"System.AppData/HitTriage/Hit Design/campaigns\"", () => shouldHaveValue(page, el("\"File Path\" input in \"Submit\" dialog"), "System.AppData/HitTriage/Hit Design/campaigns"));
|
|
162
|
+
await session.step(132, "And \"File Path\" input in \"Submit\" dialog should be read-only", () => shouldBe(page, el("\"File Path\" input in \"Submit\" dialog"), "read-only"));
|
|
163
|
+
await session.step(133, "When user downloads a file through \"Download\" icon in \"Submit\" dialog", () => downloadThrough(page, el("\"Download\" icon in \"Submit\" dialog")));
|
|
164
|
+
await session.step(134, "Then a file \"BDDBDDSUBMIT-1.csv\" should have been downloaded", () => fileDownloaded(page, "BDDBDDSUBMIT-1.csv"));
|
|
165
|
+
await session.step(135, "And the downloaded file should contain \"CCN\"", () => downloadedContains(page, "CCN"));
|
|
166
|
+
});
|
|
167
|
+
});
|