Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Mar 5, 2020
2 parents fa3c5f3 + 622fba4 commit 1a766a4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
Expand Up @@ -101,7 +101,7 @@ public void testLinkUnlink() throws Exception {
assertNull("listAccountShadowOwner returned non-null value after unlink", accountOwnerOid);
}

private void assertEquals(String string, String userOid, PrismObject<UserType> accountOwnerOid) {
// TODO Auto-generated method stub
private void assertEquals(String string, String userOid, PrismObject<UserType> accountOwner) {
AssertJUnit.assertEquals(string, userOid, accountOwner != null ? accountOwner.getOid() : null);
}
}
Expand Up @@ -16,13 +16,14 @@

package com.evolveum.midpoint.schrodinger.component.common;

import java.util.ArrayList;
import java.util.List;

import com.codeborne.selenide.ElementsCollection;
import com.codeborne.selenide.SelenideElement;

import com.evolveum.midpoint.schrodinger.component.Component;

import java.util.ArrayList;
import java.util.List;

/**
* Created by Viliam Repan (lazyman).
*/
Expand All @@ -32,22 +33,35 @@ public InlineMenu(T parent, SelenideElement parentElement) {
super(parent, parentElement);
}

public InlineMenu<T> open() {
// todo implement
public InlineMenu<T> caret() {
SelenideElement caret = getParentElement().find("div.btn-group span[data-s-id=caret]");
if (caret != null) {
caret.click();
}

return this;
}

public List<String> getItems() {
List<String> items = new ArrayList<>();

ElementsCollection lis = getParentElement().findAll("div.btn-group ul.dropdown-menu li");
for (SelenideElement li : lis) {
// li.find()
}
// todo implement

return items;
}

public List<String> getItemKeys() {
// todo implement
return null;
}

public InlineMenu<T> clickItem(String itemName) {
// todo implement
SelenideElement dropdown = getParentElement().find("div.btn-group ul.dropdown-menu li");

return this;
}
Expand Down
Expand Up @@ -37,6 +37,11 @@ public TableRow clickCheckBox() {
}

public InlineMenu<TableRow> getInlineMenu() {
return null;
SelenideElement element = getParentElement().find("td:last-child div.btn-group");
if (element == null) {
return null;
}

return new InlineMenu<>(this, element);
}
}

0 comments on commit 1a766a4

Please sign in to comment.