Skip to content

Commit

Permalink
More fixes for browser history and resource viewers
Browse files Browse the repository at this point in the history
  • Loading branch information
oxixes committed Apr 29, 2024
1 parent a0f3894 commit aa132cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/js_tests/wirecloud/ui/WorkspaceViewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,13 @@

view.onHistoryChange({
workspace_owner: "user",
workspace_name: "dashboard"
workspace_name: "dashboard",
params: {
test: "test"
}
});

expect(Wirecloud.changeActiveWorkspace).toHaveBeenCalledWith(workspace, {initialtab: undefined, history: 'ignore'});
expect(Wirecloud.changeActiveWorkspace).toHaveBeenCalledWith(workspace, {initialtab: undefined, history: 'ignore', params: {test: "test"}});
});

it("should handle tab changes", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
const data = {
workspace_owner: currentState.workspace_owner,
workspace_name: currentState.workspace_name,
view: 'marketplace'
view: 'marketplace',
params: currentState.params
};

if (this.loading === false && this.error === false && this.alternatives.getCurrentAlternative() !== this.emptyAlternative) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
workspace_owner: currentState.workspace_owner,
workspace_name: currentState.workspace_name,
view: 'myresources',
subview: 'search'
subview: 'search',
params: currentState.params
};

const subview = this.alternatives.getCurrentAlternative();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
this.layout.slideOut().content.clear().appendChild(alert_msg);
Wirecloud.dispatchEvent('viewcontextchanged');
} else if (Wirecloud.activeWorkspace == null || (nextWorkspace.id !== Wirecloud.activeWorkspace.id)) {
Wirecloud.changeActiveWorkspace(nextWorkspace, {initialtab: newState.tab, history: 'ignore'});
Wirecloud.changeActiveWorkspace(nextWorkspace, {initialtab: newState.tab, history: 'ignore', params: newState.params});
} else if (newState.tab != null) {
target_tab = this.findTab(newState.tab_id);
this.notebook.goToTab(target_tab);
Expand Down

0 comments on commit aa132cf

Please sign in to comment.