-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,4 +162,36 @@ module("Integration | Component | header/toolbar", function (hooks) { | |
.dom(OWNER_MATCH) | ||
.containsText(TEST_USER_NAME, "the owner's name is displayed"); | ||
}); | ||
|
||
test("owners are searched in algolia and the google people api", async function (this: ToolbarTestContext, assert) { | ||
this.server.create("google/person", { | ||
names: [{ displayName: "Mishra" }], | ||
emailAddresses: [{ value: "[email protected]" }], | ||
}); | ||
|
||
this.server.create("google/person", { | ||
names: [{ displayName: "Michelle" }], | ||
emailAddresses: [{ value: "[email protected]" }], | ||
}); | ||
|
||
this.server.create("document", { | ||
status: "Approved", | ||
owners: ["[email protected]"], | ||
}); | ||
|
||
this.set("facets", FACETS); | ||
|
||
await render<ToolbarTestContext>(hbs` | ||
<Header::Toolbar @facets={{this.facets}} /> | ||
`); | ||
|
||
await fillIn(OWNERS_INPUT, "mi"); | ||
|
||
assert | ||
.dom(OWNER_MATCH) | ||
.exists( | ||
{ count: 2 }, | ||
"both people are displayed even though only one is a doc owner; the duplicate entry is filtered out", | ||
); | ||
}); | ||
}); |