добавлен нерабочий тест openTreeListFromBPAndCheck
This commit is contained in:
parent
be1da7e4c1
commit
84e8493fcc
@ -1,13 +1,10 @@
|
||||
package page;
|
||||
|
||||
import com.codeborne.selenide.ElementsCollection;
|
||||
import com.codeborne.selenide.Selenide;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.codeborne.selenide.Condition.visible;
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
@ -18,6 +15,7 @@ public class BpPage {
|
||||
public static final By searchButton = By.cssSelector("[class*='x-search-box__search-button'], [test*='page-home-search-button']");
|
||||
public static final By searchList = By.cssSelector("div.x-page-components-search-result-item");
|
||||
public static final By contextMenu = By.cssSelector("[class='x-menu'], [test='menu']");
|
||||
public static final By fullTreeListBtn = By.cssSelector("[class='x-page-search-plus-results__full-link'], [test='page-search-plus-full-link']");
|
||||
|
||||
/**
|
||||
* Делаем запрос в БП
|
||||
@ -52,4 +50,13 @@ public class BpPage {
|
||||
doc.contextClick();
|
||||
$(contextMenu).shouldBe(visible, Duration.of(3, SECONDS));
|
||||
}
|
||||
|
||||
/**
|
||||
* Открывает страницу все результаты поиска
|
||||
*/
|
||||
public static void openFullTreeList() {
|
||||
$(fullTreeListBtn).shouldBe(visible).click();
|
||||
$(DocListPage.workWindow).shouldBe(visible, Duration.of(7, SECONDS));
|
||||
$(DocListPage.treeList).shouldBe(visible);
|
||||
}
|
||||
}
|
||||
|
||||
8
src/main/java/page/DocListPage.java
Normal file
8
src/main/java/page/DocListPage.java
Normal file
@ -0,0 +1,8 @@
|
||||
package page;
|
||||
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
public class DocListPage {
|
||||
public static final By workWindow = By.cssSelector("[class*='x-page-components-main__content']");
|
||||
public static By treeList = By.cssSelector("[test*='page-search-tree-list']");
|
||||
}
|
||||
@ -20,7 +20,7 @@ abstract class BaseTest {
|
||||
|
||||
@BeforeTest
|
||||
public void init() {
|
||||
// перед тестов настраиваем браузер
|
||||
// перед тестом настраиваем браузер
|
||||
setUp();
|
||||
Selenide.open(nivUrl);
|
||||
executeJavaScript("window.name = \"autotest\";");
|
||||
|
||||
@ -31,7 +31,13 @@ public class ConsultantTest extends BaseTest{
|
||||
BpPage.searchInInputField(TKrf);
|
||||
|
||||
BpPage.openContextMenuByDoc(0);
|
||||
}
|
||||
|
||||
@Test(description = "Переход в дерево-список из БП")
|
||||
public void openTreeListFromBPAndCheck() {
|
||||
StartPage.openBP();
|
||||
BpPage.searchInInputField(TKrf);
|
||||
BpPage.openFullTreeList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user