@datagrok/hit-triage 1.10.8 → 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.
Files changed (129) hide show
  1. package/.grokignore +2 -0
  2. package/.turbo/turbo-build.log +24 -6
  3. package/.vscode/settings.json +16 -0
  4. package/CHANGELOG.md +80 -1
  5. package/CLAUDE.md +87 -10
  6. package/README_HD.md +14 -14
  7. package/README_HT.md +6 -6
  8. package/README_PH.md +110 -0
  9. package/bdd/bdd.config.json +3 -0
  10. package/bdd/bindings/campaign.ts +626 -0
  11. package/bdd/bindings/hit-design.ts +93 -0
  12. package/bdd/bindings/landing.ts +839 -0
  13. package/bdd/bindings/pepti-hit.ts +35 -0
  14. package/bdd/features/campaign/crumbs.feature +22 -0
  15. package/bdd/features/campaign/grid.feature +56 -0
  16. package/bdd/features/campaign/merge.feature +105 -0
  17. package/bdd/features/campaign/molecule-vid.feature +40 -0
  18. package/bdd/features/campaign/permissions.feature +46 -0
  19. package/bdd/features/campaign/progress-tracker.feature +89 -0
  20. package/bdd/features/campaign/refresh-hint.feature +33 -0
  21. package/bdd/features/campaign/ribbon.feature +49 -0
  22. package/bdd/features/campaign/stage-choices.feature +39 -0
  23. package/bdd/features/campaign/submit.feature +135 -0
  24. package/bdd/features/campaign/tracker-cards.feature +46 -0
  25. package/bdd/features/campaign/view-only.feature +37 -0
  26. package/bdd/features/hit-design/campaign-column-metadata.feature +61 -0
  27. package/bdd/features/landing/campaign-deep-links.feature +61 -0
  28. package/bdd/features/landing/hit-design-campaigns-fixes.feature +116 -0
  29. package/bdd/features/landing/hit-design-campaigns.feature +153 -0
  30. package/bdd/features/landing/hit-triage-campaigns.feature +99 -0
  31. package/bdd/features/landing/new-campaign.feature +69 -0
  32. package/bdd/features/landing/pep-triage-campaigns.feature +41 -0
  33. package/bdd/features/landing/pepti-hit-landing.feature +132 -0
  34. package/bdd/features/pepti-hit/helm-edit.feature +47 -0
  35. package/bdd/features/templates/template-editor.feature +130 -0
  36. package/bdd/features/templates/template-picker.feature +112 -0
  37. package/bdd/features/templates/triage-forms.feature +59 -0
  38. package/bdd/fixtures/bar-chart.layout +1 -0
  39. package/bdd/fixtures/merge-local.csv +2 -0
  40. package/bdd/generated/campaign/crumbs.test.ts +33 -0
  41. package/bdd/generated/campaign/grid.test.ts +79 -0
  42. package/bdd/generated/campaign/merge.test.ts +134 -0
  43. package/bdd/generated/campaign/molecule-vid.test.ts +52 -0
  44. package/bdd/generated/campaign/permissions.test.ts +58 -0
  45. package/bdd/generated/campaign/progress-tracker.test.ts +129 -0
  46. package/bdd/generated/campaign/refresh-hint.test.ts +44 -0
  47. package/bdd/generated/campaign/ribbon.test.ts +65 -0
  48. package/bdd/generated/campaign/stage-choices.test.ts +55 -0
  49. package/bdd/generated/campaign/submit.test.ts +167 -0
  50. package/bdd/generated/campaign/tracker-cards.test.ts +49 -0
  51. package/bdd/generated/campaign/view-only.test.ts +51 -0
  52. package/bdd/generated/hit-design/campaign-column-metadata.test.ts +76 -0
  53. package/bdd/generated/landing/campaign-deep-links.test.ts +68 -0
  54. package/bdd/generated/landing/hit-design-campaigns-fixes.test.ts +99 -0
  55. package/bdd/generated/landing/hit-design-campaigns.test.ts +160 -0
  56. package/bdd/generated/landing/hit-triage-campaigns.test.ts +107 -0
  57. package/bdd/generated/landing/new-campaign.test.ts +78 -0
  58. package/bdd/generated/landing/pep-triage-campaigns.test.ts +52 -0
  59. package/bdd/generated/landing/pepti-hit-landing.test.ts +130 -0
  60. package/bdd/generated/pepti-hit/helm-edit.test.ts +64 -0
  61. package/bdd/generated/templates/template-editor.test.ts +137 -0
  62. package/bdd/generated/templates/template-picker.test.ts +119 -0
  63. package/bdd/generated/templates/triage-forms.test.ts +68 -0
  64. package/bdd/package.json +1 -0
  65. package/bdd/tsconfig.json +13 -0
  66. package/css/hit-triage.css +27 -23
  67. package/dist/package-test.js +690 -4
  68. package/dist/package-test.js.map +1 -1
  69. package/dist/package.js +318 -73
  70. package/dist/package.js.map +1 -1
  71. package/package.json +15 -8
  72. package/queries/locks.sql +37 -0
  73. package/src/app/accordeons/layout-input.ts +52 -44
  74. package/src/app/accordeons/new-campaign-accordeon.ts +91 -54
  75. package/src/app/accordeons/new-hit-design-campaign-accordeon.ts +3 -67
  76. package/src/app/accordeons/new-pep-triage-template-accordeon.ts +39 -41
  77. package/src/app/accordeons/new-template-accordeon.ts +41 -24
  78. package/src/app/ai/view-functions.ts +22 -19
  79. package/src/app/base-view.ts +99 -8
  80. package/src/app/consts.ts +8 -5
  81. package/src/app/dialogs/functions-dialog.ts +14 -9
  82. package/src/app/dialogs/merge-table-dialog.ts +181 -325
  83. package/src/app/hit-app-base.ts +61 -90
  84. package/src/app/hit-design-app.ts +492 -882
  85. package/src/app/hit-design-views/info-view.ts +57 -407
  86. package/src/app/hit-design-views/submit-view.ts +216 -111
  87. package/src/app/hit-design-views/tiles-view.ts +168 -123
  88. package/src/app/hit-design-views/utils.css +0 -8
  89. package/src/app/hit-triage-app.ts +69 -38
  90. package/src/app/hit-triage-views/info-view.ts +70 -371
  91. package/src/app/pep-triage-app.ts +2 -2
  92. package/src/app/pep-triage-views/info-view.ts +42 -83
  93. package/src/app/pepti-hit-app.ts +32 -183
  94. package/src/app/pepti-hits-views/info-view.ts +15 -37
  95. package/src/app/shared/campaign-catalog.ts +408 -0
  96. package/src/app/shared/campaign-session.ts +557 -0
  97. package/src/app/shared/compute-editor.ts +274 -0
  98. package/src/app/shared/hit-home.ts +45 -0
  99. package/src/app/shared/new-campaign-form.ts +90 -0
  100. package/src/app/shared/permissions-editor.ts +93 -0
  101. package/src/app/shared/template-editor.ts +331 -0
  102. package/src/app/shared/template-picker.ts +154 -0
  103. package/src/app/types.ts +2 -0
  104. package/src/app/utils/merge-table.ts +183 -78
  105. package/src/app/utils.ts +34 -325
  106. package/src/package-api.ts +29 -8
  107. package/src/package-test.ts +17 -2
  108. package/src/package.g.ts +12 -8
  109. package/src/package.ts +19 -7
  110. package/src/tests/ai.ts +244 -0
  111. package/src/tests/campaign-layout.ts +82 -0
  112. package/src/tests/campaign-session.ts +168 -0
  113. package/src/tests/campaigns.ts +23 -0
  114. package/src/tests/catalog.ts +156 -0
  115. package/src/tests/compat.ts +482 -0
  116. package/src/tests/compute.ts +165 -0
  117. package/src/tests/fixtures.ts +359 -0
  118. package/src/tests/merge.ts +149 -0
  119. package/src/tests/owners.ts +11 -0
  120. package/src/tests/save-lock.ts +932 -0
  121. package/src/tests/storage.ts +106 -0
  122. package/src/tests/template-editor.ts +538 -0
  123. package/src/tests/templates.ts +143 -0
  124. package/src/tests/triage-start.ts +81 -0
  125. package/src/tests/u2-guards.ts +384 -0
  126. package/src/tests/vid.ts +77 -0
  127. package/tsconfig.json +3 -0
  128. package/src/app/accordeons/new-hit-design-template-accordeon.ts +0 -238
  129. package/src/app/dialogs/permissions-dialog.ts +0 -66
