@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,49 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/tracker-cards.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 {cardLayoutOver, hitDesignCampaign, openByLink} from '../../bindings/campaign.js';
|
|
15
|
+
import {peptiHitCampaign} from '../../bindings/pepti-hit.js';
|
|
16
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
17
|
+
import {clickOn, shouldBe} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
18
|
+
import {readingIs, readingReads} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
19
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("The progress tracker's cards are the campaign's own rows", () => {
|
|
22
|
+
const session = feature(test, "features/campaign/tracker-cards.feature", import.meta.url);
|
|
23
|
+
test("Next to a PeptiHit campaign, the cards of a kept card layout show this campaign's rows", async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
await session.step(15, "Given user is logged in", () => loggedIn(page));
|
|
26
|
+
await session.step(18, "Given the PeptiHit campaign \"BDD Cards Peptide\" with the stages \"Design\" and a table of:", () => peptiHitCampaign(page, "BDD Cards Peptide", "Design", [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","CC(N)C(=O)NCC(=O)O","Design","V9900009"]]), [["Helm","Molecule","Stage","V-iD"],["PEPTIDE1{A.G}$$$$V2.0","CC(N)C(=O)NCC(=O)O","Design","V9900009"]]);
|
|
27
|
+
await session.step(21, "And the Hit Design campaign \"BDD Cards\" with the stages \"Design, Make, Test\" and a table of:", () => hitDesignCampaign(page, "BDD Cards", "Design, Make, Test", [["Molecule","Stage","V-iD","MW"],["CCO","Design","V9900001","46.07"],["c1ccccc1","Make","V9900002","78.11"],["CCN","Design","V9900003","45.08"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Design","V9900001","46.07"],["c1ccccc1","Make","V9900002","78.11"],["CCN","Design","V9900003","45.08"]]);
|
|
28
|
+
await session.step(26, "And the card layout of the campaign \"BDD Cards\" was made over a table named \"Table\"", () => cardLayoutOver(page, "BDD Cards", "Table"));
|
|
29
|
+
await session.step(27, "When user opens the campaign \"BDD Cards Peptide\" by its link", () => openByLink(page, "BDD Cards Peptide"));
|
|
30
|
+
await session.step(28, "And user opens the campaign \"BDD Cards\" by its link", () => openByLink(page, "BDD Cards"));
|
|
31
|
+
await session.step(29, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
32
|
+
await session.step(30, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
33
|
+
await session.step(31, "And the 'tiles in lane \"Design\"' reading of \"Tile Viewer\" viewer should be 2", () => readingIs(page, "tiles in lane \"Design\"", el("\"Tile Viewer\" viewer"), 2));
|
|
34
|
+
await session.step(32, "And the \"V-iD of row 1\" reading of \"Tile Viewer\" viewer should be \"V9900001\"", () => readingReads(page, "V-iD of row 1", el("\"Tile Viewer\" viewer"), "V9900001"));
|
|
35
|
+
await session.step(33, "And the \"V-iD of row 3\" reading of \"Tile Viewer\" viewer should be \"V9900003\"", () => readingReads(page, "V-iD of row 3", el("\"Tile Viewer\" viewer"), "V9900003"));
|
|
36
|
+
await session.step(34, "And the \"lane of row 2\" reading of \"Tile Viewer\" viewer should be \"Make\"", () => readingReads(page, "lane of row 2", el("\"Tile Viewer\" viewer"), "Make"));
|
|
37
|
+
await session.step(35, "And the \"V-iD of row 2\" reading of \"Tile Viewer\" viewer should be \"V9900002\"", () => readingReads(page, "V-iD of row 2", el("\"Tile Viewer\" viewer"), "V9900002"));
|
|
38
|
+
});
|
|
39
|
+
test("A row in a stage the template does not have is shown in a lane of that stage", async ({browser}) => {
|
|
40
|
+
const page = await session.page(browser);
|
|
41
|
+
await session.step(15, "Given user is logged in", () => loggedIn(page));
|
|
42
|
+
await session.step(38, "Given the Hit Design campaign \"BDD Odd Stage\" with the stages \"Design, Make, Test\" and a table of:", () => hitDesignCampaign(page, "BDD Odd Stage", "Design, Make, Test", [["Molecule","Stage","V-iD","MW"],["CCO","Design","","46.07"],["c1ccccc1","Mkae","","78.11"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Design","","46.07"],["c1ccccc1","Mkae","","78.11"]]);
|
|
43
|
+
await session.step(42, "When user opens the campaign \"BDD Odd Stage\" by its link", () => openByLink(page, "BDD Odd Stage"));
|
|
44
|
+
await session.step(43, "And user clicks on \"Progress tracker\" button in toolbar", () => clickOn(page, el("\"Progress tracker\" button in toolbar")));
|
|
45
|
+
await session.step(44, "Then \"Progress Tracker\" dialog should be visible", () => shouldBe(page, el("\"Progress Tracker\" dialog"), "visible"));
|
|
46
|
+
await session.step(45, "And the \"lane names\" reading of \"Tile Viewer\" viewer should be \"Design, Make, Test, Mkae\"", () => readingReads(page, "lane names", el("\"Tile Viewer\" viewer"), "Design, Make, Test, Mkae"));
|
|
47
|
+
await session.step(46, "And the \"lane of row 2\" reading of \"Tile Viewer\" viewer should be \"Mkae\"", () => readingReads(page, "lane of row 2", el("\"Tile Viewer\" viewer"), "Mkae"));
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/campaign/view-only.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 {noLockHeld, openByLink, rememberUpdateLog, savedCell, savedVersion, updateLogAsRemembered, viewOnlyCampaign} from '../../bindings/campaign.js';
|
|
15
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
16
|
+
import {selectIn, shouldBe} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
17
|
+
import {valueInRow} from '@datagrok-libraries/bdd/bindings/platform/columns';
|
|
18
|
+
import {doubleClickArea, errorBalloonText} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
19
|
+
import {el, feature} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("A Hit Design campaign the user may only view", () => {
|
|
22
|
+
const session = feature(test, "features/campaign/view-only.feature", import.meta.url);
|
|
23
|
+
test("The campaign opens without the permissions icon, and an edit is refused and kept in the view", async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
await session.step(13, "Given user is logged in", () => loggedIn(page));
|
|
26
|
+
await session.step(14, "And the Hit Design campaign \"BDD View Only\", which only the sharing user may edit, with a table of:", () => viewOnlyCampaign(page, "BDD View Only", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"]]);
|
|
27
|
+
await session.step(17, "When user opens the campaign \"BDD View Only\" by its link", () => openByLink(page, "BDD View Only"));
|
|
28
|
+
await session.step(20, "Then \"Refresh\" icon in toolbar should be visible", () => shouldBe(page, el("\"Refresh\" icon in toolbar"), "visible"));
|
|
29
|
+
await session.step(21, "And \"Submit...\" button in toolbar should be visible", () => shouldBe(page, el("\"Submit...\" button in toolbar"), "visible"));
|
|
30
|
+
await session.step(22, "And \"Edit campaign permissions\" icon in toolbar should be absent", () => shouldBe(page, el("\"Edit campaign permissions\" icon in toolbar"), "absent"));
|
|
31
|
+
await session.step(23, "When user double-clicks on the \"cell 1 of Stage\" area of grid", () => doubleClickArea(page, "cell 1 of Stage", el("grid")));
|
|
32
|
+
await session.step(24, "And user selects \"Design\" in cell editor", () => selectIn(page, "Design", el("cell editor")));
|
|
33
|
+
await session.step(25, "Then an error balloon containing \"You do not have permission to modify this campaign\" should have been shown", () => errorBalloonText(page, "You do not have permission to modify this campaign"));
|
|
34
|
+
await session.step(26, "And the campaign \"BDD View Only\" should hold no lock on the server", () => noLockHeld(page, "BDD View Only"));
|
|
35
|
+
await session.step(27, "And the campaign \"BDD View Only\" should be at version 1 on the server", () => savedVersion(page, "BDD View Only", 1));
|
|
36
|
+
await session.step(28, "And the campaign \"BDD View Only\" should be saved with \"Idea\" in row 1 of the \"Stage\" column", () => savedCell(page, "BDD View Only", "Idea", 1, "Stage"));
|
|
37
|
+
await session.step(29, "And the value of \"Stage\" column in row 1 should be \"Design\"", () => valueInRow(page, "Stage", 1, "Design"));
|
|
38
|
+
});
|
|
39
|
+
test("A refused edit logs no update, so no session is told of new changes", async ({browser}) => {
|
|
40
|
+
const page = await session.page(browser);
|
|
41
|
+
await session.step(13, "Given user is logged in", () => loggedIn(page));
|
|
42
|
+
await session.step(14, "And the Hit Design campaign \"BDD View Only\", which only the sharing user may edit, with a table of:", () => viewOnlyCampaign(page, "BDD View Only", [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"]]), [["Molecule","Stage","V-iD","MW"],["CCO","Idea","","46.07"]]);
|
|
43
|
+
await session.step(17, "When user opens the campaign \"BDD View Only\" by its link", () => openByLink(page, "BDD View Only"));
|
|
44
|
+
await session.step(32, "When user remembers the update log of the campaign \"BDD View Only\"", () => rememberUpdateLog(page, "BDD View Only"));
|
|
45
|
+
await session.step(33, "And user double-clicks on the \"cell 1 of Stage\" area of grid", () => doubleClickArea(page, "cell 1 of Stage", el("grid")));
|
|
46
|
+
await session.step(34, "And user selects \"Design\" in cell editor", () => selectIn(page, "Design", el("cell editor")));
|
|
47
|
+
await session.step(35, "Then an error balloon containing \"You do not have permission to modify this campaign\" should have been shown", () => errorBalloonText(page, "You do not have permission to modify this campaign"));
|
|
48
|
+
await session.step(36, "And the campaign \"BDD View Only\" should hold no lock on the server", () => noLockHeld(page, "BDD View Only"));
|
|
49
|
+
await session.step(37, "And the update log of the campaign \"BDD View Only\" should be as remembered", () => updateLogAsRemembered(page, "BDD View Only"));
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -6,6 +6,7 @@ generated: features/hit-design/campaign-column-metadata.feature
|
|
|
6
6
|
generator: @datagrok-libraries/bdd — do not edit; run `grok-bdd compile` to regenerate
|
|
7
7
|
--- */
|
|
8
8
|
import {test} from '@playwright/test';
|
|
9
|
+
import '../../bindings/landing.js';
|
|
9
10
|
import '@datagrok-libraries/bdd/bindings/common/kinds';
|
|
10
11
|
import '@datagrok-libraries/bdd/bindings/common/parameter-types';
|
|
11
12
|
import '@datagrok-libraries/bdd/bindings/platform/datasets';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/campaign-deep-links.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, listed, notListed, settingsDefaults, sortedBy} from '../../bindings/landing.js';
|
|
14
|
+
import {loggedIn} from '@datagrok-libraries/bdd/bindings/common/session';
|
|
15
|
+
import {openAddress} from '@datagrok-libraries/bdd/bindings/platform/browse';
|
|
16
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
17
|
+
import {closeAllViews, currentViewShows, packageInstalled, urlShouldContain, urlShouldNotContain, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
18
|
+
import {errorBalloonText} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
19
|
+
import {feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("Campaign links: ?campaignId opens a campaign, and a link the user cannot follow lands on the landing", () => {
|
|
22
|
+
const session = feature(test, "features/landing/campaign-deep-links.feature", import.meta.url);
|
|
23
|
+
test("Campaign links: ?campaignId opens a campaign, and a link the user cannot follow lands on the landing", {tag: ["@journey", "@serial"]}, async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
const run = journey(test, 5, page);
|
|
26
|
+
await session.step(16, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(17, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
28
|
+
await session.step(18, "And the \"Hit Design\" campaigns are on the server:", () => campaignsOnServer(page, "Hit Design", [["code","name","created","author","can view","can edit","template"],[session.text("BDDDLK{time}-1"),session.text("BDD Link Open {time}"),"2099/1/13","me","everyone","everyone",""],[session.text("BDDDLK{time}-2"),session.text("BDD Link Hidden {time}"),"2099/1/12","sharing user","author","author",""],[session.text("BDDDLK{time}-3"),session.text("BDD Link Broken {time}"),"2099/1/11","me","everyone","everyone",session.text("gone: BDD Link Gone Template {time}")]]), [["code","name","created","author","can view","can edit","template"],[session.text("BDDDLK{time}-1"),session.text("BDD Link Open {time}"),"2099/1/13","me","everyone","everyone",""],[session.text("BDDDLK{time}-2"),session.text("BDD Link Hidden {time}"),"2099/1/12","sharing user","author","author",""],[session.text("BDDDLK{time}-3"),session.text("BDD Link Broken {time}"),"2099/1/11","me","everyone","everyone",session.text("gone: BDD Link Gone Template {time}")]]);
|
|
29
|
+
await session.step(23, "And the \"PeptiHit\" campaigns are on the server:", () => campaignsOnServer(page, "PeptiHit", [["code","name","created","author","can view","can edit"],[session.text("BDDDLP{time}-1"),session.text("BDD Link PH Hidden {time}"),"2099/1/12","sharing user","author","author"]]), [["code","name","created","author","can view","can edit"],[session.text("BDDDLP{time}-1"),session.text("BDD Link PH Hidden {time}"),"2099/1/12","sharing user","author","author"]]);
|
|
30
|
+
await session.step(26, "And the campaigns table of \"Hit Design\" is sorted by \"Created\" descending", () => sortedBy(page, "Hit Design", "Created", "descending"));
|
|
31
|
+
await run.scenario("A link with a campaign's code opens the campaign", async () => {
|
|
32
|
+
await session.step(29, "When user opens the address \"/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-1\"", () => openAddress(page, session.text("/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-1")));
|
|
33
|
+
await session.step(30, "Then the \"BDD Link Open {time}\" view should be current", () => viewIsCurrent(page, session.text("BDD Link Open {time}")));
|
|
34
|
+
await session.step(31, "And the page address should contain \"campaignId=BDDDLK{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDDLK{time}-1")));
|
|
35
|
+
await session.step(32, "And the table should have 1 row", () => rowCount(page, 1));
|
|
36
|
+
});
|
|
37
|
+
await run.scenario("A link to a campaign the user may not view lands on the landing and drops the code", async () => {
|
|
38
|
+
await session.step(35, "When user closes all views", () => closeAllViews(page));
|
|
39
|
+
await session.step(36, "And user opens the address \"/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-2\"", () => openAddress(page, session.text("/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-2")));
|
|
40
|
+
await session.step(37, "Then the \"Hit Design\" view should be current", () => viewIsCurrent(page, "Hit Design"));
|
|
41
|
+
await session.step(38, "And the campaigns table should list \"BDD Link Open {time}\"", () => listed(page, session.text("BDD Link Open {time}")));
|
|
42
|
+
await session.step(39, "And the campaigns table should not list \"BDD Link Hidden {time}\"", () => notListed(page, session.text("BDD Link Hidden {time}")));
|
|
43
|
+
await session.step(40, "And the page address should not contain \"campaignId\"", () => urlShouldNotContain(page, "campaignId"));
|
|
44
|
+
});
|
|
45
|
+
await run.scenario("A link with a code no campaign has lands on the landing", async () => {
|
|
46
|
+
await session.step(43, "When user closes all views", () => closeAllViews(page));
|
|
47
|
+
await session.step(44, "And user opens the address \"/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-99\"", () => openAddress(page, session.text("/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-99")));
|
|
48
|
+
await session.step(45, "Then the \"Hit Design\" view should be current", () => viewIsCurrent(page, "Hit Design"));
|
|
49
|
+
await session.step(46, "And the campaigns table should list \"BDD Link Open {time}\"", () => listed(page, session.text("BDD Link Open {time}")));
|
|
50
|
+
});
|
|
51
|
+
await run.scenario("A link to a campaign that cannot be opened still lands on a working landing", async () => {
|
|
52
|
+
await session.step(49, "When user closes all views", () => closeAllViews(page));
|
|
53
|
+
await session.step(50, "And user opens the address \"/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-3\"", () => openAddress(page, session.text("/apps/HitTriage/HitDesign?campaignId=BDDDLK{time}-3")));
|
|
54
|
+
await session.step(51, "Then the \"Hit Design\" view should be current", () => viewIsCurrent(page, "Hit Design"));
|
|
55
|
+
await session.step(52, "And the campaigns table should list \"BDD Link Open {time}\"", () => listed(page, session.text("BDD Link Open {time}")));
|
|
56
|
+
await session.step(53, "And an error balloon containing \"Campaign BDDDLK{time}-3 could not be opened\" should have been shown", () => errorBalloonText(page, session.text("Campaign BDDDLK{time}-3 could not be opened")));
|
|
57
|
+
});
|
|
58
|
+
await run.scenario("In PeptiHit, a link to a campaign the user may not view lands on its landing and drops the code", async () => {
|
|
59
|
+
await session.step(56, "Given the \"Bio\" package is installed", () => packageInstalled(page, "Bio"));
|
|
60
|
+
await session.step(57, "When user closes all views", () => closeAllViews(page));
|
|
61
|
+
await session.step(58, "And user opens the address \"/apps/HitTriage/PeptiHit?campaignId=BDDDLP{time}-1\"", () => openAddress(page, session.text("/apps/HitTriage/PeptiHit?campaignId=BDDDLP{time}-1")));
|
|
62
|
+
await session.step(59, "Then the \"PeptiHit\" view should be current", () => viewIsCurrent(page, "PeptiHit"));
|
|
63
|
+
await session.step(60, "And the current view should show the text \"Continue Campaign\"", () => currentViewShows(page, "Continue Campaign"));
|
|
64
|
+
await session.step(61, "And the page address should not contain \"campaignId\"", () => urlShouldNotContain(page, "campaignId"));
|
|
65
|
+
});
|
|
66
|
+
run.finish();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/hit-design-campaigns-fixes.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 {campaignsFromElsewhere, campaignsOnServer, cellContains, doubleClickHeader, groupCount, listed, listedInOrder, settingsDefaults, sortedBy, tableColumns, tableNotSorted, tableSorted} 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} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
17
|
+
import {closeContextMenu, pickFromOpenMenu} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
18
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
19
|
+
|
|
20
|
+
test.describe("Hit Design landing: the campaigns table lists every campaign (full list, order, groups, dates, refresh)", () => {
|
|
21
|
+
const session = feature(test, "features/landing/hit-design-campaigns-fixes.feature", import.meta.url);
|
|
22
|
+
test("Hit Design landing: the campaigns table lists every campaign (full list, order, groups, dates, refresh)", {tag: ["@journey", "@serial"]}, async ({browser}) => {
|
|
23
|
+
const page = await session.page(browser);
|
|
24
|
+
const run = journey(test, 7, page);
|
|
25
|
+
await session.step(19, "Given user is logged in", () => loggedIn(page));
|
|
26
|
+
await session.step(20, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
27
|
+
await session.step(21, "And the \"Hit Design\" campaigns are on the server:", () => campaignsOnServer(page, "Hit Design", [["code","name","status","created","modified","template","fields"],[session.text("BDDFIX{time}-1"),session.text("BDD Fixes 01 {time}"),session.text("BDD Many {time}"),"2099/3/10","20",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-2"),session.text("BDD Fixes 02 {time}"),session.text("BDD Many {time}"),"2099/3/11","19",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-3"),session.text("BDD Fixes 03 {time}"),session.text("BDD Many {time}"),"2099/3/12","18",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-4"),session.text("BDD Fixes 04 {time}"),session.text("BDD Many {time}"),"2099/3/13","17",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-5"),session.text("BDD Fixes 05 {time}"),session.text("BDD Many {time}"),"2099/3/14","16",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-6"),session.text("BDD Fixes 06 {time}"),session.text("BDD Many {time}"),"2099/3/15","15",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-7"),session.text("BDD Fixes 07 {time}"),session.text("BDD Many {time}"),"2099/3/16","14",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-8"),session.text("BDD Fixes 08 {time}"),session.text("BDD Many {time}"),"2099/3/17","13",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-9"),session.text("BDD Fixes 09 {time}"),session.text("BDD Many {time}"),"2099/3/18","12",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-10"),session.text("BDD Fixes 10 {time}"),session.text("BDD Many {time}"),"2099/3/19","11",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-11"),session.text("BDD Fixes 11 {time}"),session.text("BDD Many {time}"),"2099/3/20","10",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-12"),session.text("BDD Fixes 12 {time}"),session.text("BDD Many {time}"),"2099/3/21","9",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-13"),session.text("BDD Fixes 13 {time}"),session.text("BDD Many {time}"),"2099/3/22","8",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-14"),session.text("BDD Fixes 14 {time}"),session.text("BDD Many {time}"),"2099/3/23","7",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-15"),session.text("BDD Fixes 15 {time}"),session.text("BDD Many {time}"),"2099/3/24","6",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-16"),session.text("BDD Fixes 16 {time}"),session.text("BDD Many {time}"),"2099/3/25","5",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-17"),session.text("BDD Fixes 17 {time}"),session.text("BDD Many {time}"),"2099/3/26","4",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-18"),session.text("BDD Fixes 18 {time}"),session.text("BDD Many {time}"),"2099/3/27","3",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-19"),session.text("BDD Fixes 19 {time}"),session.text("BDD Many {time}"),"2099/3/28","2",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-20"),session.text("BDD Fixes 20 {time}"),session.text("BDD Many {time}"),"2099/3/29","1",session.text("BDD Fixes Template {time}"),"Due = date 2026-11-15"],[session.text("BDDFIX{time}-21"),session.text("BDD Fixes Rare {time}"),session.text("BDD Rare {time}"),"2099/1/10","30",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-22"),session.text("BDD Fixes Last {time}"),session.text("BDD Last {time}"),"2099/1/9","31",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-24"),session.text("BDD Fixes Legacy {time}"),session.text("BDD Legacy {time}"),"2099/1/8","32",session.text("gone: BDD Fixes Template {time}"),""]]), [["code","name","status","created","modified","template","fields"],[session.text("BDDFIX{time}-1"),session.text("BDD Fixes 01 {time}"),session.text("BDD Many {time}"),"2099/3/10","20",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-2"),session.text("BDD Fixes 02 {time}"),session.text("BDD Many {time}"),"2099/3/11","19",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-3"),session.text("BDD Fixes 03 {time}"),session.text("BDD Many {time}"),"2099/3/12","18",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-4"),session.text("BDD Fixes 04 {time}"),session.text("BDD Many {time}"),"2099/3/13","17",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-5"),session.text("BDD Fixes 05 {time}"),session.text("BDD Many {time}"),"2099/3/14","16",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-6"),session.text("BDD Fixes 06 {time}"),session.text("BDD Many {time}"),"2099/3/15","15",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-7"),session.text("BDD Fixes 07 {time}"),session.text("BDD Many {time}"),"2099/3/16","14",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-8"),session.text("BDD Fixes 08 {time}"),session.text("BDD Many {time}"),"2099/3/17","13",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-9"),session.text("BDD Fixes 09 {time}"),session.text("BDD Many {time}"),"2099/3/18","12",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-10"),session.text("BDD Fixes 10 {time}"),session.text("BDD Many {time}"),"2099/3/19","11",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-11"),session.text("BDD Fixes 11 {time}"),session.text("BDD Many {time}"),"2099/3/20","10",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-12"),session.text("BDD Fixes 12 {time}"),session.text("BDD Many {time}"),"2099/3/21","9",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-13"),session.text("BDD Fixes 13 {time}"),session.text("BDD Many {time}"),"2099/3/22","8",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-14"),session.text("BDD Fixes 14 {time}"),session.text("BDD Many {time}"),"2099/3/23","7",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-15"),session.text("BDD Fixes 15 {time}"),session.text("BDD Many {time}"),"2099/3/24","6",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-16"),session.text("BDD Fixes 16 {time}"),session.text("BDD Many {time}"),"2099/3/25","5",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-17"),session.text("BDD Fixes 17 {time}"),session.text("BDD Many {time}"),"2099/3/26","4",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-18"),session.text("BDD Fixes 18 {time}"),session.text("BDD Many {time}"),"2099/3/27","3",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-19"),session.text("BDD Fixes 19 {time}"),session.text("BDD Many {time}"),"2099/3/28","2",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-20"),session.text("BDD Fixes 20 {time}"),session.text("BDD Many {time}"),"2099/3/29","1",session.text("BDD Fixes Template {time}"),"Due = date 2026-11-15"],[session.text("BDDFIX{time}-21"),session.text("BDD Fixes Rare {time}"),session.text("BDD Rare {time}"),"2099/1/10","30",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-22"),session.text("BDD Fixes Last {time}"),session.text("BDD Last {time}"),"2099/1/9","31",session.text("BDD Fixes Template {time}"),""],[session.text("BDDFIX{time}-24"),session.text("BDD Fixes Legacy {time}"),session.text("BDD Legacy {time}"),"2099/1/8","32",session.text("gone: BDD Fixes Template {time}"),""]]);
|
|
28
|
+
await session.step(46, "And the campaigns table of \"Hit Design\" is sorted by \"Created\" descending", () => sortedBy(page, "Hit Design", "Created", "descending"));
|
|
29
|
+
await session.step(47, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
30
|
+
await run.scenario("Every campaign is listed, and stays listed after a sort change and a refresh", async () => {
|
|
31
|
+
await session.step(50, "Then the campaigns table should list \"BDD Fixes 20 {time}, BDD Fixes 01 {time}\"", () => listed(page, session.text("BDD Fixes 20 {time}, BDD Fixes 01 {time}")));
|
|
32
|
+
await session.step(51, "And the campaigns table should list \"BDD Fixes Rare {time}\"", () => listed(page, session.text("BDD Fixes Rare {time}")));
|
|
33
|
+
await session.step(52, "When user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
34
|
+
await session.step(53, "Then the campaigns table should not be sorted", () => tableNotSorted(page));
|
|
35
|
+
await session.step(54, "And the campaigns table should list \"BDD Fixes Rare {time}, BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes Rare {time}, BDD Fixes 20 {time}")));
|
|
36
|
+
await session.step(55, "When user clicks on campaigns refresh icon", () => clickOn(page, el("campaigns refresh icon")));
|
|
37
|
+
await session.step(56, "Then the campaigns table should list \"BDD Fixes Rare {time}, BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes Rare {time}, BDD Fixes 20 {time}")));
|
|
38
|
+
await session.step(57, "When user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
39
|
+
await session.step(58, "And user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
40
|
+
await session.step(59, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
41
|
+
});
|
|
42
|
+
await run.scenario("Grouping covers every campaign, not only the rows shown first", async () => {
|
|
43
|
+
await session.step(62, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
44
|
+
await session.step(63, "And user picks \"Status\" from the open menu", () => pickFromOpenMenu(page, "Status"));
|
|
45
|
+
await session.step(64, "Then \"BDD Many {time}\" campaign group should be present", () => shouldBe(page, el(session.text("\"BDD Many {time}\" campaign group")), "present"));
|
|
46
|
+
await session.step(65, "And the campaigns table should list \"BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes 20 {time}")));
|
|
47
|
+
await session.step(66, "And \"BDD Last {time}\" campaign group should be present", () => shouldBe(page, el(session.text("\"BDD Last {time}\" campaign group")), "present"));
|
|
48
|
+
await session.step(67, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
49
|
+
await session.step(68, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
50
|
+
await session.step(69, "Then the campaigns table should list \"BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes 20 {time}")));
|
|
51
|
+
});
|
|
52
|
+
await run.scenario("Groups start expanded and show how many campaigns they hold", async () => {
|
|
53
|
+
await session.step(72, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
54
|
+
await session.step(73, "And user picks \"Status\" from the open menu", () => pickFromOpenMenu(page, "Status"));
|
|
55
|
+
await session.step(74, "Then \"BDD Many {time}\" campaign group should be present", () => shouldBe(page, el(session.text("\"BDD Many {time}\" campaign group")), "present"));
|
|
56
|
+
await session.step(75, "And \"BDD Many {time}\" campaign group should be expanded", () => shouldBe(page, el(session.text("\"BDD Many {time}\" campaign group")), "expanded"));
|
|
57
|
+
await session.step(76, "And \"BDD Fixes 20 {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Fixes 20 {time}\" campaign row")), "visible"));
|
|
58
|
+
await session.step(77, "And the \"BDD Many {time}\" campaign group should count 20 campaigns", () => groupCount(page, session.text("BDD Many {time}"), 20));
|
|
59
|
+
await session.step(78, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
60
|
+
await session.step(79, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
61
|
+
await session.step(80, "Then the campaigns table should list \"BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes 20 {time}")));
|
|
62
|
+
});
|
|
63
|
+
await run.scenario("A Template group is labelled by the template's name, and holds its campaigns saved without a snapshot too", async () => {
|
|
64
|
+
await session.step(83, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
65
|
+
await session.step(84, "And user picks \"Template\" from the open menu", () => pickFromOpenMenu(page, "Template"));
|
|
66
|
+
await session.step(85, "Then \"BDD Fixes Template {time}\" campaign group should be present", () => shouldBe(page, el(session.text("\"BDD Fixes Template {time}\" campaign group")), "present"));
|
|
67
|
+
await session.step(86, "And the \"BDD Fixes Template {time}\" campaign group should count 23 campaigns", () => groupCount(page, session.text("BDD Fixes Template {time}"), 23));
|
|
68
|
+
await session.step(87, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
69
|
+
await session.step(88, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
70
|
+
await session.step(89, "Then the campaigns table should list \"BDD Fixes 20 {time}\"", () => listed(page, session.text("BDD Fixes 20 {time}")));
|
|
71
|
+
});
|
|
72
|
+
await run.scenario("A Date campaign field shows its date", async () => {
|
|
73
|
+
await session.step(92, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
74
|
+
await session.step(93, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
75
|
+
await session.step(94, "And user clicks on campaign columns icon", () => clickOn(page, el("campaign columns icon")));
|
|
76
|
+
await session.step(95, "And user picks \"Campaign Fields > Due\" from the open menu", () => pickFromOpenMenu(page, "Campaign Fields > Due"));
|
|
77
|
+
await session.step(96, "Then the campaigns table should have the columns \"Name, Code, Created, Author, Last Modified by, Molecules, Status, Due\"", () => tableColumns(page, "Name, Code, Created, Author, Last Modified by, Molecules, Status, Due"));
|
|
78
|
+
await session.step(97, "And the \"Due\" column of the \"BDD Fixes 20 {time}\" campaign row should contain \"2026\"", () => cellContains(page, "Due", session.text("BDD Fixes 20 {time}"), "2026"));
|
|
79
|
+
await session.step(98, "When user picks \"Campaign Fields > Due\" from the open menu", () => pickFromOpenMenu(page, "Campaign Fields > Due"));
|
|
80
|
+
await session.step(99, "And user closes the context menu", () => closeContextMenu(page));
|
|
81
|
+
await session.step(100, "Then 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"));
|
|
82
|
+
});
|
|
83
|
+
await run.scenario("Refresh shows a campaign saved elsewhere after the landing opened", async () => {
|
|
84
|
+
await session.step(103, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
85
|
+
await session.step(104, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
86
|
+
await session.step(105, "And the \"Hit Design\" campaigns are saved on the server from elsewhere:", () => campaignsFromElsewhere(page, "Hit Design", [["code","name","status","created","modified","template"],[session.text("BDDFIX{time}-23"),session.text("BDD Fixes Late {time}"),session.text("BDD Many {time}"),"2099/4/10","0",session.text("BDD Fixes Template {time}")]]), [["code","name","status","created","modified","template"],[session.text("BDDFIX{time}-23"),session.text("BDD Fixes Late {time}"),session.text("BDD Many {time}"),"2099/4/10","0",session.text("BDD Fixes Template {time}")]]);
|
|
87
|
+
await session.step(108, "And user clicks on campaigns refresh icon", () => clickOn(page, el("campaigns refresh icon")));
|
|
88
|
+
await session.step(109, "Then the campaigns table should list \"BDD Fixes Late {time}\"", () => listed(page, session.text("BDD Fixes Late {time}")));
|
|
89
|
+
});
|
|
90
|
+
await run.scenario("With no sort chosen, the most recently modified campaigns come first", async () => {
|
|
91
|
+
await session.step(112, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
92
|
+
await session.step(113, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
93
|
+
await session.step(114, "And user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
94
|
+
await session.step(115, "Then the campaigns table should not be sorted", () => tableNotSorted(page));
|
|
95
|
+
await session.step(116, "And the campaigns table should list \"BDD Fixes 20 {time}, BDD Fixes 19 {time}, BDD Fixes 18 {time}, BDD Fixes 17 {time}, BDD Fixes 16 {time}\" in this order", () => listedInOrder(page, session.text("BDD Fixes 20 {time}, BDD Fixes 19 {time}, BDD Fixes 18 {time}, BDD Fixes 17 {time}, BDD Fixes 16 {time}")));
|
|
96
|
+
});
|
|
97
|
+
run.finish();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable comma-spacing */
|
|
3
|
+
/* eslint-disable quotes */
|
|
4
|
+
/* ---
|
|
5
|
+
generated: features/landing/hit-design-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, listedInOrder, 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, shouldNotContainText} from '@datagrok-libraries/bdd/bindings/common/steps';
|
|
16
|
+
import {rowCount} from '@datagrok-libraries/bdd/bindings/platform/data';
|
|
17
|
+
import {closeAllViews, currentViewShows, dialogCloses, openApp, urlShouldContain, urlShouldNotContain, viewIsCurrent} from '@datagrok-libraries/bdd/bindings/platform/steps';
|
|
18
|
+
import {closeContextMenu, menuDoesNotList, menuLists, noBalloons, pickFromOpenMenu} from '@datagrok-libraries/bdd/bindings/tiers/viewers/steps';
|
|
19
|
+
import {el, feature, journey} from '@datagrok-libraries/bdd/runtime';
|
|
20
|
+
|
|
21
|
+
test.describe("Hit Design landing: the campaigns table lists, opens, sorts, groups and acts on campaigns", () => {
|
|
22
|
+
const session = feature(test, "features/landing/hit-design-campaigns.feature", import.meta.url);
|
|
23
|
+
test("Hit Design landing: the campaigns table lists, opens, sorts, groups and acts on campaigns", {tag: ["@journey", "@serial"]}, async ({browser}) => {
|
|
24
|
+
const page = await session.page(browser);
|
|
25
|
+
const run = journey(test, 12, page);
|
|
26
|
+
await session.step(17, "Given user is logged in", () => loggedIn(page));
|
|
27
|
+
await session.step(18, "And the campaigns tables start from their defaults, put back at feature end", () => settingsDefaults(page));
|
|
28
|
+
await session.step(19, "And the \"Hit Design\" campaigns are on the server:", () => campaignsOnServer(page, "Hit Design", [["code","name","status","created","molecules","author","can edit","fields"],[session.text("BDDLND{time}-1"),session.text("BDD Landing Alpha {time}"),session.text("BDD Ready {time}"),"2099/1/14","3","me","everyone",session.text("Owner = Ann {time}")],[session.text("BDDLND{time}-2"),session.text("BDD Landing Beta {time}"),session.text("BDD Hold {time}"),"2099/1/13","7","me","everyone",session.text("Owner = Bob {time}")],[session.text("BDDLND{time}-3"),session.text("BDD Landing Gamma {time}"),session.text("BDD Ready {time}"),"2099/1/12","5","sharing user","author",session.text("Owner = Ann {time}")],[session.text("BDDLND{time}-4"),session.text("BDD Landing Delta {time}"),session.text("BDD Hold {time}"),"2099/1/11","2","me","everyone",""]]), [["code","name","status","created","molecules","author","can edit","fields"],[session.text("BDDLND{time}-1"),session.text("BDD Landing Alpha {time}"),session.text("BDD Ready {time}"),"2099/1/14","3","me","everyone",session.text("Owner = Ann {time}")],[session.text("BDDLND{time}-2"),session.text("BDD Landing Beta {time}"),session.text("BDD Hold {time}"),"2099/1/13","7","me","everyone",session.text("Owner = Bob {time}")],[session.text("BDDLND{time}-3"),session.text("BDD Landing Gamma {time}"),session.text("BDD Ready {time}"),"2099/1/12","5","sharing user","author",session.text("Owner = Ann {time}")],[session.text("BDDLND{time}-4"),session.text("BDD Landing Delta {time}"),session.text("BDD Hold {time}"),"2099/1/11","2","me","everyone",""]]);
|
|
29
|
+
await session.step(25, "And the campaigns table of \"Hit Design\" is sorted by \"Created\" descending", () => sortedBy(page, "Hit Design", "Created", "descending"));
|
|
30
|
+
await session.step(26, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
31
|
+
await run.scenario("The table lists the campaigns with the default columns, each name a link", async () => {
|
|
32
|
+
await session.step(29, "Then the current view should show the text \"Continue Campaign\"", () => currentViewShows(page, "Continue Campaign"));
|
|
33
|
+
await session.step(30, "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"));
|
|
34
|
+
await session.step(31, "And the \"Code\" column of the \"BDD Landing Alpha {time}\" campaign row should be \"BDDLND{time}-1\"", () => cellIs(page, "Code", session.text("BDD Landing Alpha {time}"), session.text("BDDLND{time}-1")));
|
|
35
|
+
await session.step(32, "And the \"Created\" column of the \"BDD Landing Alpha {time}\" campaign row should be \"2099/1/14\"", () => cellIs(page, "Created", session.text("BDD Landing Alpha {time}"), "2099/1/14"));
|
|
36
|
+
await session.step(33, "And the \"Molecules\" column of the \"BDD Landing Beta {time}\" campaign row should be \"7\"", () => cellIs(page, "Molecules", session.text("BDD Landing Beta {time}"), "7"));
|
|
37
|
+
await session.step(34, "And the \"Status\" column of the \"BDD Landing Gamma {time}\" campaign row should be \"BDD Ready {time}\"", () => cellIs(page, "Status", session.text("BDD Landing Gamma {time}"), session.text("BDD Ready {time}")));
|
|
38
|
+
await session.step(35, "And name link of \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("name link of \"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
39
|
+
});
|
|
40
|
+
await run.scenario("A campaign's name opens it with its code in the address, and the crumb comes back", async () => {
|
|
41
|
+
await session.step(38, "When user clicks on \"BDD Landing Alpha {time}\" link", () => clickOn(page, el(session.text("\"BDD Landing Alpha {time}\" link"))));
|
|
42
|
+
await session.step(39, "Then the \"BDD Landing Alpha {time}\" view should be current", () => viewIsCurrent(page, session.text("BDD Landing Alpha {time}")));
|
|
43
|
+
await session.step(40, "And the page address should contain \"campaignId=BDDLND{time}-1\"", () => urlShouldContain(page, session.text("campaignId=BDDLND{time}-1")));
|
|
44
|
+
await session.step(41, "And the table should have 3 rows", () => rowCount(page, 3));
|
|
45
|
+
await session.step(42, "When user clicks on \"Hit Design\" link", () => clickOn(page, el("\"Hit Design\" link")));
|
|
46
|
+
await session.step(43, "Then the \"Hit Design\" view should be current", () => viewIsCurrent(page, "Hit Design"));
|
|
47
|
+
await session.step(44, "And the page address should not contain \"campaignId\"", () => urlShouldNotContain(page, "campaignId"));
|
|
48
|
+
await session.step(45, "And \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
49
|
+
});
|
|
50
|
+
await run.scenario("The eye menu shows and hides columns, a column comes back at the end, and the choice outlives a reopen", async () => {
|
|
51
|
+
await session.step(48, "When user clicks on campaign columns icon", () => clickOn(page, el("campaign columns icon")));
|
|
52
|
+
await session.step(49, "Then the open menu should show \"Code\" as checked", () => menuItemChecked(page, "Code", "checked"));
|
|
53
|
+
await session.step(50, "And the open menu should show \"Status\" as checked", () => menuItemChecked(page, "Status", "checked"));
|
|
54
|
+
await session.step(51, "And the open menu should list \"Campaign Fields > Owner\"", () => menuLists(page, "Campaign Fields > Owner"));
|
|
55
|
+
await session.step(52, "When user picks \"Code\" from the open menu", () => pickFromOpenMenu(page, "Code"));
|
|
56
|
+
await session.step(53, "Then the campaigns table should have the columns \"Name, Created, Author, Last Modified by, Molecules, Status\"", () => tableColumns(page, "Name, Created, Author, Last Modified by, Molecules, Status"));
|
|
57
|
+
await session.step(54, "When user closes the context menu", () => closeContextMenu(page));
|
|
58
|
+
await session.step(55, "And user closes all views", () => closeAllViews(page));
|
|
59
|
+
await session.step(56, "And user opens the \"Hit Design\" app", () => openApp(page, "Hit Design"));
|
|
60
|
+
await session.step(57, "Then the campaigns table should have the columns \"Name, Created, Author, Last Modified by, Molecules, Status\"", () => tableColumns(page, "Name, Created, Author, Last Modified by, Molecules, Status"));
|
|
61
|
+
await session.step(58, "When user clicks on campaign columns icon", () => clickOn(page, el("campaign columns icon")));
|
|
62
|
+
await session.step(59, "Then the open menu should show \"Code\" as unchecked", () => menuItemChecked(page, "Code", "unchecked"));
|
|
63
|
+
await session.step(60, "When user picks \"Code\" from the open menu", () => pickFromOpenMenu(page, "Code"));
|
|
64
|
+
await session.step(61, "Then the campaigns table should have the columns \"Name, Created, Author, Last Modified by, Molecules, Status, Code\"", () => tableColumns(page, "Name, Created, Author, Last Modified by, Molecules, Status, Code"));
|
|
65
|
+
await session.step(62, "When user picks \"Campaign Fields > Owner\" from the open menu", () => pickFromOpenMenu(page, "Campaign Fields > Owner"));
|
|
66
|
+
await session.step(63, "Then the campaigns table should have the columns \"Name, Created, Author, Last Modified by, Molecules, Status, Code, Owner\"", () => tableColumns(page, "Name, Created, Author, Last Modified by, Molecules, Status, Code, Owner"));
|
|
67
|
+
await session.step(64, "And the \"Owner\" column of the \"BDD Landing Alpha {time}\" campaign row should be \"Ann {time}\"", () => cellIs(page, "Owner", session.text("BDD Landing Alpha {time}"), session.text("Ann {time}")));
|
|
68
|
+
await session.step(65, "And the \"Owner\" column of the \"BDD Landing Delta {time}\" campaign row should be \"\"", () => cellIs(page, "Owner", session.text("BDD Landing Delta {time}"), ""));
|
|
69
|
+
await session.step(66, "When user picks \"Campaign Fields > Owner\" from the open menu", () => pickFromOpenMenu(page, "Campaign Fields > Owner"));
|
|
70
|
+
await session.step(67, "Then the campaigns table should have the columns \"Name, Created, Author, Last Modified by, Molecules, Status, Code\"", () => tableColumns(page, "Name, Created, Author, Last Modified by, Molecules, Status, Code"));
|
|
71
|
+
await session.step(68, "When user closes the context menu", () => closeContextMenu(page));
|
|
72
|
+
});
|
|
73
|
+
await run.scenario("A double click on a header sorts up, then down, then not at all", async () => {
|
|
74
|
+
await session.step(71, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
75
|
+
await session.step(72, "And the campaigns table should list \"BDD Landing Alpha {time}, BDD Landing Beta {time}, BDD Landing Gamma {time}, BDD Landing Delta {time}\" in this order", () => listedInOrder(page, session.text("BDD Landing Alpha {time}, BDD Landing Beta {time}, BDD Landing Gamma {time}, BDD Landing Delta {time}")));
|
|
76
|
+
await session.step(73, "When user double-clicks the \"Molecules\" header of the campaigns table", () => doubleClickHeader(page, "Molecules"));
|
|
77
|
+
await session.step(74, "Then the campaigns table should be sorted by \"Molecules\" ascending", () => tableSorted(page, "Molecules", "ascending"));
|
|
78
|
+
await session.step(75, "When user double-clicks the \"Molecules\" header of the campaigns table", () => doubleClickHeader(page, "Molecules"));
|
|
79
|
+
await session.step(76, "Then the campaigns table should be sorted by \"Molecules\" descending", () => tableSorted(page, "Molecules", "descending"));
|
|
80
|
+
await session.step(77, "When user double-clicks the \"Molecules\" header of the campaigns table", () => doubleClickHeader(page, "Molecules"));
|
|
81
|
+
await session.step(78, "Then the campaigns table should not be sorted", () => tableNotSorted(page));
|
|
82
|
+
await session.step(79, "When user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
83
|
+
await session.step(80, "Then the campaigns table should be sorted by \"Created\" ascending", () => tableSorted(page, "Created", "ascending"));
|
|
84
|
+
await session.step(81, "When user double-clicks the \"Created\" header of the campaigns table", () => doubleClickHeader(page, "Created"));
|
|
85
|
+
await session.step(82, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
86
|
+
});
|
|
87
|
+
await run.scenario("Grouping by Status puts a header over each status's rows, which expands and collapses them", async () => {
|
|
88
|
+
await session.step(85, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
89
|
+
await session.step(86, "And user picks \"Status\" from the open menu", () => pickFromOpenMenu(page, "Status"));
|
|
90
|
+
await session.step(87, "Then \"BDD Ready {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Ready {time}\" campaign group")), "visible"));
|
|
91
|
+
await session.step(88, "And \"BDD Hold {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"BDD Hold {time}\" campaign group")), "visible"));
|
|
92
|
+
await session.step(89, "When user expands \"BDD Ready {time}\" campaign group", () => expand(page, el(session.text("\"BDD Ready {time}\" campaign group"))));
|
|
93
|
+
await session.step(90, "Then \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
94
|
+
await session.step(91, "And \"BDD Landing Gamma {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Gamma {time}\" campaign row")), "visible"));
|
|
95
|
+
await session.step(92, "When user collapses \"BDD Ready {time}\" campaign group", () => collapse(page, el(session.text("\"BDD Ready {time}\" campaign group"))));
|
|
96
|
+
await session.step(93, "Then \"BDD Landing Alpha {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "hidden"));
|
|
97
|
+
await session.step(94, "And \"BDD Landing Gamma {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("\"BDD Landing Gamma {time}\" campaign row")), "hidden"));
|
|
98
|
+
});
|
|
99
|
+
await run.scenario("Grouping by a campaign field, with \"No Information\" for campaigns without it, then back to none", async () => {
|
|
100
|
+
await session.step(97, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
101
|
+
await session.step(98, "And user picks \"Campaign Fields > Owner\" from the open menu", () => pickFromOpenMenu(page, "Campaign Fields > Owner"));
|
|
102
|
+
await session.step(99, "Then \"Ann {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"Ann {time}\" campaign group")), "visible"));
|
|
103
|
+
await session.step(100, "And \"Bob {time}\" campaign group should be visible", () => shouldBe(page, el(session.text("\"Bob {time}\" campaign group")), "visible"));
|
|
104
|
+
await session.step(101, "And \"No Information\" campaign group should be visible", () => shouldBe(page, el("\"No Information\" campaign group"), "visible"));
|
|
105
|
+
await session.step(102, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
106
|
+
await session.step(103, "And user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
107
|
+
await session.step(104, "Then \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
108
|
+
await session.step(105, "And \"Ann {time}\" campaign group should be absent", () => shouldBe(page, el(session.text("\"Ann {time}\" campaign group")), "absent"));
|
|
109
|
+
});
|
|
110
|
+
await run.scenario("The grouping menu offers a grouping under the caption of its column: Last Modified by", async () => {
|
|
111
|
+
await session.step(108, "When user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
112
|
+
await session.step(109, "Then the open menu should list \"Last Modified by\"", () => menuLists(page, "Last Modified by"));
|
|
113
|
+
await session.step(110, "And the open menu should not list \"Last Modified User\"", () => menuDoesNotList(page, "Last Modified User"));
|
|
114
|
+
await session.step(111, "When user picks \"Last Modified by\" from the open menu", () => pickFromOpenMenu(page, "Last Modified by"));
|
|
115
|
+
await session.step(112, "And user clicks on campaign grouping icon", () => clickOn(page, el("campaign grouping icon")));
|
|
116
|
+
await session.step(113, "Then the open menu should show \"Last Modified by\" as checked", () => menuItemChecked(page, "Last Modified by", "checked"));
|
|
117
|
+
await session.step(114, "When user picks \"None\" from the open menu", () => pickFromOpenMenu(page, "None"));
|
|
118
|
+
await session.step(115, "Then \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
119
|
+
});
|
|
120
|
+
await run.scenario("Only the campaigns the user may edit show the permissions and delete icons", async () => {
|
|
121
|
+
await session.step(118, "Then permissions icon of \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("permissions icon of \"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
122
|
+
await session.step(119, "And delete icon of \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("delete icon of \"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
123
|
+
await session.step(120, "And permissions icon of \"BDD Landing Gamma {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("permissions icon of \"BDD Landing Gamma {time}\" campaign row")), "hidden"));
|
|
124
|
+
await session.step(121, "And delete icon of \"BDD Landing Gamma {time}\" campaign row should be hidden", () => shouldBe(page, el(session.text("delete icon of \"BDD Landing Gamma {time}\" campaign row")), "hidden"));
|
|
125
|
+
});
|
|
126
|
+
await run.scenario("The permissions icon opens Edit Permissions with Can View and Can Edit, and CANCEL closes it", async () => {
|
|
127
|
+
await session.step(124, "When user clicks on permissions icon of \"BDD Landing Alpha {time}\" campaign row", () => clickOn(page, el(session.text("permissions icon of \"BDD Landing Alpha {time}\" campaign row"))));
|
|
128
|
+
await session.step(125, "Then \"Edit Permissions\" dialog should be visible", () => shouldBe(page, el("\"Edit Permissions\" dialog"), "visible"));
|
|
129
|
+
await session.step(126, "And \"Edit Permissions\" dialog should contain text \"Can View\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "Can View"));
|
|
130
|
+
await session.step(127, "And \"Edit Permissions\" dialog should contain text \"Can Edit\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "Can Edit"));
|
|
131
|
+
await session.step(128, "When user clicks on CANCEL button in \"Edit Permissions\" dialog", () => clickOn(page, el("CANCEL button in \"Edit Permissions\" dialog")));
|
|
132
|
+
await session.step(129, "Then the \"Edit Permissions\" dialog should close", () => dialogCloses(page, "Edit Permissions"));
|
|
133
|
+
});
|
|
134
|
+
await run.scenario("Edit Permissions says all users can view only while no one is listed", async () => {
|
|
135
|
+
await session.step(132, "When user clicks on permissions icon of \"BDD Landing Alpha {time}\" campaign row", () => clickOn(page, el(session.text("permissions icon of \"BDD Landing Alpha {time}\" campaign row"))));
|
|
136
|
+
await session.step(133, "Then \"Edit Permissions\" dialog should contain text \"Can Edit includes Can View\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "Can Edit includes Can View"));
|
|
137
|
+
await session.step(134, "And \"Edit Permissions\" dialog should not contain text \"With no one listed\"", () => shouldNotContainText(page, el("\"Edit Permissions\" dialog"), "With no one listed"));
|
|
138
|
+
await session.step(135, "When user clicks on \"Remove All users\" button in \"Edit Permissions\" dialog", () => clickOn(page, el("\"Remove All users\" button in \"Edit Permissions\" dialog")));
|
|
139
|
+
await session.step(136, "Then \"Edit Permissions\" dialog should contain text \"With no one listed, all users can view\"", () => shouldContainText(page, el("\"Edit Permissions\" dialog"), "With no one listed, all users can view"));
|
|
140
|
+
await session.step(137, "When user clicks on CANCEL button in \"Edit Permissions\" dialog", () => clickOn(page, el("CANCEL button in \"Edit Permissions\" dialog")));
|
|
141
|
+
await session.step(138, "Then the \"Edit Permissions\" dialog should close", () => dialogCloses(page, "Edit Permissions"));
|
|
142
|
+
});
|
|
143
|
+
await run.scenario("Delete asks for a confirmation naming the code, and confirming it removes the campaign", async () => {
|
|
144
|
+
await session.step(141, "When user clicks on delete icon of \"BDD Landing Delta {time}\" campaign row", () => clickOn(page, el(session.text("delete icon of \"BDD Landing Delta {time}\" campaign row"))));
|
|
145
|
+
await session.step(142, "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"));
|
|
146
|
+
await session.step(143, "And \"Delete campaign\" dialog should contain text \"BDDLND{time}-4\"", () => shouldContainText(page, el("\"Delete campaign\" dialog"), session.text("BDDLND{time}-4")));
|
|
147
|
+
await session.step(144, "When user confirms the \"Delete campaign\" dialog", () => confirmDialog(page, el("the \"Delete campaign\" dialog")));
|
|
148
|
+
await session.step(145, "Then the \"Hit Design\" campaign \"BDDLND{time}-4\" should not be on the server", () => campaignNotOnServer(page, "Hit Design", session.text("BDDLND{time}-4")));
|
|
149
|
+
await session.step(146, "And \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
150
|
+
await session.step(147, "And \"BDD Landing Delta {time}\" campaign row should be absent", () => shouldBe(page, el(session.text("\"BDD Landing Delta {time}\" campaign row")), "absent"));
|
|
151
|
+
});
|
|
152
|
+
await run.scenario("The refresh icon rebuilds the table in the order it had", async () => {
|
|
153
|
+
await session.step(150, "When user clicks on campaigns refresh icon", () => clickOn(page, el("campaigns refresh icon")));
|
|
154
|
+
await session.step(151, "Then the campaigns table should be sorted by \"Created\" descending", () => tableSorted(page, "Created", "descending"));
|
|
155
|
+
await session.step(152, "And \"BDD Landing Alpha {time}\" campaign row should be visible", () => shouldBe(page, el(session.text("\"BDD Landing Alpha {time}\" campaign row")), "visible"));
|
|
156
|
+
await session.step(153, "And no error or warning balloon should have been shown", () => noBalloons(page));
|
|
157
|
+
});
|
|
158
|
+
run.finish();
|
|
159
|
+
});
|
|
160
|
+
});
|