The following test is to check whether an icon appears on a node or not. rootComponent.virtualComponentId =rootcomponent
it("is sort icon visible on component tree", function() {
var treeNode = $("<li>");
var menuItem = {actionArgs: {id: "childComponentText"}};
workspace.renderDstHintForMenuItemInTree(treeNode,menuItem);
expect(treeNode).to.have.class("dst-hint-component-icon-tree dst-hint-icon-tree-node dst-hints-" + rootComponent.virtualColumnId + "-last");
});
Getting the following error.
AssertionError: expected <li><span title="View applied actions" class="dst-hint-component-icon-tree dst-hint-icon-tree-node dst-hints-rootcomponent-last"></span></li> to have class 'dst-hint-component-icon-tree dst-hint-icon-tree-node dst-hints-rootcomponent-last'
Is there any other way to test whether the particular class is applied or not ?
Aucun commentaire:
Enregistrer un commentaire