Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mooreryan committed Feb 28, 2019
1 parent 8ffece7 commit c418aa4
Showing 1 changed file with 42 additions and 40 deletions.
82 changes: 42 additions & 40 deletions spec/javascripts/viewer_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,49 @@ describe("viewer", function () {
reset_all_to_defaults();
});

it("sets default layout shape", function () {
expect(
$("#" + global.html.id.tree_layout).val()
).to.equal(global.html.id.tree_layout_radial);

expect(
$("#" + global.html.id.tree_layout_radial).prop("selected")
).to.be.true;
describe("tree format options", function () {
it("sets default layout shape", function () {
expect(
$("#" + global.html.id.tree_layout).val()
).to.equal(global.html.id.tree_layout_radial);

expect(
$("#" + global.html.id.tree_layout_radial).prop("selected")
).to.be.true;
});

it("sets default branch style", function () {
expect(
$("#" + global.html.id.tree_branch_style).val()
).to.equal(global.html.id.tree_branch_style_normal);

expect(
$("#" + global.html.id.tree_branch_style_normal).prop("selected")
).to.be.true;
});

it("sets default sorting", function () {
expect(
$("#" + global.html.id.tree_sorting).val()
).to.equal(global.html.id.tree_sorting_forward);

expect(
$("#" + global.html.id.tree_sorting_forward).prop("selected")
).to.be.true;
});

it("sets default tree rotation", function () {
expect(
parseInt($("#" + global.html.id.tree_rotation).val())
).to.equal(viewer.defaults.tree_rotation);
});

it("sets default tree root option", function () {
expect(
$("#" + global.html.id.biologically_rooted).prop("checked")
).to.be.true;
});
});

it("sets default branch style", function () {
expect(
$("#" + global.html.id.tree_branch_style).val()
).to.equal(global.html.id.tree_branch_style_normal);

expect(
$("#" + global.html.id.tree_branch_style_normal).prop("selected")
).to.be.true;
});

it("sets default sorting", function () {
expect(
$("#" + global.html.id.tree_sorting).val()
).to.equal(global.html.id.tree_sorting_forward);

expect(
$("#" + global.html.id.tree_sorting_forward).prop("selected")
).to.be.true;
});

it("sets default tree rotation", function () {
expect(
parseInt($("#" + global.html.id.tree_rotation).val())
).to.equal(viewer.defaults.tree_rotation);
});

it("sets default tree root option", function() {
expect(
$("#" + global.html.id.biologically_rooted).prop("checked")
).to.be.true;
})
});
});
});
Expand Down

0 comments on commit c418aa4

Please sign in to comment.