Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion app/javascript/spec/breadcrumbs/on-click-functions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ describe('Breadcrumbs onClick functions', () => {
});

describe('onClickToExplorer', () => {
const realLocation = window.location;

beforeAll(() => {
delete window.location;
window.location = { ...realLocation, assign: jest.fn() };
});
afterAll(() => {
window.location = realLocation;
});

it('calls prevent default', () => {
window.miqCheckForChanges = () => false;

Expand All @@ -75,7 +85,6 @@ describe('Breadcrumbs onClick functions', () => {

it('calls location assign', () => {
window.miqCheckForChanges = () => true;
window.location.assign = jest.fn();

onClickToExplorer(event, 'pxe', 'explorer');

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"core-js": "~3.6.4",
"core-js-compat": "~3.2.1",
"css-loader": "~3.4.2",
"cypress": "~14.4.0",
"cypress": "~14.5.0",
"duplicate-package-checker-webpack-plugin": "~3.0.0",
"enhanced-resolve": "~4.0.0",
"enzyme": "^3.9.0",
Expand All @@ -150,7 +150,7 @@
"identity-obj-proxy": "^3.0.0",
"imports-loader": "~0.8.0",
"jasmine-jquery": "~2.1.1",
"jest": "~24.9.0",
"jest": "~26.6.3",
"jest-cli": "~24.9.0",
"js-yaml": "~3.13.1",
"ng-annotate-loader": "~0.7.0",
Expand Down
Loading
Loading