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

Commit

Permalink
Merge pull request #820 from adobe/randy/inline-edit-test
Browse files Browse the repository at this point in the history
Unit test for brackets issue #732
  • Loading branch information
peterflynn committed May 8, 2012
2 parents 4da417d + 66c8d1e commit abe66e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/spec/InlineEditorProviders-test-files/test1.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
<div{{0}} class="{{1}}foo" id="myDiv{{2}}">{{3}}</div>
<!--<div{{4}}>-->
<div id="anotherDiv{{6}}"></div>
<div {{7}}class="foo"></div>
</body>
</html>
12 changes: 12 additions & 0 deletions test/spec/InlineEditorProviders-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,18 @@ define(function (require, exports, module) {
});
});

it("should also open a class selector", function () {
initInlineTest("test1.html", 7);

runs(function () {
var inlineWidget = EditorManager.getCurrentFullEditor().getInlineWidgets()[0];
var inlinePos = inlineWidget.editors[0].getCursorPos();

// verify cursor position in inline editor
expect(inlinePos).toEqual(this.infos["test1.css"].offsets[1]);
});
});

it("should open an id selector", function () {
initInlineTest("test1.html", 2);

Expand Down

0 comments on commit abe66e0

Please sign in to comment.