mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Add in CasperJS test to check if Dashboard Widgets are moveable
Requires .time-widget
This commit is contained in:
parent
6170acb670
commit
39df7a74f7
@ -28,3 +28,24 @@ casper.test.begin("Ghost dashboard is correct", 13, function suite(test) {
|
||||
test.done();
|
||||
});
|
||||
});
|
||||
|
||||
casper.test.begin("Ghost dashboard interactions are correct", 2, function suite(test) {
|
||||
|
||||
casper.test.filename = "dashboard_interactions_test.png";
|
||||
|
||||
casper.start(url + "ghost", function testTitleAndUrl() {
|
||||
test.assertExists(".widget-time", "Time widget is present");
|
||||
}).viewport(1280, 1024);
|
||||
|
||||
casper.then(function testWidgetDragAbility() {
|
||||
var origPos = this.getElementBounds('.widget-time');
|
||||
this.mouse.down('.widget-time .widget-footer');
|
||||
this.mouse.move(150, 650);
|
||||
this.mouse.up(150, 650);
|
||||
test.assertNotEquals(this.getElementBounds('.widget-time'), origPos, 'Time Widget has moved');
|
||||
});
|
||||
|
||||
casper.run(function () {
|
||||
test.done();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user