From e4fecff7f724ce82d746a12d19c146f101f5f5e5 Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Wed, 2 Mar 2016 01:07:03 -0800 Subject: [PATCH] error with setup height --- protractor.conf.js | 5 +- spec/e2e/gridstack-spec.js | 19 +++++-- spec/e2e/html/gridstack-with-height.html | 72 ++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 5 deletions(-) create mode 100644 spec/e2e/html/gridstack-with-height.html diff --git a/protractor.conf.js b/protractor.conf.js index 52a0b5a..edcc3f4 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -4,6 +4,9 @@ exports.config = { capabilities: { browserName: 'firefox', version: '', - platform: 'ANY' + platform: 'ANY', + loggingPrefs: { + browser: 'SEVERE' + } }, }; diff --git a/spec/e2e/gridstack-spec.js b/spec/e2e/gridstack-spec.js index 859268e..7f37166 100644 --- a/spec/e2e/gridstack-spec.js +++ b/spec/e2e/gridstack-spec.js @@ -1,13 +1,24 @@ -describe('gridstack.js two grids demo', function() { +describe('gridstack.js with height', function() { beforeAll(function() { browser.ignoreSynchronization = true; }); beforeEach(function() { - browser.get('http://localhost:8080/demo/two.html'); + browser.get('http://localhost:8080/spec/e2e/html/gridstack-with-height.html'); }); - it('should have proper title', function() { - expect(browser.getTitle()).toEqual('Two grids demo'); + it('shouldn\'t throw exeption when dragging widget outside the grid', function() { + var widget = element(by.id('item-1')); + var gridContainer = element(by.id('grid')); + + browser.actions() + .mouseDown(widget, {x: 20, y: 20}) + .mouseMove(gridContainer, {x: 300, y: 20}) + .mouseUp() + .perform(); + + browser.manage().logs().get('browser').then(function(browserLog) { + expect(browserLog.length).toEqual(0); + }); }); }); diff --git a/spec/e2e/html/gridstack-with-height.html b/spec/e2e/html/gridstack-with-height.html new file mode 100644 index 0000000..4845ef6 --- /dev/null +++ b/spec/e2e/html/gridstack-with-height.html @@ -0,0 +1,72 @@ + + + + + + + + + gridstack.js tests + + + + + + + + + + + + + +
+

gridstack.js tests

+ +
+ +
+
+
+ + + + +