Skip to content
Snippets Groups Projects
Commit 69817478 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#615 - added selenium test

parent b439539d
No related branches found
No related tags found
No related merge requests found
Pipeline #4992 passed
...@@ -225,6 +225,25 @@ public class AccountTest ...@@ -225,6 +225,25 @@ public class AccountTest
assertThat(icons).isEmpty(); assertThat(icons).isEmpty();
} }
@Test
public void test_readOnly_preventNewTransaction()
{
TransactionTestHelper.selectGlobalAccountByName(driver, "read only account");
driver.get(helper.getUrl() + "/transactions");
WebDriverWait wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("modalFilterTrigger")));
assertThat(driver.findElements(By.id("button-new-transaction"))).isEmpty();
// try to open new transaction page
driver.get(helper.getUrl() + "/transactions/newTransaction/normal");
wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("modalFilterTrigger")));
assertThat(driver.findElement(By.cssSelector(".notification.background-yellow")).isDisplayed()).isTrue();
}
public static void assertAccountColumns(List<WebElement> columns, boolean isDefaultIconVisible, boolean isDefaultIconSelected, AccountState expectedAccountState, String name) public static void assertAccountColumns(List<WebElement> columns, boolean isDefaultIconVisible, boolean isDefaultIconSelected, AccountState expectedAccountState, String name)
{ {
// icons // icons
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment