Last active
June 1, 2020 17:02
-
-
Save ArisAgnew/c942e8b3011b567f508a3859567b7c4b to your computer and use it in GitHub Desktop.
preparePage(final Method invokedMethod, final ITestContext testContext)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @BeforeMethod | |
| public void preparePage(final Method invokedMethod, final ITestContext testContext) { | |
| inBrowser().navigate(refresh()); | |
| testContext.getSuite().getAllMethods() | |
| .stream() | |
| .filter(m -> m.getMethodName().equals(invokedMethod.getName())) | |
| .flatMap(tngm -> Stream.of(tngm.getGroups())) | |
| .filter(s -> s.equals("Управление доступами")) | |
| .findFirst() | |
| .ifPresentOrElse(__ -> { | |
| inBrowser().navigate(toUrl("/tags-manager")) | |
| .click(on(tab("Управление доступами"))) | |
| .edit(valueOfThe(textField("Поиск по пользователю или по тегу"), | |
| of(getCurrentUser().getLogin()))); | |
| }, | |
| () -> { | |
| inBrowser().navigate(toUrl("/tags-manager")); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment