Skip to content

Commit

Permalink
Convert the signal to a promise prior to carrying the action triggeri…
Browse files Browse the repository at this point in the history
…ng the signal
  • Loading branch information
fcollonval committed Feb 9, 2023
1 parent fc3d6a5 commit 0c5c638
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/filebrowser/test/listing.spec.ts
Expand Up @@ -215,16 +215,18 @@ describe('filebrowser/listing', () => {
itemNode
) as HTMLInputElement;
const item = dirListing.sortedItems().next();
const waitForUpdate = signalToPromise(dirListing.updated);
await dirListing.selectItemByName(item.value.name);
await signalToPromise(dirListing.updated);
await waitForUpdate;
expect(checkbox.checked).toBe(true);
expect(dirListing.isSelected(item.value.name)).toBe(true);
const waitForUpdate2 = signalToPromise(dirListing.updated);
simulate(checkbox, 'mousedown', {
clientX: 1,
clientY: 1,
button: 2
});
await signalToPromise(dirListing.updated);
await waitForUpdate2;
// Item is still selected and checkbox is still checked after
// right-click.
expect(dirListing.isSelected(item.value.name)).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -10135,7 +10135,7 @@ q@^1.5.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==

qs@6.11.0, qs@^6.4.0:
qs@6.11.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==
Expand Down

0 comments on commit 0c5c638

Please sign in to comment.