@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,107 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/hit-triage-campaigns.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
13
|
+
import {campaignNotOnServer, campaignsOnServer, cellIs, confirmDialog, doubleClickHeader, menuItemChecked, settingsDefaults, sortedBy, tableColumns, tableNotSorted, tableSorted} from '../../bindings/landing.js';
|
|
14
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
15
|
+
import {clickOn, collapse, expand, shouldBe, shouldContainText} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
16
|
+
import {currentViewShows, dialogCloses, openApp} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
17
|
+
import {closeContextMenu, noBalloons, pickFromOpenMenu} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
18
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
19
|
+
|
|
20
|
+
test.describe("Hit Triage landing: the campaigns table lists, sorts, groups and acts on campaigns", () => {
|
|
21
|
+
const session = feature(test, "features/landing/hit-triage-campaigns.feature", import.meta.url);
|
|
22
|
+
test("Hit Triage landing: the campaigns table lists, sorts, groups and acts on campaigns", {tag: ["@journey"]}, async ({browser}) => {
|
|
23
|
+
const page = await session.page(browser);
|
|
24
|
+
const run = journey(test, 8, page);
|
|
25
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
26
|
+
await session.step(17, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
27
|
+
await session.step(18, "And the \"Hit Triage\" campaigns are on the server:", () => campaignsOnServer(page, "Hit Triage", [["code","name","status","created","molecules","author","can edit"],[session.text("BDDHTL{time}-1"),session.text("BDD HT Alpha {time}"),session.text("BDD Ready {time}"),"2099/1/13","4","me","everyone"],[session.text("BDDHTL{time}-2"),session.text("BDD HT Beta {time}"),session.text("BDD Hold {time}"),"2099/1/12","9","me","everyone"],[session.text("BDDHTL{time}-3"),session.text("BDD HT Gamma {time}"),session.text("BDD Ready {time}"),"2099/1/11","6","sharing user","author"]]), [["code","name","status","created","molecules","author","can edit"],[session.text("BDDHTL{time}-1"),session.text("BDD HT Alpha {time}"),session.text("BDD Ready {time}"),"2099/1/13","4","me","everyone"],[session.text("BDDHTL{time}-2"),session.text("BDD HT Beta {time}"),session.text("BDD Hold {time}"),"2099/1/12","9","me","everyone"],[session.text("BDDHTL{time}-3"),session.text("BDD HT Gamma {time}"),session.text("BDD Ready {time}"),"2099/1/11","6","sharing user","author"]]);
|
|
28
|
+
await session.step(23, "And the campaigns table of \"Hit Triage\" is sorted by \"Created\" descending", () => sortedBy(page, "Hit Triage", "Created", "descending"));
|
|
29
|
+
await session.step(24, "And user opens the \"Hit Triage\" app", () => openApp(page, "Hit Triage"));
|
|
30
|
+
await run.scenario("The table lists the campaigns with Hit Triage's default columns", async () => {
|
|
31
|
+
await session.step(27, "Then the current view should show the text \"Continue Campaign\"", () => currentViewShows(page, "Continue Campaign"));
|
|
32
|
+
await session.step(28, "And the campaigns table should have the columns \"Name, Created, Author, Total, Selected, Status\"", () => tableColumns(page, "Name, Created, Author, Total, Selected, Status"));
|
|
33
|
+
await session.step(29, "And the \"Total\" column of the \"BDD HT Beta {time}\" campaign row should be \"9\"", () => cellIs(page, "Total", session.text("BDD HT Beta {time}"), "9"));
|
|
34
|
+
await session.step(30, "And the \"Selected\" column of the \"BDD HT Beta {time}\" campaign row should be \"9\"", () => cellIs(page, "Selected", session.text("BDD HT Beta {time}"), "9"));
|
|
35
|
+
await session.step(31, "And the \"Status\" column of the \"BDD HT Gamma {time}\" campaign row should be \"BDD Ready {time}\"", () => cellIs(page, "Status", session.text("BDD HT Gamma {time}"), session.text("BDD Ready {time}")));
|
|
36
|
+
await session.step(32, "And name link of \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("name link of \"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
37
|
+
});
|
|
38
|
+
await run.scenario("The eye menu adds a column at the end and takes it away", async () => {
|
|
39
|
+
await session.step(35, "When user clicks on campaign columns icon", () => clickOn(page, el("campaign columns icon")));
|
|
40
|
+
await session.step(36, "Then the open menu should show \"Code\" as unchecked", () => menuItemChecked(page, "Code", "unchecked"));
|
|
41
|
+
await session.step(37, "And the open menu should show \"Total\" as checked", () => menuItemChecked(page, "Total", "checked"));
|
|
42
|
+
await session.step(38, "When user picks \"Code\" from the open menu", () => pickFromOpenMenu(page, "Code"));
|
|
43
|
+
await session.step(39, "Then the campaigns table should have the columns \"Name, Created, Author, Total, Selected, Status, Code\"", () => tableColumns(page, "Name, Created, Author, Total, Selected, Status, Code"));
|
|
44
|
+
await session.step(40, "And the \"Code\" column of the \"BDD HT Alpha {time}\" campaign row should be \"BDDHTL{time}-1\"", () => cellIs(page, "Code", session.text("BDD HT Alpha {time}"), session.text("BDDHTL{time}-1")));
|
|
45
|
+
await session.step(41, "When user picks \"Code\" from the open menu", () => pickFromOpenMenu(page, "Code"));
|
|
46
|
+
await session.step(42, "Then the campaigns table should have the columns \"Name, Created, Author, Total, Selected, Status\"", () => tableColumns(page, "Name, Created, Author, Total, Selected, Status"));
|
|
47
|
+
await session.step(43, "When user closes the context menu", () => closeContextMenu(page));
|
|
48
|
+
});
|
|
49
|
+
await run.scenario("A double click on a header sorts up, then down, then not at all", async () => {
|
|
50
|
+
await session.step(46, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
51
|
+
await session.step(47, "When user double-clicks the \"Total\" header of the campaigns table", () => doubleClickHeader(page, "Total"));
|
|
52
|
+
await session.step(48, "Then the campaigns table should be sorted by \"Total\" ascending", () => tableSorted(page, "Total", "ascending"));
|
|
53
|
+
await session.step(49, "When user double-clicks the \"Total\" header of the campaigns table", () => doubleClickHeader(page, "Total"));
|
|
54
|
+
await session.step(50, "Then the campaigns table should be sorted by \"Total\" descending", () => tableSorted(page, "Total", "descending"));
|
|
55
|
+
await session.step(51, "When user double-clicks the \"Total\" header of the campaigns table", () => doubleClickHeader(page, "Total"));
|
|
56
|
+
await session.step(52, "Then the campaigns table should not be sorted", () => tableNotSorted(page));
|
|
57
|
+
await session.step(53, "When user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
58
|
+
await session.step(54, "And user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
59
|
+
await session.step(55, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
60
|
+
});
|
|
61
|
+
await run.scenario("Grouping by Status puts a header over each status's rows, which expands and collapses them", async () => {
|
|
62
|
+
await session.step(58, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
63
|
+
await session.step(59, "And user picks \"Status\" from the open menu", () => pickFromOpenMenu(page, "Status"));
|
|
64
|
+
await session.step(60, "Then \"BDD Ready {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Ready {time}\" campaign group")), "visible"));
|
|
65
|
+
await session.step(61, "And \"BDD Hold {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Hold {time}\" campaign group")), "visible"));
|
|
66
|
+
await session.step(62, "When user expands \"BDD Ready {time}\" campaign group", () => expand(page, el(session.text("\"BDD Ready {time}\" campaign group"))));
|
|
67
|
+
await session.step(63, "Then \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
68
|
+
await session.step(64, "And \"BDD HT Gamma {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD HT Gamma {time}\" campaign row")), "visible"));
|
|
69
|
+
await session.step(65, "When user collapses \"BDD Ready {time}\" campaign group", () => collapse(page, el(session.text("\"BDD Ready {time}\" campaign group"))));
|
|
70
|
+
await session.step(66, "Then \"BDD HT Alpha {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("\"BDD HT Alpha {time}\" campaign row")), "hidden"));
|
|
71
|
+
await session.step(67, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
72
|
+
await session.step(68, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
73
|
+
await session.step(69, "Then \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
74
|
+
await session.step(70, "And \"BDD Ready {time}\" campaign group should be absent", () => shouldBe(page, el(session.text("\"BDD Ready {time}\" campaign group")), "absent"));
|
|
75
|
+
});
|
|
76
|
+
await run.scenario("Only the campaigns the user may edit show the share and delete icons", async () => {
|
|
77
|
+
await session.step(73, "Then permissions icon of \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("permissions icon of \"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
78
|
+
await session.step(74, "And delete icon of \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("delete icon of \"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
79
|
+
await session.step(75, "And permissions icon of \"BDD HT Gamma {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("permissions icon of \"BDD HT Gamma {time}\" campaign row")), "hidden"));
|
|
80
|
+
await session.step(76, "And delete icon of \"BDD HT Gamma {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("delete icon of \"BDD HT Gamma {time}\" campaign row")), "hidden"));
|
|
81
|
+
});
|
|
82
|
+
await run.scenario("The share icon opens Edit Permissions, and CANCEL closes it", async () => {
|
|
83
|
+
await session.step(79, "When user clicks on permissions icon of \"BDD HT Alpha {time}\" campaign row", () => clickOn(page, el(session.text("permissions icon of \"BDD HT Alpha {time}\" campaign row"))));
|
|
84
|
+
await session.step(80, "Then \"Edit Permissions\" dialog should be visible", () => shouldBe(page, el("\"Edit Permissions\" dialog"), "visible"));
|
|
85
|
+
await session.step(81, "And \"Edit Permissions\" dialog should contain text \"Can View\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "Can View"));
|
|
86
|
+
await session.step(82, "And \"Edit Permissions\" dialog should contain text \"Can Edit\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "Can Edit"));
|
|
87
|
+
await session.step(83, "When user clicks on CANCEL button in \"Edit Permissions\" dialog", () => clickOn(page, el("CANCEL button in \"Edit Permissions\" dialog")));
|
|
88
|
+
await session.step(84, "Then the \"Edit Permissions\" dialog should close", () => dialogCloses(page, "Edit Permissions"));
|
|
89
|
+
});
|
|
90
|
+
await run.scenario("Delete asks for a confirmation naming the campaign, and OK removes it", async () => {
|
|
91
|
+
await session.step(87, "When user clicks on delete icon of \"BDD HT Beta {time}\" campaign row", () => clickOn(page, el(session.text("delete icon of \"BDD HT Beta {time}\" campaign row"))));
|
|
92
|
+
await session.step(88, "Then \"Delete campaign\" dialog should contain text \"Are you sure you want to delete campaign\"", () => shouldContainText(page, el("\"Delete campaign\" dialog"), "Are you sure you want to delete campaign"));
|
|
93
|
+
await session.step(89, "And \"Delete campaign\" dialog should contain text \"BDD HT Beta {time}\"", () => shouldContainText(page, el("\"Delete campaign\" dialog"), session.text("BDD HT Beta {time}")));
|
|
94
|
+
await session.step(90, "When user confirms the \"Delete campaign\" dialog", () => confirmDialog(page, el("the \"Delete campaign\" dialog")));
|
|
95
|
+
await session.step(91, "Then the \"Hit Triage\" campaign \"BDDHTL{time}-2\" should not be on the server", () => campaignNotOnServer(page, "Hit Triage", session.text("BDDHTL{time}-2")));
|
|
96
|
+
await session.step(92, "And \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
97
|
+
await session.step(93, "And \"BDD HT Beta {time}\" campaign row should be absent", () => shouldBe(page, el(session.text("\"BDD HT Beta {time}\" campaign row")), "absent"));
|
|
98
|
+
});
|
|
99
|
+
await run.scenario("The refresh icon rebuilds the table in the order it had", async () => {
|
|
100
|
+
await session.step(96, "When user clicks on campaigns refresh icon", () => clickOn(page, el("campaigns refresh icon")));
|
|
101
|
+
await session.step(97, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
102
|
+
await session.step(98, "And \"BDD HT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD HT Alpha {time}\" campaign row")), "visible"));
|
|
103
|
+
await session.step(99, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
104
|
+
});
|
|
105
|
+
run.finish();
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/new-campaign.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
13
|
+
import {campaignHas, campaignOnServerClaim, templatesOnServer} from '../../bindings/landing.js';
|
|
14
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
15
|
+
import {clickOn, selectIn, shouldBe, typeInto} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
16
|
+
import {columnsExactly, valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
17
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
18
|
+
import {closeAllViews, openApp, packageInstalled, urlShouldContain, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
19
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("Hit Design new campaign: the form a template builds, its required fields, and Start", () => {
|
|
22
|
+
const session = feature(test, "features/landing/new-campaign.feature", import.meta.url);
|
|
23
|
+
test("Hit Design new campaign: the form a template builds, its required fields, and Start", {tag: ["@journey"]}, async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
const run = journey(test, 4, page);
|
|
26
|
+
await session.step(17, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(18, "And the \"Chem\" package is installed", () => packageInstalled(page, "Chem"));
|
|
28
|
+
await session.step(19, "And the \"Hit Design\" templates are on the server:", () => templatesOnServer(page, "Hit Design", [["name","key","fields","stages","layout"],[session.text("BDD New Campaign {time}"),session.text("BDDNEW{time}"),"Owner: String required; Budget: Number","Idea, Made",""],[session.text("BDD New Layout {time}"),session.text("BDDNLY{time}"),"Layout note: String","Idea","bar chart of Stage"]]), [["name","key","fields","stages","layout"],[session.text("BDD New Campaign {time}"),session.text("BDDNEW{time}"),"Owner: String required; Budget: Number","Idea, Made",""],[session.text("BDD New Layout {time}"),session.text("BDDNLY{time}"),"Layout note: String","Idea","bar chart of Stage"]]);
|
|
29
|
+
await session.step(23, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
30
|
+
await run.scenario("A template's form has Campaign Name, the template's fields and START", async () => {
|
|
31
|
+
await session.step(26, "When user selects \"BDD New Campaign {time}\" in Template input", () => selectIn(page, session.text("BDD New Campaign {time}"), el("Template input")));
|
|
32
|
+
await session.step(27, "Then \"Campaign Name\" input should be visible", () => shouldBe(page, el("\"Campaign Name\" input"), "visible"));
|
|
33
|
+
await session.step(28, "And \"Owner\" input should be visible", () => shouldBe(page, el("\"Owner\" input"), "visible"));
|
|
34
|
+
await session.step(29, "And \"Budget\" input should be visible", () => shouldBe(page, el("\"Budget\" input"), "visible"));
|
|
35
|
+
await session.step(30, "And Start button should be visible", () => shouldBe(page, el("Start button"), "visible"));
|
|
36
|
+
});
|
|
37
|
+
await run.scenario("While a required field is empty, START is disabled", async () => {
|
|
38
|
+
await session.step(33, "When user closes all views", () => closeAllViews(page));
|
|
39
|
+
await session.step(34, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
40
|
+
await session.step(35, "And user selects \"BDD New Campaign {time}\" in Template input", () => selectIn(page, session.text("BDD New Campaign {time}"), el("Template input")));
|
|
41
|
+
await session.step(36, "Then \"Owner\" input should be visible", () => shouldBe(page, el("\"Owner\" input"), "visible"));
|
|
42
|
+
await session.step(37, "And Start button should be disabled", () => shouldBe(page, el("Start button"), "disabled"));
|
|
43
|
+
await session.step(38, "When user types \"Ann\" into \"Owner\" input", () => typeInto(page, "Ann", el("\"Owner\" input")));
|
|
44
|
+
await session.step(39, "Then Start button should be enabled", () => shouldBe(page, el("Start button"), "enabled"));
|
|
45
|
+
});
|
|
46
|
+
await run.scenario("START makes the campaign under its code and name and opens it on one row with the sketcher", async () => {
|
|
47
|
+
await session.step(42, "When user closes all views", () => closeAllViews(page));
|
|
48
|
+
await session.step(43, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
49
|
+
await session.step(44, "And user selects \"BDD New Campaign {time}\" in Template input", () => selectIn(page, session.text("BDD New Campaign {time}"), el("Template input")));
|
|
50
|
+
await session.step(45, "And user types \"Ann\" into \"Owner\" input", () => typeInto(page, "Ann", el("\"Owner\" input")));
|
|
51
|
+
await session.step(46, "And user types \"BDD New Run {time}\" into \"Campaign Name\" input", () => typeInto(page, session.text("BDD New Run {time}"), el("\"Campaign Name\" input")));
|
|
52
|
+
await session.step(47, "And user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
53
|
+
await session.step(48, "Then the \"BDD New Run {time}\" view should be current", () => viewIsCurrent(page, session.text("BDD New Run {time}")));
|
|
54
|
+
await session.step(49, "And the page address should contain \"campaignId=BDDNEW{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDNEW{time}-1")));
|
|
55
|
+
await session.step(50, "And sketcher dialog should be visible", () => shouldBe(page, el("sketcher dialog"), "visible"));
|
|
56
|
+
await session.step(51, "And the table should have the columns \"Molecule, Stage, V-iD\"", () => columnsExactly(page, "Molecule, Stage, V-iD"));
|
|
57
|
+
await session.step(52, "And the table should have 1 row", () => rowCount(page, 1));
|
|
58
|
+
await session.step(53, "And the value of \"Stage\" column in row 1 should be \"Idea\"", () => valueInRow(page, "Stage", 1, "Idea"));
|
|
59
|
+
await session.step(54, "And the \"Hit Design\" campaign \"BDDNEW{time}-1\" should be on the server", () => campaignOnServerClaim(page, "Hit Design", session.text("BDDNEW{time}-1")));
|
|
60
|
+
await session.step(55, "And the \"Hit Design\" campaign \"BDDNEW{time}-1\" on the server should have the name \"BDD New Run {time}\"", () => campaignHas(page, "Hit Design", session.text("BDDNEW{time}-1"), "name", session.text("BDD New Run {time}")));
|
|
61
|
+
await session.step(56, "And the \"Hit Design\" campaign \"BDDNEW{time}-1\" on the server should have the status \"In Progress\"", () => campaignHas(page, "Hit Design", session.text("BDDNEW{time}-1"), "status", "In Progress"));
|
|
62
|
+
await session.step(57, "When user clicks on CANCEL button in sketcher dialog", () => clickOn(page, el("CANCEL button in sketcher dialog")));
|
|
63
|
+
await session.step(58, "Then sketcher dialog should be absent", () => shouldBe(page, el("sketcher dialog"), "absent"));
|
|
64
|
+
});
|
|
65
|
+
await run.scenario("A new campaign from a template with a layout opens with that layout", async () => {
|
|
66
|
+
await session.step(61, "When user closes all views", () => closeAllViews(page));
|
|
67
|
+
await session.step(62, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
68
|
+
await session.step(63, "And user selects \"BDD New Layout {time}\" in Template input", () => selectIn(page, session.text("BDD New Layout {time}"), el("Template input")));
|
|
69
|
+
await session.step(64, "Then \"Layout note\" input should be visible", () => shouldBe(page, el("\"Layout note\" input"), "visible"));
|
|
70
|
+
await session.step(65, "When user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
71
|
+
await session.step(66, "Then the \"BDDNLY{time}-1\" view should be current", () => viewIsCurrent(page, session.text("BDDNLY{time}-1")));
|
|
72
|
+
await session.step(67, "And sketcher dialog should be visible", () => shouldBe(page, el("sketcher dialog"), "visible"));
|
|
73
|
+
await session.step(68, "When user clicks on CANCEL button in sketcher dialog", () => clickOn(page, el("CANCEL button in sketcher dialog")));
|
|
74
|
+
await session.step(69, "Then bar chart viewer should be visible", () => shouldBe(page, el("bar chart viewer"), "visible"));
|
|
75
|
+
});
|
|
76
|
+
run.finish();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/pep-triage-campaigns.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
13
|
+
import {campaignsOnServer, cellIs, settingsDefaults, sortedBy, tableColumns} from '../../bindings/landing.js';
|
|
14
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
15
|
+
import {clickOn, shouldBe} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
16
|
+
import {openApp, packageInstalled, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
17
|
+
import {pickFromOpenMenu} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
18
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
19
|
+
|
|
20
|
+
test.describe("PepTriage landing: Hit Triage's campaigns table, and the table settings it shares with Hit Triage", () => {
|
|
21
|
+
const session = feature(test, "features/landing/pep-triage-campaigns.feature", import.meta.url);
|
|
22
|
+
test("PepTriage landing: Hit Triage's campaigns table, and the table settings it shares with Hit Triage", {tag: ["@journey"]}, async ({browser}) => {
|
|
23
|
+
const page = await session.page(browser);
|
|
24
|
+
const run = journey(test, 2, page);
|
|
25
|
+
await session.step(12, "Given user is logged in", () => loggedIn(page));
|
|
26
|
+
await session.step(13, "And the \"Bio\" package is installed", () => packageInstalled(page, "Bio"));
|
|
27
|
+
await session.step(14, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
28
|
+
await session.step(15, "And the \"PepTriage\" campaigns are on the server:", () => campaignsOnServer(page, "PepTriage", [["code","name","status","created","molecules","author","can edit"],[session.text("BDDPTL{time}-1"),session.text("BDD PT Alpha {time}"),session.text("BDD Shared {time}"),"2099/1/13","3","me","everyone"],[session.text("BDDPTL{time}-2"),session.text("BDD PT Locked {time}"),"In Progress","2099/1/12","5","sharing user","author"]]), [["code","name","status","created","molecules","author","can edit"],[session.text("BDDPTL{time}-1"),session.text("BDD PT Alpha {time}"),session.text("BDD Shared {time}"),"2099/1/13","3","me","everyone"],[session.text("BDDPTL{time}-2"),session.text("BDD PT Locked {time}"),"In Progress","2099/1/12","5","sharing user","author"]]);
|
|
29
|
+
await session.step(19, "And the \"Hit Triage\" campaigns are on the server:", () => campaignsOnServer(page, "Hit Triage", [["code","name","status","created","molecules"],[session.text("BDDPTH{time}-1"),session.text("BDD PT Cross {time}"),session.text("BDD Shared {time}"),"2099/1/13","2"]]), [["code","name","status","created","molecules"],[session.text("BDDPTH{time}-1"),session.text("BDD PT Cross {time}"),session.text("BDD Shared {time}"),"2099/1/13","2"]]);
|
|
30
|
+
await session.step(22, "And the campaigns table of \"PepTriage\" is sorted by \"Created\" descending", () => sortedBy(page, "PepTriage", "Created", "descending"));
|
|
31
|
+
await session.step(23, "And user opens the \"PepTriage\" app", () => openApp(page, "PepTriage"));
|
|
32
|
+
await run.scenario("The PepTriage landing lists its campaigns with Hit Triage's columns and row actions", async () => {
|
|
33
|
+
await session.step(26, "Then the \"PepTriage\" view should be current", () => viewIsCurrent(page, "PepTriage"));
|
|
34
|
+
await session.step(27, "And the campaigns table should have the columns \"Name, Created, Author, Total, Selected, Status\"", () => tableColumns(page, "Name, Created, Author, Total, Selected, Status"));
|
|
35
|
+
await session.step(28, "And the \"Total\" column of the \"BDD PT Locked {time}\" campaign row should be \"5\"", () => cellIs(page, "Total", session.text("BDD PT Locked {time}"), "5"));
|
|
36
|
+
await session.step(29, "And permissions icon of \"BDD PT Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("permissions icon of \"BDD PT Alpha {time}\" campaign row")), "visible"));
|
|
37
|
+
await session.step(30, "And permissions icon of \"BDD PT Locked {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("permissions icon of \"BDD PT Locked {time}\" campaign row")), "hidden"));
|
|
38
|
+
});
|
|
39
|
+
await run.scenario("A grouping chosen in PepTriage groups the Hit Triage table as well", async () => {
|
|
40
|
+
await session.step(33, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
41
|
+
await session.step(34, "And user picks \"Status\" from the open menu", () => pickFromOpenMenu(page, "Status"));
|
|
42
|
+
await session.step(35, "Then \"BDD Shared {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Shared {time}\" campaign group")), "visible"));
|
|
43
|
+
await session.step(36, "When user opens the \"Hit Triage\" app", () => openApp(page, "Hit Triage"));
|
|
44
|
+
await session.step(37, "Then \"BDD Shared {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Shared {time}\" campaign group")), "visible"));
|
|
45
|
+
await session.step(38, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
46
|
+
await session.step(39, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
47
|
+
await session.step(40, "Then \"BDD PT Cross {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD PT Cross {time}\" campaign row")), "visible"));
|
|
48
|
+
await session.step(41, "And \"BDD Shared {time}\" campaign group should be absent", () => shouldBe(page, el(session.text("\"BDD Shared {time}\" campaign group")), "absent"));
|
|
49
|
+
});
|
|
50
|
+
run.finish();
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/pepti-hit-landing.feature
|
|
6
|
+
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
|
+
--- */
|
|
8
|
+
import {test} from '@playwright/test';
|
|
9
|
+
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
10
|
+
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
11
|
+
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
12
|
+
import '@datagrok-libraries/bdd/bindings/platform/elements';
|
|
13
|
+
import {campaignHas, campaignOnServerClaim, campaignViewsOpen, campaignsOnServer, cellIs, settingsDefaults, sortedBy, tableColumns, templatesOnServer} from '../../bindings/landing.js';
|
|
14
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
15
|
+
import {clickOn, selectIn, shouldBe, shouldNotContainText, typeInto} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
16
|
+
import {columnSemType, columnsExactly, valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
17
|
+
import {closeAllViews, currentViewShows, openApp, packageInstalled, switchView, urlShouldContain, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
18
|
+
import {noBalloons} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
19
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("PeptiHit landing and new campaign: the campaigns table, a campaign opened by its code, and START with Helm", () => {
|
|
22
|
+
const session = feature(test, "features/landing/pepti-hit-landing.feature", import.meta.url);
|
|
23
|
+
test("PeptiHit landing and new campaign: the campaigns table, a campaign opened by its code, and START with Helm", {tag: ["@journey"]}, async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
const run = journey(test, 8, page);
|
|
26
|
+
await session.step(21, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(22, "And the \"Bio\" package is installed", () => packageInstalled(page, "Bio"));
|
|
28
|
+
await session.step(23, "And the \"Helm\" package is installed", () => packageInstalled(page, "Helm"));
|
|
29
|
+
await session.step(24, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
30
|
+
await session.step(25, "And the \"PeptiHit\" templates are on the server:", () => templatesOnServer(page, "PeptiHit", [["name","key","fields","stages","layout"],[session.text("BDD PH Start {time}"),session.text("BDDPHS{time}"),"Start note: String","Design, Test",""],[session.text("BDD PH Named {time}"),session.text("BDDPHN{time}"),"Named note: String","Design",""],[session.text("BDD PH Fresh {time}"),session.text("BDDPHF{time}"),"Fresh note: String","Design",""],[session.text("BDD PH After {time}"),session.text("BDDPHA{time}"),"After note: String","Design",""],[session.text("BDD PH Layout {time}"),session.text("BDDPHY{time}"),"Layout note: String","Design","scatter plot of MolWt"]]), [["name","key","fields","stages","layout"],[session.text("BDD PH Start {time}"),session.text("BDDPHS{time}"),"Start note: String","Design, Test",""],[session.text("BDD PH Named {time}"),session.text("BDDPHN{time}"),"Named note: String","Design",""],[session.text("BDD PH Fresh {time}"),session.text("BDDPHF{time}"),"Fresh note: String","Design",""],[session.text("BDD PH After {time}"),session.text("BDDPHA{time}"),"After note: String","Design",""],[session.text("BDD PH Layout {time}"),session.text("BDDPHY{time}"),"Layout note: String","Design","scatter plot of MolWt"]]);
|
|
31
|
+
await session.step(32, "And the \"PeptiHit\" campaigns are on the server:", () => campaignsOnServer(page, "PeptiHit", [["code","name","status","created","molecules","author","can edit"],[session.text("BDDPHL{time}-1"),session.text("BDD PH Alpha {time}"),session.text("BDD Synthesis {time}"),"2099/1/14","3","me","everyone"],[session.text("BDDPHL{time}-2"),session.text("BDD PH Beta {time}"),"In Progress","2099/1/13","2","me","everyone"],[session.text("BDDPHL{time}-3"),session.text("BDD PH Locked {time}"),"In Progress","2099/1/12","2","sharing user","author"]]), [["code","name","status","created","molecules","author","can edit"],[session.text("BDDPHL{time}-1"),session.text("BDD PH Alpha {time}"),session.text("BDD Synthesis {time}"),"2099/1/14","3","me","everyone"],[session.text("BDDPHL{time}-2"),session.text("BDD PH Beta {time}"),"In Progress","2099/1/13","2","me","everyone"],[session.text("BDDPHL{time}-3"),session.text("BDD PH Locked {time}"),"In Progress","2099/1/12","2","sharing user","author"]]);
|
|
32
|
+
await session.step(37, "And the campaigns table of \"PeptiHit\" is sorted by \"Created\" descending", () => sortedBy(page, "PeptiHit", "Created", "descending"));
|
|
33
|
+
await session.step(38, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
34
|
+
await run.scenario("The PeptiHit landing lists the campaigns as Hit Design does, under its own hero", async () => {
|
|
35
|
+
await session.step(41, "Then the \"PeptiHit\" view should be current", () => viewIsCurrent(page, "PeptiHit"));
|
|
36
|
+
await session.step(42, "And the current view should show the text \"Sketch Helm sequences in the spreadsheet\"", () => currentViewShows(page, "Sketch Helm sequences in the spreadsheet"));
|
|
37
|
+
await session.step(43, "And the campaigns table should have the columns \"Name, Code, Created, Author, Last Modified by, Molecules, Status\"", () => tableColumns(page, "Name, Code, Created, Author, Last Modified by, Molecules, Status"));
|
|
38
|
+
await session.step(44, "And the \"Status\" column of the \"BDD PH Alpha {time}\" campaign row should be \"BDD Synthesis {time}\"", () => cellIs(page, "Status", session.text("BDD PH Alpha {time}"), session.text("BDD Synthesis {time}")));
|
|
39
|
+
await session.step(45, "And permissions icon of \"BDD PH Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("permissions icon of \"BDD PH Alpha {time}\" campaign row")), "visible"));
|
|
40
|
+
await session.step(46, "And permissions icon of \"BDD PH Locked {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("permissions icon of \"BDD PH Locked {time}\" campaign row")), "hidden"));
|
|
41
|
+
});
|
|
42
|
+
await run.scenario("A campaign's name opens it with the Helm column first, and the crumb comes back", async () => {
|
|
43
|
+
await session.step(49, "When user clicks on \"BDD PH Alpha {time}\" link", () => clickOn(page, el(session.text("\"BDD PH Alpha {time}\" link"))));
|
|
44
|
+
await session.step(50, "Then the page address should contain \"campaignId=BDDPHL{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDPHL{time}-1")));
|
|
45
|
+
await session.step(51, "And 1 campaign view should be open", () => campaignViewsOpen(page, 1));
|
|
46
|
+
await session.step(52, "And the table should have the columns \"Helm, Molecule, Stage, V-iD\"", () => columnsExactly(page, "Helm, Molecule, Stage, V-iD"));
|
|
47
|
+
await session.step(53, "And \"Helm\" column should have semantic type \"Macromolecule\"", () => columnSemType(page, "Helm", "Macromolecule"));
|
|
48
|
+
await session.step(54, "When user clicks on \"PeptiHit\" link", () => clickOn(page, el("\"PeptiHit\" link")));
|
|
49
|
+
await session.step(55, "Then the \"PeptiHit\" view should be current", () => viewIsCurrent(page, "PeptiHit"));
|
|
50
|
+
});
|
|
51
|
+
await run.scenario("START makes a campaign with Helm, Molecule, Stage and V-iD and opens the HELM editor on it", async () => {
|
|
52
|
+
await session.step(58, "When user closes all views", () => closeAllViews(page));
|
|
53
|
+
await session.step(59, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
54
|
+
await session.step(60, "And user selects \"BDD PH Start {time}\" in Template input", () => selectIn(page, session.text("BDD PH Start {time}"), el("Template input")));
|
|
55
|
+
await session.step(61, "Then \"Start note\" input should be visible", () => shouldBe(page, el("\"Start note\" input"), "visible"));
|
|
56
|
+
await session.step(62, "When user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
57
|
+
await session.step(63, "Then HELM editor dialog should be visible", () => shouldBe(page, el("HELM editor dialog"), "visible"));
|
|
58
|
+
await session.step(64, "And the \"BDDPHS{time}-1\" view should be current", () => viewIsCurrent(page, session.text("BDDPHS{time}-1")));
|
|
59
|
+
await session.step(65, "And the page address should contain \"campaignId=BDDPHS{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDPHS{time}-1")));
|
|
60
|
+
await session.step(66, "And the table should have the columns \"Helm, Molecule, Stage, V-iD\"", () => columnsExactly(page, "Helm, Molecule, Stage, V-iD"));
|
|
61
|
+
await session.step(67, "And the value of \"Stage\" column in row 1 should be \"Design\"", () => valueInRow(page, "Stage", 1, "Design"));
|
|
62
|
+
await session.step(68, "And \"Helm\" column should have semantic type \"Macromolecule\"", () => columnSemType(page, "Helm", "Macromolecule"));
|
|
63
|
+
await session.step(69, "And the \"PeptiHit\" campaign \"BDDPHS{time}-1\" should be on the server", () => campaignOnServerClaim(page, "PeptiHit", session.text("BDDPHS{time}-1")));
|
|
64
|
+
await session.step(70, "When user clicks on CANCEL button in HELM editor dialog", () => clickOn(page, el("CANCEL button in HELM editor dialog")));
|
|
65
|
+
await session.step(71, "Then HELM editor dialog should be absent", () => shouldBe(page, el("HELM editor dialog"), "absent"));
|
|
66
|
+
});
|
|
67
|
+
await run.scenario("The Campaign Name typed before START names the new campaign", async () => {
|
|
68
|
+
await session.step(74, "When user closes all views", () => closeAllViews(page));
|
|
69
|
+
await session.step(75, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
70
|
+
await session.step(76, "And user selects \"BDD PH Named {time}\" in Template input", () => selectIn(page, session.text("BDD PH Named {time}"), el("Template input")));
|
|
71
|
+
await session.step(77, "Then \"Named note\" input should be visible", () => shouldBe(page, el("\"Named note\" input"), "visible"));
|
|
72
|
+
await session.step(78, "When user types \"BDD PH Named Run {time}\" into \"Campaign Name\" input", () => typeInto(page, session.text("BDD PH Named Run {time}"), el("\"Campaign Name\" input")));
|
|
73
|
+
await session.step(79, "And user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
74
|
+
await session.step(80, "Then HELM editor dialog should be visible", () => shouldBe(page, el("HELM editor dialog"), "visible"));
|
|
75
|
+
await session.step(81, "And the \"PeptiHit\" campaign \"BDDPHN{time}-1\" should be on the server", () => campaignOnServerClaim(page, "PeptiHit", session.text("BDDPHN{time}-1")));
|
|
76
|
+
await session.step(82, "And the \"PeptiHit\" campaign \"BDDPHN{time}-1\" on the server should have the name \"BDD PH Named Run {time}\"", () => campaignHas(page, "PeptiHit", session.text("BDDPHN{time}-1"), "name", session.text("BDD PH Named Run {time}")));
|
|
77
|
+
await session.step(83, "When user clicks on CANCEL button in HELM editor dialog", () => clickOn(page, el("CANCEL button in HELM editor dialog")));
|
|
78
|
+
});
|
|
79
|
+
await run.scenario("A new campaign does not take over the campaign opened before it", async () => {
|
|
80
|
+
await session.step(86, "When user closes all views", () => closeAllViews(page));
|
|
81
|
+
await session.step(87, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
82
|
+
await session.step(88, "And user clicks on \"BDD PH Alpha {time}\" link", () => clickOn(page, el(session.text("\"BDD PH Alpha {time}\" link"))));
|
|
83
|
+
await session.step(89, "Then the page address should contain \"campaignId=BDDPHL{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDPHL{time}-1")));
|
|
84
|
+
await session.step(90, "When user clicks on \"PeptiHit\" link", () => clickOn(page, el("\"PeptiHit\" link")));
|
|
85
|
+
await session.step(91, "And user selects \"BDD PH Fresh {time}\" in Template input", () => selectIn(page, session.text("BDD PH Fresh {time}"), el("Template input")));
|
|
86
|
+
await session.step(92, "Then \"Fresh note\" input should be visible", () => shouldBe(page, el("\"Fresh note\" input"), "visible"));
|
|
87
|
+
await session.step(93, "When user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
88
|
+
await session.step(94, "Then HELM editor dialog should be visible", () => shouldBe(page, el("HELM editor dialog"), "visible"));
|
|
89
|
+
await session.step(95, "And the \"PeptiHit\" campaign \"BDDPHF{time}-1\" should be on the server", () => campaignOnServerClaim(page, "PeptiHit", session.text("BDDPHF{time}-1")));
|
|
90
|
+
await session.step(96, "And the \"PeptiHit\" campaign \"BDDPHF{time}-1\" on the server should have the status \"In Progress\"", () => campaignHas(page, "PeptiHit", session.text("BDDPHF{time}-1"), "status", "In Progress"));
|
|
91
|
+
await session.step(97, "When user clicks on CANCEL button in HELM editor dialog", () => clickOn(page, el("CANCEL button in HELM editor dialog")));
|
|
92
|
+
});
|
|
93
|
+
await run.scenario("After a campaign the user may only view, START still makes and opens the new campaign", async () => {
|
|
94
|
+
await session.step(100, "When user closes all views", () => closeAllViews(page));
|
|
95
|
+
await session.step(101, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
96
|
+
await session.step(102, "And user clicks on \"BDD PH Locked {time}\" link", () => clickOn(page, el(session.text("\"BDD PH Locked {time}\" link"))));
|
|
97
|
+
await session.step(103, "Then the page address should contain \"campaignId=BDDPHL{time}-3\"", () => urlShouldContain(page, session.text("campaignId=BDDPHL{time}-3")));
|
|
98
|
+
await session.step(104, "When user clicks on \"PeptiHit\" link", () => clickOn(page, el("\"PeptiHit\" link")));
|
|
99
|
+
await session.step(105, "And user selects \"BDD PH After {time}\" in Template input", () => selectIn(page, session.text("BDD PH After {time}"), el("Template input")));
|
|
100
|
+
await session.step(106, "Then \"After note\" input should be visible", () => shouldBe(page, el("\"After note\" input"), "visible"));
|
|
101
|
+
await session.step(107, "When user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
102
|
+
await session.step(108, "Then the \"PeptiHit\" campaign \"BDDPHA{time}-1\" should be on the server", () => campaignOnServerClaim(page, "PeptiHit", session.text("BDDPHA{time}-1")));
|
|
103
|
+
await session.step(109, "And the \"BDDPHA{time}-1\" view should be current", () => viewIsCurrent(page, session.text("BDDPHA{time}-1")));
|
|
104
|
+
await session.step(110, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
105
|
+
});
|
|
106
|
+
await run.scenario("Opening a campaign from the landing closes the campaign opened before it", async () => {
|
|
107
|
+
await session.step(113, "When user closes all views", () => closeAllViews(page));
|
|
108
|
+
await session.step(114, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
109
|
+
await session.step(115, "And user clicks on \"BDD PH Beta {time}\" link", () => clickOn(page, el(session.text("\"BDD PH Beta {time}\" link"))));
|
|
110
|
+
await session.step(116, "Then the page address should contain \"campaignId=BDDPHL{time}-2\"", () => urlShouldContain(page, session.text("campaignId=BDDPHL{time}-2")));
|
|
111
|
+
await session.step(117, "When user switches to the \"PeptiHit\" view", () => switchView(page, "PeptiHit"));
|
|
112
|
+
await session.step(118, "And user clicks on \"BDD PH Locked {time}\" link", () => clickOn(page, el(session.text("\"BDD PH Locked {time}\" link"))));
|
|
113
|
+
await session.step(119, "Then the page address should contain \"campaignId=BDDPHL{time}-3\"", () => urlShouldContain(page, session.text("campaignId=BDDPHL{time}-3")));
|
|
114
|
+
await session.step(120, "And 1 campaign view should be open", () => campaignViewsOpen(page, 1));
|
|
115
|
+
});
|
|
116
|
+
await run.scenario("A new campaign from a template with a layout opens with viewers that work", async () => {
|
|
117
|
+
await session.step(123, "When user closes all views", () => closeAllViews(page));
|
|
118
|
+
await session.step(124, "And user opens the \"PeptiHit\" app", () => openApp(page, "PeptiHit"));
|
|
119
|
+
await session.step(125, "And user selects \"BDD PH Layout {time}\" in Template input", () => selectIn(page, session.text("BDD PH Layout {time}"), el("Template input")));
|
|
120
|
+
await session.step(126, "Then \"Layout note\" input should be visible", () => shouldBe(page, el("\"Layout note\" input"), "visible"));
|
|
121
|
+
await session.step(127, "When user clicks on Start button", () => clickOn(page, el("Start button")));
|
|
122
|
+
await session.step(128, "Then HELM editor dialog should be visible", () => shouldBe(page, el("HELM editor dialog"), "visible"));
|
|
123
|
+
await session.step(129, "When user clicks on CANCEL button in HELM editor dialog", () => clickOn(page, el("CANCEL button in HELM editor dialog")));
|
|
124
|
+
await session.step(130, "Then the \"BDDPHY{time}-1\" view should be current", () => viewIsCurrent(page, session.text("BDDPHY{time}-1")));
|
|
125
|
+
await session.step(131, "And scatter plot viewer should be visible", () => shouldBe(page, el("scatter plot viewer"), "visible"));
|
|
126
|
+
await session.step(132, "And scatter plot viewer should not contain text \"does not exist\"", () => shouldNotContainText(page, el("scatter plot viewer"), "does not exist"));
|
|
127
|
+
});
|
|
128
|
+
run.finish();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/pepti-hit/helm-edit.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 {openByLink, savedCellMatching, valueMatching} from '../../bindings/campaign.js';
|
|
15
|
+
import {helmEditorOk, helmEditorOpen, peptiHitCampaign, writeHelm} from '../../bindings/pepti-hit.js';
|
|
16
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
17
|
+
import {shouldBe} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
18
|
+
import {columnSemType, columnUnits, columnsExactly} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
19
|
+
import {viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
20
|
+
import {doubleClickArea, menuLists, noBalloons, rightClickArea} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
21
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
22
|
+
|
|
23
|
+
test.describe("A HELM edited in a PeptiHit campaign becomes its molecule and gets its V-iD", () => {
|
|
24
|
+
const session = feature(test, "features/pepti-hit/helm-edit.feature", import.meta.url);
|
|
25
|
+
test("The campaign opens with a HELM column, and a Helm cell's menu has the package's row actions", 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 PeptiHit campaign \"BDD Helm\" with the stages \"Idea, Design\" and a table of:", () => peptiHitCampaign(page, "BDD Helm", "Idea, Design", [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]), [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]);
|
|
29
|
+
await session.step(20, "When user opens the campaign \"BDD Helm\" by its link", () => openByLink(page, "BDD Helm"));
|
|
30
|
+
await session.step(23, "Then the table should have the columns \"Helm, Molecule, Stage, V-iD\"", () => columnsExactly(page, "Helm, Molecule, Stage, V-iD"));
|
|
31
|
+
await session.step(24, "And \"Helm\" column should have semantic type \"Macromolecule\"", () => columnSemType(page, "Helm", "Macromolecule"));
|
|
32
|
+
await session.step(25, "And \"Helm\" column should have units \"helm\"", () => columnUnits(page, "Helm", "helm"));
|
|
33
|
+
await session.step(26, "And \"PeptiHit\" link should be visible", () => shouldBe(page, el("\"PeptiHit\" link"), "visible"));
|
|
34
|
+
await session.step(27, "When user right-clicks on the \"cell 1 of Helm\" area of grid", () => rightClickArea(page, "cell 1 of Helm", el("grid")));
|
|
35
|
+
await session.step(28, "Then the open menu should list \"Add new row\"", () => menuLists(page, "Add new row"));
|
|
36
|
+
await session.step(29, "And the open menu should list \"Duplicate Sequence\"", () => menuLists(page, "Duplicate Sequence"));
|
|
37
|
+
await session.step(30, "And the open menu should list \"Re-Run Calculations\"", () => menuLists(page, "Re-Run Calculations"));
|
|
38
|
+
});
|
|
39
|
+
test("A HELM committed in the HELM editor fills the Molecule, the template's property and the V-iD, and is saved", 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 PeptiHit campaign \"BDD Helm\" with the stages \"Idea, Design\" and a table of:", () => peptiHitCampaign(page, "BDD Helm", "Idea, Design", [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]), [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]);
|
|
43
|
+
await session.step(20, "When user opens the campaign \"BDD Helm\" by its link", () => openByLink(page, "BDD Helm"));
|
|
44
|
+
await session.step(33, "When user double-clicks on the \"cell 1 of Helm\" area of grid", () => doubleClickArea(page, "cell 1 of Helm", el("grid")));
|
|
45
|
+
await session.step(34, "Then the HELM editor should be open", () => helmEditorOpen(page));
|
|
46
|
+
await session.step(35, "When user writes the HELM \"PEPTIDE1{W.Y.W.Y.W.Y.K}$$$$V2.0\" in the HELM editor", () => writeHelm(page, "PEPTIDE1{W.Y.W.Y.W.Y.K}$$$$V2.0"));
|
|
47
|
+
await session.step(36, "And user clicks on OK in the HELM editor", () => helmEditorOk(page));
|
|
48
|
+
await session.step(37, "Then the value of \"Helm\" column in row 1 should match \"^PEPTIDE1[{]W[.]Y[.]W[.]Y[.]W[.]Y[.]K[}]\"", () => valueMatching(page, "Helm", 1, "^PEPTIDE1[{]W[.]Y[.]W[.]Y[.]W[.]Y[.]K[}]"));
|
|
49
|
+
await session.step(38, "And the campaign \"BDD Helm\" should be saved with a value matching \"^1194[.]3\" in row 1 of the \"MW\" column", () => savedCellMatching(page, "BDD Helm", "^1194[.]3", 1, "MW"));
|
|
50
|
+
await session.step(39, "And the value of \"MW\" column in row 1 should match \"^1194[.]3\"", () => valueMatching(page, "MW", 1, "^1194[.]3"));
|
|
51
|
+
await session.step(40, "And the value of \"Molecule\" column in row 1 should match \"M END\"", () => valueMatching(page, "Molecule", 1, "M END"));
|
|
52
|
+
await session.step(41, "And the value of \"V-iD\" column in row 1 should match \"^V[0-9]{6}$\"", () => valueMatching(page, "V-iD", 1, "^V[0-9]{6}$"));
|
|
53
|
+
await session.step(42, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
54
|
+
});
|
|
55
|
+
test("The campaign view is named after the campaign from the first open", async ({browser}) => {
|
|
56
|
+
const page = await session.page(browser);
|
|
57
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
58
|
+
await session.step(17, "And the PeptiHit campaign \"BDD Helm\" with the stages \"Idea, Design\" and a table of:", () => peptiHitCampaign(page, "BDD Helm", "Idea, Design", [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]), [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","","Idea",""]]);
|
|
59
|
+
await session.step(20, "When user opens the campaign \"BDD Helm\" by its link", () => openByLink(page, "BDD Helm"));
|
|
60
|
+
await session.step(45, "Then \"PeptiHit\" breadcrumb should be visible", () => shouldBe(page, el("\"PeptiHit\" breadcrumb"), "visible"));
|
|
61
|
+
await session.step(46, "And the \"BDD Helm\" view should be current", () => viewIsCurrent(page, "BDD Helm"));
|
|
62
|
+
await session.step(47, "And \"BDD Helm\" breadcrumb should be visible", () => shouldBe(page, el("\"BDD Helm\" breadcrumb"), "visible"));
|
|
63
|
+
});
|
|
64
|
+
});
|