@@ -0,0 +1,35 @@
1
+ /* PeptiHit's campaigns, made and removed as Hit Design's are (bindings/campaign.ts), with a Helm column the app
2
+ reads as HELM; and the HELM editor a Helm cell opens: Helm's full-screen dialog with no title, whose parts carry the
3
+ hwe library's data-testid rather than the u2 contract, so the steps reach them by those. */
4
+ import {Page} from '@playwright/test';
5
+ import {Given, Then, When} from '@datagrok-libraries/bdd';
6
+ import {expect, pollMs} from '@datagrok-libraries/bdd/runtime';
7
+ import {makeCampaign} from './campaign.js';
8
+
9
+ const EDITOR = '.d4-dialog-full-screen:has([data-testid="app-root"])';
10
+
11
+ export const peptiHitCampaign = Given('the PeptiHit campaign {string} with the stages {string} and a table of:',
12
+ async (page: Page, name: string, stages: string, table: string[][]) => {
13
+ await makeCampaign(page, 'PeptiHit', name, stages.split(',').map((s) => s.trim()).filter((s) => s.length > 0), table);
14
+ }, {tier: 'api', description: 'as the Hit Design one, in PeptiHit\'s folder and under its app name in the hitdesign database: the rows given (a Helm column the app tags as HELM), the template embedded with the stages given, a Chemist field, the Chemical Properties compute (MW) on the molecule the HELM converts to, the Demo File Submit preset; removed at feature end with its hitdesign rows and the V-iDs it registered, read back, and swept before it is made'});
15
+
16
+ export const helmEditorOpen = Then('the HELM editor should be open', async (page: Page) => {
17
+ await expect(page.locator(EDITOR).filter({visible: true}), 'the HELM editor').toHaveCount(1, {timeout: pollMs(30000)});
18
+ }, {tier: 'ui', description: 'the full-screen HELM editor dialog a Helm cell opens (Helm:editMoleculeCell)'});
19
+
20
+ export const writeHelm = When('user writes the HELM {string} in the HELM editor', async (page: Page, helm: string) => {
21
+ const editor = page.locator(EDITOR).filter({visible: true});
22
+ await editor.locator('[data-testid="tab-helm"]').click();
23
+ const pane = editor.locator('[data-testid="notation-pane-content"]');
24
+ await pane.selectText();
25
+ await page.keyboard.type(helm);
26
+ await pane.press('Enter');
27
+ await expect(pane, 'the HELM notation of the editor').toHaveText(helm);
28
+ await expect(editor.locator('[data-testid="notation-pane-error"]'), 'the notation error of the editor').toHaveText('');
29
+ }, {tier: 'ui', description: 'on the editor\'s HELM tab, the notation selected and typed over, committed with Enter; done when the notation holds it and the editor reports no parse error'});
30
+
31
+ export const helmEditorOk = When('user clicks on OK in the HELM editor', async (page: Page) => {
32
+ const editor = page.locator(EDITOR).filter({visible: true});
33
+ await editor.locator('.d4-dialog-footer [name="button-OK"]').click();
34
+ await expect(page.locator(EDITOR).filter({visible: true}), 'the HELM editor, closed by OK').toHaveCount(0);
35
+ }, {tier: 'ui', description: 'the editor\'s OK, which writes its HELM into the cell; done when the editor is gone'});
@@ -0,0 +1,22 @@
1
+ Feature: The crumbs of a Hit Design campaign view go back to the landing
2
+ The campaign view's name slot shows the crumbs "Hit Design › <campaign>"; "Hit Design" closes the campaign view,
3
+ shows the landing and puts the address back to the app's own.
4
+
5
+ The shell renders the crumbs from the campaign view's parent, the landing, as soon as the view opens and only on
6
+ that view.
7
+
8
+ The campaign is made for the feature through the JS API and opened by its link.
9
+
10
+ Background:
11
+ Given user is logged in
12
+ And the Hit Design campaign "BDD Crumbs" with the stages "Idea" and a table of:
13
+ | Molecule | Stage | V-iD | MW |
14
+ | CCO | Idea | | 46.07 |
15
+ When user opens the campaign "BDD Crumbs" by its link
16
+
17
+ Scenario: The first crumb goes back to the landing and closes the campaign
18
+ Then the page address should contain "campaignId=BDDBDDCRUMBS-1"
19
+ When user goes back by the "Hit Design" crumb of the campaign "BDD Crumbs"
20
+ Then the "Hit Design" view should be current
21
+ And the open table views should be exactly ""
22
+ And the page address should not contain "campaignId"
@@ -0,0 +1,56 @@
1
+ Feature: Rows and cells of a Hit Design campaign
2
+ The campaign's grid is the platform's, with the package's row actions on top: a new row (the ribbon's +, or the
3
+ Molecule cell's context menu) gets the template's first stage wherever the Stage is empty and opens the sketcher on
4
+ its empty molecule; a Molecule cell's menu adds Add new row, Duplicate molecule and, for a cell with a molecule,
5
+ Re-Run Calculations, which recomputes that row with the template's compute (here the JS-only Chemical Properties,
6
+ MW) and saves. The Stage cell, a choice of the template's stages, is stage-choices.feature.
7
+
8
+ Drawing the molecule of a new row, and the V-iD the drawing registers, is the UsageAnalysis feature
9
+ apps/hit-design-crux.feature; it is not repeated here. Not claimed, as a known bug: Duplicate molecule gives the copy
10
+ no V-iD and no computed values and pops the sketcher up over the filled row.
11
+
12
+ The campaign is made for the feature through the JS API and opened by its link (bindings/campaign.ts).
13
+
14
+ Background:
15
+ Given user is logged in
16
+ And the Hit Design campaign "BDD Grid" with the stages "Idea, Design, Make" and a table of:
17
+ | Molecule | Stage | V-iD | MW |
18
+ | CCO | Design | | 46.07 |
19
+ | c1ccccc1 | Design | | |
20
+ When user opens the campaign "BDD Grid" by its link
21
+ Then the table should have 2 rows
22
+
23
+ Scenario: Add new row gives the new row the first stage and opens the sketcher on its empty molecule
24
+ When user clicks on "Add new row" icon in toolbar
25
+ Then sketcher dialog should be visible
26
+ And the table should have 3 rows
27
+ And the value of "Stage" column in row 3 should be "Idea"
28
+ And the value of "Stage" column in row 1 should be "Design"
29
+ When user clicks on CANCEL button in sketcher dialog
30
+ Then sketcher dialog should be absent
31
+ And the table should have 3 rows
32
+
33
+ Scenario: A Molecule cell's menu adds the package's row actions, and another column's menu does not
34
+ When user right-clicks on the "cell 1 of Molecule" area of grid
35
+ Then the open menu should list "Add new row"
36
+ And the open menu should list "Duplicate molecule"
37
+ And the open menu should list "Re-Run Calculations"
38
+ When user closes the context menu
39
+ And user right-clicks on the "cell 1 of Stage" area of grid
40
+ Then the open menu should list "Sort..."
41
+ And the open menu should not list "Duplicate molecule"
42
+ And the open menu should not list "Re-Run Calculations"
43
+
44
+ Scenario: Duplicate molecule appends the cell's molecule as a new row in the first stage
45
+ When user picks "Duplicate molecule" from the context menu of the "cell 1 of Molecule" area of grid
46
+ Then the table should have 3 rows
47
+ And the value of "Molecule" column in row 3 should be "CCO"
48
+ And the value of "Stage" column in row 3 should be "Idea"
49
+
50
+ Scenario: Re-Run Calculations computes the template's property for that row alone and saves it
51
+ Then the value of "MW" column in row 2 should be ""
52
+ When user picks "Re-Run Calculations" from the context menu of the "cell 2 of Molecule" area of grid
53
+ Then the campaign "BDD Grid" should be saved with a value matching "^78[.]1" in row 2 of the "MW" column
54
+ And the value of "MW" column in row 2 should match "^78[.]1"
55
+ And the value of "MW" column in row 1 should match "^46[.]0[67]"
56
+ And no error or warning balloon should have been shown
@@ -0,0 +1,105 @@
1
+ Feature: Merging a table from the user's files into a Hit Design campaign
2
+ The ribbon's merge icon opens "Merge with table". Its OK stays disabled while the dialog lacks what the merge needs,
3
+ and a line under the inputs says why: no source file yet, the V-iD column missing for a merge by V-iD (the
4
+ default), the molecule column missing for a merge by canonical SMILES. By SMILES, a campaign row whose molecule is the file's (canonically: OCC is CCO) takes
5
+ the file's values, and a molecule the campaign lacks comes in as a new row with the first stage, a V-iD registered
6
+ for it and the template's compute (MW); by V-iD, the row holding the file's V-iD takes its values and nothing is
7
+ added without a molecule column. The merged campaign is saved, with the balloon "Table merged into campaign.".
8
+
9
+ The source files are CSVs in the user's home folder, typed into Source file as a share path is pasted or picked in
10
+ the platform's "Select a file" dialog ("Add file from Files"); they go at feature end. A file picked from a share
11
+ is remembered with the campaign (with Auto-merge on, the campaign reads and merges it again whenever it opens: the
12
+ package test "Compat: campaign.json" pins that); a file uploaded from the computer is merged once. The campaign is
13
+ made for the feature through the JS API (bindings/campaign.ts); its V-iDs are plain values for the merge to match,
14
+ not dictionary entries. The new molecule is one only bdd features use, so the
15
+ dictionary row its registration makes is the feature's own and goes with the campaign.
16
+
17
+ Background:
18
+ Given user is logged in
19
+ And the Hit Design campaign "BDD Merge" with the stages "Idea, Design" and a table of:
20
+ | Molecule | Stage | V-iD | MW |
21
+ | CCO | Design | V900001 | 46.07 |
22
+ | c1ccccc1 | Design | V900002 | 78.11 |
23
+ And the user's file "bdd-merge-by-smiles.csv" holds the table:
24
+ | Molecule | Score |
25
+ | OCC | 5 |
26
+ | NCCCCCCCCCCCCCCCCCCCCCCCCO | 7 |
27
+ And the user's file "bdd-merge-by-vid.csv" holds the table:
28
+ | V-iD | Priority |
29
+ | V900002 | High |
30
+ When user opens the campaign "BDD Merge" by its link
31
+ And user clicks on "Merge another table into the campaign" icon in toolbar
32
+ Then "Merge with table" dialog should be visible
33
+
34
+ Scenario: OK stays disabled, saying why, until the dialog has what the merge needs
35
+ Then OK button in "Merge with table" dialog should be disabled
36
+ And "Merge with table" dialog should contain text "Pick a source file to merge from."
37
+ And CANCEL button in "Merge with table" dialog should be enabled
38
+ When user enters the path of the user's file "bdd-merge-by-smiles.csv" into "Source file" input in "Merge with table" dialog
39
+ Then "Merge with table" dialog should contain text "Pick the V-iD column from the incoming table."
40
+ And OK button in "Merge with table" dialog should be disabled
41
+ When user selects "By canonical SMILES" in "Merge by" input in "Merge with table" dialog
42
+ Then OK button in "Merge with table" dialog should be enabled
43
+ When user selects "(none)" in "Molecule column (incoming)" input in "Merge with table" dialog
44
+ Then "Merge with table" dialog should contain text "Pick the molecule column from the incoming table."
45
+ And OK button in "Merge with table" dialog should be disabled
46
+ When user clicks on CANCEL button in "Merge with table" dialog
47
+ Then "Merge with table" dialog should be absent
48
+ And the table should have 2 rows
49
+
50
+ Scenario: By canonical SMILES, the matching row takes the file's values and the new molecule comes in with a stage, a V-iD and MW
51
+ When user enters the path of the user's file "bdd-merge-by-smiles.csv" into "Source file" input in "Merge with table" dialog
52
+ And user selects "By canonical SMILES" in "Merge by" input in "Merge with table" dialog
53
+ And user clicks on OK button in "Merge with table" dialog
54
+ Then an info balloon containing "Table merged into campaign" should have been shown
55
+ And the campaign "BDD Merge" should be saved with 3 rows
56
+ And the table should have 3 rows
57
+ And the value of "Score" column in row 1 should be "5"
58
+ And the value of "Score" column in row 2 should be ""
59
+ And the value of "Molecule" column in row 3 should be "NCCCCCCCCCCCCCCCCCCCCCCCCO"
60
+ And the value of "Stage" column in row 3 should be "Idea"
61
+ And the value of "V-iD" column in row 3 should match "^V[0-9]{6}$"
62
+ And the value of "MW" column in row 3 should match "^369[.]6"
63
+ And the campaign "BDD Merge" should be saved with "5" in row 1 of the "Score" column
64
+
65
+ Scenario: By V-iD, the row of that V-iD takes the file's values and no row is added
66
+ When user enters the path of the user's file "bdd-merge-by-vid.csv" into "Source file" input in "Merge with table" dialog
67
+ Then "V-iD column (incoming)" input in "Merge with table" dialog should have value "V-iD"
68
+ And OK button in "Merge with table" dialog should be enabled
69
+ When user clicks on OK button in "Merge with table" dialog
70
+ Then an info balloon containing "Table merged into campaign" should have been shown
71
+ And the campaign "BDD Merge" should be saved with "High" in row 2 of the "Priority" column
72
+ And the table should have 2 rows
73
+ And the value of "Priority" column in row 2 should be "High"
74
+ And the value of "Priority" column in row 1 should be ""
75
+
76
+ # a file from Files: remembered with the campaign, to be merged on every open (package test "Compat:
77
+ # campaign.json" pins the merge on open)
78
+ Scenario: A file picked from Files is merged and remembered with the campaign, and the dialog opens on it again
79
+ When user clicks on "Add file from Files" icon in "Source file" input in "Merge with table" dialog
80
+ Then "Select a file" dialog should be visible
81
+ Given "My files" tree node in "Select a file" dialog is expanded
82
+ When user double-clicks on "bdd-merge-by-vid.csv" tree node in "Select a file" dialog
83
+ Then "Select a file" dialog should be absent
84
+ And "Source file" input in "Merge with table" dialog should hold the path of the user's file "bdd-merge-by-vid.csv"
85
+ And "V-iD column (incoming)" input in "Merge with table" dialog should have value "V-iD"
86
+ When user checks "Auto-merge on campaign open" input in "Merge with table" dialog
87
+ And user clicks on OK button in "Merge with table" dialog
88
+ Then an info balloon containing "Table merged into campaign" should have been shown
89
+ And the campaign "BDD Merge" should be saved with "High" in row 2 of the "Priority" column
90
+ And the campaign "BDD Merge" should be saved to merge the user's file "bdd-merge-by-vid.csv" on every open
91
+ When user clicks on "Merge another table into the campaign" icon in toolbar
92
+ Then "Source file" input in "Merge with table" dialog should hold the path of the user's file "bdd-merge-by-vid.csv"
93
+ And "V-iD column (incoming)" input in "Merge with table" dialog should have value "V-iD"
94
+ And "Auto-merge on campaign open" input in "Merge with table" dialog should be checked
95
+
96
+ # a file from the computer: merged once, nothing to read again on open
97
+ Scenario: A file uploaded from the computer is merged once, with Auto-merge on campaign open off
98
+ When user clicks on "Open file" icon in "Source file" input in "Merge with table" dialog and chooses the "fixtures/merge-local.csv" file of the project
99
+ Then "V-iD column (incoming)" input in "Merge with table" dialog should have value "V-iD"
100
+ And "Auto-merge on campaign open" input in "Merge with table" dialog should be disabled
101
+ When user clicks on OK button in "Merge with table" dialog
102
+ Then an info balloon containing "Table merged into campaign" should have been shown
103
+ And the campaign "BDD Merge" should be saved with "Urgent" in row 1 of the "Priority" column
104
+ And the campaign "BDD Merge" should be saved to merge no file on open
105
+ And the value of "Priority" column in row 1 should be "Urgent"
@@ -0,0 +1,40 @@
1
+ Feature: A molecule edited in a Hit Design campaign gets its V-iD
2
+ Editing a Molecule cell registers the molecule in the V-iD dictionary, writes its V-iD into the row,
3
+ computes the template's compute for that one molecule (here the JS-only Chemical Properties, MW) and saves the
4
+ campaign without a balloon. The V-iD cell then shows the "Hit Design V-iD" pane of the context panel: the
5
+ campaigns that hold the V-iD, with who added it.
6
+
7
+ The molecule is typed into the sketcher's molecule field; the sketcher is pinned to OpenChemLib for the feature and
8
+ put back after it. The molecule is one only bdd features use, so the dictionary row its registration makes is the
9
+ feature's own and goes with the campaign at feature end (bindings/campaign.ts).
10
+
11
+ Background:
12
+ Given user is logged in
13
+ And the molecule sketcher is "OpenChemLib"
14
+ And the Hit Design campaign "BDD Vid" with the stages "Idea, Design" and a table of:
15
+ | Molecule | Stage | V-iD | MW |
16
+ | CCO | Idea | | 46.07 |
17
+ When user opens the campaign "BDD Vid" by its link
18
+
19
+ Scenario: A molecule typed into the sketcher gets a V-iD and the template's property, is saved, and its V-iD's pane lists the campaign
20
+ When user double-clicks on the "cell 1 of Molecule" area of grid
21
+ Then sketcher dialog should be visible
22
+ When user enters the molecule "NCCCCCCCCCCCCCCCCCCCCCCCCO" into sketcher dialog
23
+ And user clicks on OK button in sketcher dialog
24
+ Then sketcher dialog should be absent
25
+ And the campaign "BDD Vid" should be saved with a value matching "^V[0-9]{6}$" in row 1 of the "V-iD" column
26
+ And the value of "V-iD" column in row 1 should match "^V[0-9]{6}$"
27
+ And the value of "MW" column in row 1 should match "^369[.]6"
28
+ And the campaign "BDD Vid" should be saved with a value matching "^369[.]6" in row 1 of the "MW" column
29
+ And no error or warning balloon should have been shown
30
+ And the campaign "BDD Vid" should hold no lock on the server
31
+ And grid should have finished updating
32
+ Given the context panel is open
33
+ When user clicks on the "cell 1 of V-iD" area of grid
34
+ Then the current column should be "V-iD"
35
+ And the context panel should show the current cell
36
+ And "Hit Design V-iD" section should be visible
37
+ When user expands "Hit Design V-iD" section
38
+ Then "Hit Design V-iD" section should contain text "Hit Design Campaigns"
39
+ And "Hit Design V-iD" section should contain text "BDDBDDVID-1"
40
+ And "Hit Design V-iD" section should contain text "{login}"
@@ -0,0 +1,46 @@
1
+ Feature: Editing a Hit Design campaign's permissions from its ribbon
2
+ The ribbon's "Edit campaign permissions" icon, shown only to an editor, opens "Edit Permissions" with who may view
3
+ and edit the campaign (a campaign without permissions: All users). OK stores them with the campaign and saves it,
4
+ with the balloon "Campaign saved successfully."; the next opening shows them. CANCEL closes the dialog.
5
+
6
+ The dialog is one users/groups grid with the columns "Can View" and "Can Edit"; the step that gives the edit access
7
+ is the one place that knows the form (bindings/campaign.ts). Each row starts with who it is: a user's picture or
8
+ initials, a group's icon.
9
+
10
+ The account given edit access is the second account (DATAGROK_SHARING_LOGIN, the bddsecond user the setup makes).
11
+ The campaign is made for the feature through the JS API and opened by its link.
12
+
13
+ Background:
14
+ Given user is logged in
15
+ And the Hit Design campaign "BDD Permissions" with the stages "Idea" and a table of:
16
+ | Molecule | Stage | V-iD | MW |
17
+ | CCO | Idea | | 46.07 |
18
+ When user opens the campaign "BDD Permissions" by its link
19
+
20
+ Scenario: A user given edit access is saved with the campaign and shown when the dialog opens again
21
+ When user clicks on "Edit campaign permissions" icon in toolbar
22
+ Then "Edit Permissions" dialog should be visible
23
+ And "Edit Permissions" dialog should contain text "Can View"
24
+ And "Edit Permissions" dialog should contain text "Can Edit"
25
+ And "Edit Permissions" dialog should contain text "All users"
26
+ And CANCEL button in "Edit Permissions" dialog should be enabled
27
+ When user lets the sharing user edit in "Edit Permissions" dialog
28
+ And user clicks on OK button in "Edit Permissions" dialog
29
+ Then "Edit Permissions" dialog should be absent
30
+ And an info balloon containing "Campaign saved successfully" should have been shown
31
+ And the campaign "BDD Permissions" should let the sharing user edit it on the server
32
+ When user clicks on "Edit campaign permissions" icon in toolbar
33
+ Then "Edit Permissions" dialog should be visible
34
+ And "Edit Permissions" dialog should name the sharing user
35
+ And the sharing user's row of "Edit Permissions" dialog should show the user's picture
36
+ When user clicks on CANCEL button in "Edit Permissions" dialog
37
+ Then "Edit Permissions" dialog should be absent
38
+
39
+ Scenario: A group row shows the group icon, a user added from the picker the user's picture
40
+ When user clicks on "Edit campaign permissions" icon in toolbar
41
+ Then "Edit Permissions" dialog should be visible
42
+ And the "All users" row of "Edit Permissions" dialog should show a group icon
43
+ When user lets the sharing user edit in "Edit Permissions" dialog
44
+ Then the sharing user's row of "Edit Permissions" dialog should show the user's picture
45
+ When user clicks on CANCEL button in "Edit Permissions" dialog
46
+ Then "Edit Permissions" dialog should be absent
@@ -0,0 +1,89 @@
1
+ Feature: The progress tracker of a Hit Design campaign
2
+ "Progress tracker" (a template with stages) opens the platform's tile viewer in a modal full-screen dialog over the
3
+ campaign view, one lane per stage in the template's order, empty lanes included, with Modify Stages and one way out,
4
+ CLOSE. A card dragged into another lane moves its row to that stage, and closing the tracker saves the campaign with
5
+ the balloon "Campaign saved successfully." when a stage changed. Closing never puts a move back, whichever way:
6
+ CLOSE, the close button and Escape alike. Modify Stages edits the template's stages, saves and shows the tracker
7
+ with them, and the Stage cells offer them. While another view is current the tracker hides, and it comes back with
8
+ the campaign view; closing the campaign view takes it away.
9
+
10
+ Adding a stage goes through one step that knows the dialog's form (a records input). The campaign is made for the
11
+ feature through the JS API and opened by its link (bindings/campaign.ts).
12
+
13
+ Background:
14
+ Given user is logged in
15
+ And the Hit Design campaign "BDD Tracker" with the stages "Idea, Design, Make" and a table of:
16
+ | Molecule | Stage | V-iD | MW |
17
+ | CCO | Idea | | 46.07 |
18
+ | c1ccccc1 | Design | | 78.11 |
19
+ When user opens the campaign "BDD Tracker" by its link
20
+ And user clicks on "Progress tracker" button in toolbar
21
+ Then "Progress Tracker" dialog should be visible
22
+
23
+ Scenario: The tracker covers the campaign view with a lane per stage, in the template's order, empty ones included
24
+ Then grid should be inside "Progress Tracker" dialog
25
+ And the "lane names" reading of "Tile Viewer" viewer should be "Idea, Design, Make"
26
+ And the 'tiles in lane "Make"' reading of "Tile Viewer" viewer should be 0
27
+ And the "lane of row 1" reading of "Tile Viewer" viewer should be "Idea"
28
+ And the "lane of row 2" reading of "Tile Viewer" viewer should be "Design"
29
+ And CLOSE button in "Progress Tracker" dialog should be visible
30
+ And "Modify Stages" button in "Progress Tracker" dialog should be visible
31
+ And CANCEL button in "Progress Tracker" dialog should be absent
32
+ And OK button in "Progress Tracker" dialog should be absent
33
+
34
+ Scenario: A card dragged to another lane moves its row there, and CLOSE saves it with a balloon
35
+ When user drags the "tile of row 1" area of "Tile Viewer" viewer onto the 'lane content "Make"' area of "Tile Viewer" viewer
36
+ Then the "lane of row 1" reading of "Tile Viewer" viewer should be "Make"
37
+ And the value of "Stage" column in row 1 should be "Make"
38
+ When user clicks on CLOSE button in "Progress Tracker" dialog
39
+ Then "Progress Tracker" dialog should be absent
40
+ And an info balloon containing "Campaign saved successfully" should have been shown
41
+ And the campaign "BDD Tracker" should be saved with "Make" in row 1 of the "Stage" column
42
+
43
+ # the Stage cells offer the new stages (stage-choices.feature)
44
+ Scenario: Modify Stages adds a stage, saves the campaign and reopens the tracker with the new lane
45
+ When user clicks on "Modify Stages" button in "Progress Tracker" dialog
46
+ Then "Modify Stages" dialog should be visible
47
+ And CANCEL button in "Modify Stages" dialog should be enabled
48
+ When user adds the stage "Test" in "Modify Stages" dialog
49
+ And user clicks on OK button in "Modify Stages" dialog
50
+ Then "Modify Stages" dialog should be absent
51
+ And an info balloon containing "Campaign saved successfully" should have been shown
52
+ And "Progress Tracker" dialog should be visible
53
+ And the "lane names" reading of "Tile Viewer" viewer should be "Idea, Design, Make, Test"
54
+ When user clicks on CLOSE button in "Progress Tracker" dialog
55
+ Then "Progress Tracker" dialog should be absent
56
+ When user double-clicks on the "cell 1 of Stage" area of grid
57
+ Then cell editor should offer "Idea, Design, Make, Test"
58
+
59
+ Scenario: The tracker hides while another view is current and comes back with the campaign view
60
+ Given user opens demog-1000 dataset keeping the first 10 rows
61
+ Then "Progress Tracker" dialog should be hidden
62
+ When user switches to the "BDD Tracker" view
63
+ Then "Progress Tracker" dialog should be visible
64
+ And the "lane names" reading of "Tile Viewer" viewer should be "Idea, Design, Make"
65
+
66
+ Scenario: Closing the campaign view while its tracker is hidden takes the tracker away
67
+ Given user opens demog-1000 dataset keeping the first 10 rows
68
+ Then "Progress Tracker" dialog should be hidden
69
+ When user closes the "BDD Tracker" view
70
+ Then "Progress Tracker" dialog should be absent
71
+
72
+ Scenario: Escape and the close button keep the moves and save them, as CLOSE does
73
+ When user drags the "tile of row 1" area of "Tile Viewer" viewer onto the 'lane content "Make"' area of "Tile Viewer" viewer
74
+ Then the "lane of row 1" reading of "Tile Viewer" viewer should be "Make"
75
+ When user presses Escape
76
+ Then "Progress Tracker" dialog should be absent
77
+ And the value of "Stage" column in row 1 should be "Make"
78
+ And the campaign "BDD Tracker" should be at version 2 on the server
79
+ And the campaign "BDD Tracker" should be saved with "Make" in row 1 of the "Stage" column
80
+ When user clicks on "Progress tracker" button in toolbar
81
+ Then "Progress Tracker" dialog should be visible
82
+ When user drags the "tile of row 2" area of "Tile Viewer" viewer onto the 'lane content "Idea"' area of "Tile Viewer" viewer
83
+ Then the "lane of row 2" reading of "Tile Viewer" viewer should be "Idea"
84
+ When user clicks on close button of "Progress Tracker" dialog
85
+ Then "Progress Tracker" dialog should be absent
86
+ And the value of "Stage" column in row 2 should be "Idea"
87
+ And the campaign "BDD Tracker" should be at version 3 on the server
88
+ And the campaign "BDD Tracker" should be saved with "Idea" in row 2 of the "Stage" column
89
+ And the campaign "BDD Tracker" should hold no lock on the server
@@ -0,0 +1,33 @@
1
+ Feature: A Hit Design campaign view tells when another session saved the campaign
2
+ While the campaign view is current it reads, every 3 s, when the campaign was last saved. A save it did not make
3
+ itself lights the Refresh icon with a hint, and the icon's tooltip turns from "Refresh Campaign" into "New changes
4
+ available. Click to refresh campaign."; Refresh then reads the campaign's table from the server again.
5
+
6
+ The other session's save is made by the feature through the package's own lock queries and the files API, as a
7
+ save in another browser writes it (bindings/campaign.ts): a worker runs one page, and signing in as the second
8
+ account on it reloads the shell, which would close the campaign view whose poll is the subject. The campaign is
9
+ made for the feature and opened by its link.
10
+
11
+ Background:
12
+ Given user is logged in
13
+ And the Hit Design campaign "BDD Refresh" with the stages "Idea, Design" and a table of:
14
+ | Molecule | Stage | V-iD | MW |
15
+ | CCO | Design | | 46.07 |
16
+ | c1ccccc1 | Design | | 78.11 |
17
+ When user opens the campaign "BDD Refresh" by its link
18
+
19
+ Scenario: Another session's save lights the Refresh icon, and Refresh brings its row in
20
+ When user hovers over "Refresh" icon in toolbar
21
+ Then tooltip should have text "Refresh Campaign"
22
+ When another session saves the campaign "BDD Refresh" with a new row of "CCN"
23
+ Then "Refresh" icon in toolbar should be hinted
24
+ When user hovers over "Refresh" icon in toolbar
25
+ Then tooltip should have text "New changes available. Click to refresh campaign."
26
+ And the table should have 2 rows
27
+ When user clicks on "Refresh" icon in toolbar
28
+ Then the table should have 3 rows
29
+ And the "BDD Refresh" view should be current
30
+ And the value of "Molecule" column in row 3 should be "CCN"
31
+ And the value of "Stage" column in row 3 should be "Idea"
32
+ When user hovers over "Refresh" icon in toolbar
33
+ Then tooltip should have text "Refresh Campaign"
@@ -0,0 +1,49 @@
1
+ Feature: The Hit Design campaign view's ribbon and crumbs
2
+ A campaign opens as a platform table view whose ribbon ends with the package's own group: Refresh, Add new row,
3
+ Merge, Calculate additional properties, Edit campaign permissions (with edit permission), Apply template layout
4
+ (when the template has one), then the Progress tracker (when it has stages) and Submit... buttons. The platform's
5
+ Save is taken out. The view's name slot shows the crumbs "Hit Design › <campaign>"; going back by the first one is
6
+ crumbs.feature.
7
+
8
+ The group is pinned to the ribbon's end, so at 1366 px with the toolbox and the context panel open the primary
9
+ buttons stay in view; below a width the small icons fold into a "More actions" menu whose items are the icons'
10
+ tooltips ("..." after the ones that open a dialog).
11
+
12
+ The campaign is made for the feature through the JS API and opened by its link (bindings/campaign.ts); its template
13
+ carries the package's shipped layout file, so the Apply template layout icon shows.
14
+
15
+ Background:
16
+ Given user is logged in
17
+ And the Hit Design campaign "BDD Ribbon" with the stages "Idea, Design, Make" and a table of:
18
+ | Molecule | Stage | V-iD | MW |
19
+ | CCO | Idea | | 46.07 |
20
+ | c1ccccc1 | Design | | 78.11 |
21
+ When user opens the campaign "BDD Ribbon" by its link
22
+
23
+ Scenario: The ribbon ends with the package's actions, and the crumbs name the app and the campaign
24
+ Then the last group of the ribbon should list "Refresh, Add new row, Merge another table into the campaign, Calculate additional properties, Edit campaign permissions, Apply template layout (Loaded from mounted file storage), Progress tracker, Submit..."
25
+ And "Save" button in toolbar should be hidden
26
+ And "Hit Design" breadcrumb should be visible
27
+ And "BDD Ribbon" breadcrumb should be visible
28
+ And the page address should contain "campaignId=BDDBDDRIBBON-1"
29
+ When user hovers over "Refresh" icon in toolbar
30
+ Then tooltip should have text "Refresh Campaign"
31
+ And no error or warning balloon should have been shown
32
+
33
+ Scenario: Apply template layout loads the template's layout file into the view
34
+ Then the open tableview should have 0 Bar chart viewers
35
+ When user clicks on "Apply template layout (Loaded from mounted file storage)" icon in toolbar
36
+ Then the open tableview should have 4 Bar chart viewers
37
+ And the table should have 2 rows
38
+
39
+ Scenario: At 1366 px the primary buttons stay in view and the package's icons are one menu away
40
+ Given the toolbox pane is shown
41
+ And the context panel is open
42
+ When the window is 1366 by 768 px
43
+ Then "Submit..." button in toolbar should not be clipped
44
+ And "Progress tracker" button in toolbar should not be clipped
45
+ And "Merge another table into the campaign" icon in toolbar should be hidden
46
+ When user clicks on "More actions" icon in toolbar
47
+ Then the open menu should list "Refresh Campaign"
48
+ And the open menu should list "Merge another table into the campaign..."
49
+ And the open menu should list "Edit campaign permissions..."
@@ -0,0 +1,39 @@
1
+ Feature: The Stage cell of a Hit Design campaign is a choice of the template's stages
2
+ A Stage cell edits as a dropdown of the template's stages, in their order: the column's `.choices` tag, set when the
3
+ campaign opens and when Modify Stages changes the stages (progress-tracker.feature), never saved with the campaign
4
+ (package test "the Stage cells offer the template's stages…"). A stage picked there saves the campaign with no
5
+ balloon. A row whose stage the template does not have (a typo from when Stage was free text, "Mkae") still shows
6
+ it, in the grid and in its dropdown, where Enter keeps it; it has a lane of its own in the tracker
7
+ (tracker-cards.feature) until another stage is picked. The template editor's Stages stay free text.
8
+
9
+ The campaign is made for the feature through the JS API and opened by its link (bindings/campaign.ts).
10
+
11
+ Background:
12
+ Given user is logged in
13
+ And the Hit Design campaign "BDD Stage Choices" with the stages "Idea, Design, Make" and a table of:
14
+ | Molecule | Stage | V-iD | MW |
15
+ | CCO | Idea | | 46.07 |
16
+ | c1ccccc1 | Mkae | | 78.11 |
17
+ When user opens the campaign "BDD Stage Choices" by its link
18
+ Then the table should have 2 rows
19
+
20
+ Scenario: The Stage cell offers the template's stages, and the stage picked is saved with no balloon
21
+ When user double-clicks on the "cell 1 of Stage" area of grid
22
+ Then cell editor should offer "Idea, Design, Make"
23
+ When user selects "Make" in cell editor
24
+ Then the campaign "BDD Stage Choices" should be saved with "Make" in row 1 of the "Stage" column
25
+ And the campaign "BDD Stage Choices" should be at version 2 on the server
26
+ And the value of "Stage" column in row 1 should be "Make"
27
+ And no error or warning balloon should have been shown
28
+
29
+ Scenario: A stage the template does not have still shows, in the grid and in its dropdown, and Enter keeps it
30
+ Then the "text of cell 2 of Stage" reading of grid should be "Mkae"
31
+ When user double-clicks on the "cell 2 of Stage" area of grid
32
+ Then cell editor should offer "Idea, Design, Make, Mkae"
33
+ And cell editor should have the value "Mkae"
34
+ When user presses Enter
35
+ Then cell editor should be absent
36
+ And the campaign "BDD Stage Choices" should be at version 2 on the server
37
+ And the campaign "BDD Stage Choices" should be saved with "Mkae" in row 2 of the "Stage" column
38
+ And the value of "Stage" column in row 2 should be "Mkae"
39
+ And no error or warning balloon should have been shown