Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Commit

Permalink
Remove undo-redo setRootContainer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Mar 24, 2015
1 parent d665782 commit 5a954cc
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions src/test/unit/specific_feature_tests/undo_redo.js
Expand Up @@ -358,63 +358,3 @@ test("Redo keyboard shortcut", function () {
}
});
});

module("undo_redo-setRootContainer", {setup: prepareUnitTestModule});

// Ideally, testing undo/redo is part of normal testing of setRootContainer,
// using `manipulationTestHelper`.
// But as of the writing of this test module, setRootContainer has no test
// coverage.
// Thus these were written.

test("setRootContainer: h1 to p", function () {
manipulationTestHelper({
testUndoRedo: true,
startHtml: "<h1>Foo</h1>",
setCaretInSelector: "h1",
manipulationFunc: function (wymeditor) {
wymeditor.setRootContainer("p");
},
manipulationClickSelector: ".wym_containers_p a",
expectedResultHtml: "<p>Foo</p>"
});
});

test("setRootContainer: h2 to p", function () {
manipulationTestHelper({
testUndoRedo: true,
startHtml: "<h2>Foo</h2>",
setCaretInSelector: "h2",
manipulationFunc: function (wymeditor) {
wymeditor.setRootContainer("p");
},
manipulationClickSelector: ".wym_containers_p a",
expectedResultHtml: "<p>Foo</p>"
});
});

test("setRootContainer: p to pre", function () {
manipulationTestHelper({
testUndoRedo: true,
startHtml: "<p>Foo</p>",
setCaretInSelector: "p",
manipulationFunc: function (wymeditor) {
wymeditor.setRootContainer("pre");
},
manipulationClickSelector: ".wym_containers_pre a",
expectedResultHtml: "<pre>Foo</pre>"
});
});

test("setRootContainer: pre to p", function () {
manipulationTestHelper({
testUndoRedo: true,
startHtml: "<pre>Foo</pre>",
setCaretInSelector: "pre",
manipulationFunc: function (wymeditor) {
wymeditor.setRootContainer("p");
},
manipulationClickSelector: ".wym_containers_p a",
expectedResultHtml: "<p>Foo</p>"
});
});

0 comments on commit 5a954cc

Please sign in to comment.