Skip to content

Commit 10b73b1

Browse files
authored
Merge pull request galaxyproject#20786 from guerler/refactor_initialization
Remove Backbone from UI bootstrap initialization
2 parents c3262fa + 5570f06 commit 10b73b1

14 files changed

Lines changed: 71 additions & 909 deletions

File tree

client/src/app/app.test.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
import galaxyOptions from "@tests/test-data/bootstrapped";
22
import { getGalaxyInstance, setGalaxyInstance } from "app";
3-
import Backbone from "backbone";
43
import { suppressDebugConsole } from "tests/jest/helpers";
54

65
export function setupTestGalaxy(galaxyOptions_ = null) {
76
galaxyOptions_ = galaxyOptions_ || galaxyOptions;
8-
setGalaxyInstance((GalaxyApp) => {
9-
const galaxy = new GalaxyApp(galaxyOptions_);
10-
galaxy.currHistoryPanel = {
11-
model: new Backbone.Model(),
12-
};
13-
return galaxy;
14-
});
7+
setGalaxyInstance((GalaxyApp) => new GalaxyApp(galaxyOptions_));
158
}
169

1710
// the app console debugs make sense but we just don't want to see them in test
@@ -38,13 +31,6 @@ describe("App base construction/initializiation defaults", () => {
3831
expect(app.options.patchExisting).toBe(true);
3932
});
4033

41-
test("App base extends from Backbone.Events", function () {
42-
const app = getGalaxyInstance();
43-
["on", "off", "trigger", "listenTo", "stopListening"].forEach(function (fn) {
44-
expect(Object.prototype.hasOwnProperty.call(app, fn) && typeof app[fn] === "function").toBeTruthy();
45-
});
46-
});
47-
4834
// // We no longer want this behavior, but leaving the test to express that
4935
test("App base will patch in attributes from existing Galaxy objects", function () {
5036
const existingApp = getGalaxyInstance();

0 commit comments

Comments
 (0)