Skip to content

Commit 1952b87

Browse files
committed
Remove the notification during UI tests, to fix a failing test
1 parent f5c4e58 commit 1952b87

File tree

5 files changed

+41
-7
lines changed

5 files changed

+41
-7
lines changed

nbgrader/tests/labextension_ui-tests/tests/test_assignment_list.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ import * as path from 'path';
1212
import * as os from 'os';
1313
import * as fs from 'fs';
1414

15-
test.use({ tmpPath: 'nbgrader-assignment-list-test' });
15+
test.use({
16+
tmpPath: 'nbgrader-assignment-list-test',
17+
mockSettings: {
18+
'@jupyterlab/apputils-extension:notification': {
19+
fetchNews: 'false'
20+
}
21+
}
22+
});
1623

1724
var exchange_dir:string;
1825
var cache_dir: string;

nbgrader/tests/labextension_ui-tests/tests/test_course_list.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ import * as fs from 'fs';
66
import * as os from 'os';
77
import * as path from 'path';
88

9-
10-
test.use({ tmpPath: 'nbgrader-course-list-test' });
9+
test.use({
10+
tmpPath: 'nbgrader-course-list-test',
11+
mockSettings: {
12+
'@jupyterlab/apputils-extension:notification': {
13+
fetchNews: 'false'
14+
}
15+
}
16+
});
1117

1218
var exchange_dir:string;
1319
var cache_dir: string;

nbgrader/tests/labextension_ui-tests/tests/test_create_assignement.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ import * as path from 'path';
44

55
import { wait_for_error_modal, close_error_modal } from "./test_utils";
66

7-
test.use({ tmpPath: 'nbgrader-create-assignments-test' });
7+
test.use({
8+
tmpPath: 'nbgrader-create-assignments-test',
9+
mockSettings: {
10+
'@jupyterlab/apputils-extension:notification': {
11+
fetchNews: 'false'
12+
}
13+
}
14+
});
815

916
const nb_files = ["blank.ipynb", "task.ipynb", "old-schema.ipynb"];
1017

nbgrader/tests/labextension_ui-tests/tests/test_formgrader.spec.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ import * as fs from 'fs';
1313

1414
const is_windows = os.platform().startsWith('win')
1515

16-
test.use({ tmpPath: 'nbgrader-formgrader-test' });
16+
test.use({
17+
tmpPath: 'nbgrader-formgrader-test',
18+
mockSettings: {
19+
'@jupyterlab/apputils-extension:notification': {
20+
fetchNews: 'false'
21+
}
22+
}
23+
});
1724

1825
// const db = new sqlite3.Database("gradebook.db");
1926

nbgrader/tests/labextension_ui-tests/tests/test_validate_assignment.spec.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ import {
99
close_error_modal
1010
} from "./test_utils";
1111

12-
test.use({ tmpPath: 'nbgrader-create-assignments-test' });
12+
test.use({
13+
tmpPath: 'nbgrader-validate-assignments-test',
14+
mockSettings: {
15+
'@jupyterlab/apputils-extension:notification': {
16+
fetchNews: 'false'
17+
}
18+
}
19+
});
1320

1421
const nb_files = [
1522
"data.txt",
@@ -28,7 +35,7 @@ const nb_files = [
2835
test.beforeEach(async ({ baseURL, tmpPath }) => {
2936

3037
if (baseURL === undefined) throw new Error("BaseURL is undefined.");
31-
38+
3239
const contents = galata.newContentsHelper(baseURL);
3340
nb_files.forEach(elem => {
3441
contents.uploadFile(

0 commit comments

Comments
 (0)