Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show group approvers in "Request review" modal #672

Merged
merged 4 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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");
});
});
Loading