Skip to content

Commit

Permalink
Show group approvers in "Request review" modal (#672)
Browse files Browse the repository at this point in the history
* Update sidebar.hbs

* Update document-test.ts

* Cleanup

* Update document-test.ts
  • Loading branch information
jeffdaley authored Apr 11, 2024
1 parent 4660ccf commit 51a2a10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/app/components/document/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@
<Inputs::PeopleSelect
@includeGroups={{true}}
@renderInPlace={{true}}
@selected={{this.approvers}}
@selected={{this.allApprovers}}
@onChange={{this.updateApprovers}}
@disabled={{M.taskIsRunning}}
class="mb-0"
Expand Down
9 changes: 8 additions & 1 deletion web/tests/acceptance/authenticated/document-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const TRANSFER_OWNERSHIP_MODAL = "[data-test-transfer-ownership-modal]";
const OWNERSHIP_TRANSFERRED_MODAL = "[data-test-ownership-transferred-modal]";
const TRANSFERRING_DOC = "[data-test-transferring-doc]";
const SELECT_NEW_OWNER_LABEL = "[data-test-select-new-owner-label]";
const MODAL_PEOPLE_SELECT = "dialog [data-test-people-select]";
const PEOPLE_SELECT_INPUT = ".ember-power-select-trigger-multiple-input";
const PEOPLE_SELECT_OPTION =
".ember-power-select-option:not(.ember-power-select-option--no-matches-message)";
Expand Down Expand Up @@ -776,7 +777,7 @@ module("Acceptance | authenticated/document", function (hooks) {
assert.dom(PUBLISH_FOR_REVIEW_MODAL_SELECTOR).exists();

// Add an approver
await click("dialog [data-test-people-select]");
await click(MODAL_PEOPLE_SELECT);

await fillIn(
".ember-power-select-trigger-multiple-input",
Expand Down Expand Up @@ -1806,5 +1807,11 @@ module("Acceptance | authenticated/document", function (hooks) {
const doc = this.server.schema.document.find(1).attrs;

assert.true(doc.approverGroups.includes(email));

await click(SIDEBAR_PUBLISH_FOR_REVIEW_BUTTON_SELECTOR);

assert
.dom(MODAL_PEOPLE_SELECT)
.containsText(name, "the modal PeopleSelect includes groups");
});
});

0 comments on commit 51a2a10

Please sign in to comment.