Skip to content

Commit

Permalink
Update test after merge with master
Browse files Browse the repository at this point in the history
which included jupyterlab#14387 enabling to finish the tests off
  • Loading branch information
krassowski committed May 8, 2023
1 parent 84f9ea9 commit 38227f7
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/notebook/test/searchprovider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ describe('@jupyterlab/notebook', () => {
it('should reflect cell selection state in command mode', async () => {
panel.content.mode = 'command';
panel.content.activeCellIndex = 0;
await signalToPromise(provider.filtersChanged);
let state = provider.getSelectionState();
// Currently it is impossible to select a single cell (a cell is always
// active; while this can be seen as always having a selected cell, this
Expand All @@ -356,9 +355,8 @@ describe('@jupyterlab/notebook', () => {
]);
panel.content.activeCellIndex = 0;
panel.content.mode = 'edit';
// TODO: revisit (remove filtersChanged?) once
// https://github.com/jupyterlab/jupyterlab/pull/14387 is in
await signalToPromise(provider.filtersChanged);
let state = provider.getSelectionState();
expect(state).toBe('none');

await setSelections(panel.content.activeCell!.editor!, [
{
Expand All @@ -367,18 +365,16 @@ describe('@jupyterlab/notebook', () => {
end: { line: 2, column: 6 }
}
]);
await signalToPromise(provider.filtersChanged);
let state = provider.getSelectionState();
state = provider.getSelectionState();
expect(state).toBe('multiple');

await setSelections(panel.content.activeCell!.editor!, [
{
uuid: 'main-selection',
start: { line: 1, column: 0 },
end: { line: 1, column: 6 }
end: { line: 1, column: 5 }
}
]);
await signalToPromise(provider.filtersChanged);
state = provider.getSelectionState();
expect(state).toBe('single');
});
Expand Down

0 comments on commit 38227f7

Please sign in to comment.