Created
June 30, 2022 06:06
-
-
Save Watcher24/b222338cfffc49291a86ea41e28630f7 to your computer and use it in GitHub Desktop.
This file contains 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
package it.info.magnolia.test.selenium.pageobjects; | |
import static org.junit.jupiter.api.Assertions.assertFalse; | |
import info.magnolia.test.selenium.Personas; | |
import info.magnolia.test.selenium.Selenium; | |
import info.magnolia.test.selenium.pageobjects.PageObjects; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
@ExtendWith(Selenium.class) | |
class AppLauncherTest { | |
@Test | |
void openApp(PageObjects expect) { | |
// GIVEN | |
expect.loginPage() | |
.login(Personas.ARMIN); | |
expect.findBar(). | |
clickAppLauncherButton(); | |
// WHEN | |
expect.appLauncher() | |
.openApp("Security"); | |
// THEN | |
expect.contentApp("Users"); | |
} | |
@Test | |
void nonSuperuserCannotAccessSecurityApp(PageObjects expect) { | |
// GIVEN | |
// TODO replace with pablo or other provided user once DEV-1283 is resolved. | |
expect.loginPage() | |
.login(Personas.ERIC); | |
// WHEN | |
expect.findBar() | |
.clickAppLauncherButton(); | |
// THEN | |
assertFalse(expect.appLauncher().hasApp("Security")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment