Преглед на файлове

HUE-8450 [editor] Add jasmine test for URL changes in embedded mode

Johan Ahlen преди 7 години
родител
ревизия
d40c4ffbfa
променени са 1 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. 9 0
      desktop/core/src/desktop/static/desktop/spec/hueUtilsSpec.js

+ 9 - 0
desktop/core/src/desktop/static/desktop/spec/hueUtilsSpec.js

@@ -53,6 +53,15 @@
       hueUtils.changeURL('/jasmine');
     });
 
+    it("should change URL and a parameter in embedded mode", function () {
+      window.IS_EMBEDDED = true;
+      hueUtils.changeURL('/banana?peeled=no');
+      hueUtils.changeURLParameter('peeled', 'yes');
+      expect(/#\!\/banana\?peeled=yes/.test(window.location.href)).toBeTruthy();
+      window.IS_EMBEDDED = false;
+      window.location.hash = '';
+    });
+
     it("should remove a parameter in the URL", function () {
       hueUtils.changeURL('/banana?peeled=no');
       hueUtils.removeURLParameter('peeled');