...
 
Commits (31)
......@@ -14,4 +14,23 @@ Installation manual is divided into two: [build process](https://github.com/e-go
Development profile allows to run the application without external dependencies to LDAP or TARA.
In order to user the development profile, the maven profile "dev" must be selected for packaging and necessary user attribute values must be provided under the application-dev.properties configuration file.
\ No newline at end of file
In order to user the development profile, the maven profile "dev" must be selected for packaging and necessary user attribute values must be provided under the application-dev.properties configuration file.
## Selenium automated UI tests
- Automated UI tests located in "autotest" module.
- By default running tests is disabled for this module (through maven-surefire-plugin configuration) in order not to interrupt regular build process.
- Selenium test are managed and run by [Cucumber](https://cucumber.io) framework.
- In order to execute all tests with default parameters navigate to "autotest" module folder and run
`mvn test -DskipTests=false` task.<br><br>
Additional parameters: <br>
<b>browser</b> - defines which webdriver should be used by selenium (driver file is downloaded automatically using "webdrivermanager" Maven plugin)<br>
<i>currently supported:</i> 'chrome', 'firefox' <br>
<i>default:</i> 'chrome' <br>
<b>url</b> - defines RIHA application URL<br>
<i>default:</i> 'https://riha-browser-ik.ci.kit' <br><br>
Running tests with additional parameters:<br>
`mvn test -DskipTests=false -Dbrowser=chrome -Durl=https://riha-browser-ik.ci.kit`
\ No newline at end of file
.idea/
target/
\ No newline at end of file
......@@ -14,6 +14,22 @@
<version>7.6</version>
</parent>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
......
package ee.ria.riha.context;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
public class ScenarioContext {
public static final String APP_URL_KEY = "appUrl";
......@@ -13,6 +12,9 @@ public class ScenarioContext {
public static final String LAST_INFOSYSTEM_NUMBER = "lastInfosystemNumber";
public static final String CREATED_SYSTEM_NAME = "CREATED_SYSTEM_NAME";
public static final String CREATED_SYSTEM_SHORT_NAME = "CREATED_SYSTEM_SHORT_NAME";
public static final String DEFAULT_APP_URL = "https://riha-browser-ik.ci.kit";
private final Map<String, String> context = new HashMap<>();
......
......@@ -24,19 +24,30 @@ public class Wait {
public void forElementToBeDisplayed(int timeout, WebElement webElement, String webElementName) {
ExpectedCondition<WebElement> condition = ExpectedConditions.visibilityOf(webElement);
String timeoutMessage = webElementName + " wasn't displayed after " + Integer.toString(timeout) + " seconds.";
String timeoutMessage = webElementName + " wasn't displayed after " + timeout + " seconds.";
waitUntilCondition(condition, timeoutMessage, timeout);
}
public void forElementToBeClickable(int timeout, By elementLocator, String webElementName) {
ExpectedCondition<WebElement> condition = ExpectedConditions.elementToBeClickable(elementLocator);
String timeoutMessage = webElementName + " was displayed after " + timeout + " seconds.";
waitUntilCondition(condition, timeoutMessage, timeout);
}
public void forElementToBeHidden(int timeout, WebElement webElement, String webElementName) {
ExpectedCondition<Boolean> condition = ExpectedConditions.not(ExpectedConditions.visibilityOf(webElement));
String timeoutMessage = webElementName + " wasn't hidden after " + Integer.toString(timeout) + " seconds.";
waitUntilCondition(condition, timeoutMessage, timeout);
}
public void forPresenceOfElements(int timeout, By elementLocator, String elementName) {
ExpectedCondition<List<WebElement>> condition = ExpectedConditions.presenceOfAllElementsLocatedBy(elementLocator);
String timeoutMessage = elementName + " elements were not displayed after " + Integer.toString(timeout) + " seconds.";
String timeoutMessage = elementName + " elements were not displayed after " + timeout + " seconds.";
waitUntilCondition(condition, timeoutMessage, timeout);
}
public void sleep(int timeout) {
public void sleep(int timeoutMilliseconds) {
try {
Thread.sleep(timeout);
Thread.sleep(timeoutMilliseconds);
} catch (InterruptedException e) {
e.printStackTrace();
}
......
package ee.ria.riha.pages;
import ee.ria.riha.context.ScenarioContext;
import ee.ria.riha.driver.Setup;
import ee.ria.riha.driver.Wait;
import org.openqa.selenium.WebDriver;
import ee.ria.riha.context.*;
import ee.ria.riha.driver.*;
import org.openqa.selenium.*;
import java.io.*;
import java.net.*;
public class BasePage {
protected WebDriver driver;
......@@ -16,11 +18,61 @@ public class BasePage {
this.scenarioContext = scenarioContext;
}
public String getCurrentUrl() {
return driver.getCurrentUrl();
public String getCurrentUrl(boolean decodeUrl) {
if (!decodeUrl) {
return driver.getCurrentUrl();
}
try {
return URLDecoder.decode(driver.getCurrentUrl(), "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
public ScenarioContext getScenarioContext() {
return scenarioContext;
}
public Wait getWait() {
return wait;
}
public void makeElementVisible(String id) {
String changeVisibilityScript = "$(\"#" + id + "\").css(\"visibility\",\"visible\");";
String changeDisplayScript = "$(\"#" + id + "\").css(\"display\",\"block\");";
JavascriptExecutor jsExecutor = (JavascriptExecutor)driver;
jsExecutor.executeScript(changeVisibilityScript);
jsExecutor.executeScript(changeDisplayScript);
}
public void goHistoryMinusOne() {
JavascriptExecutor jsExecutor = (JavascriptExecutor)driver;
jsExecutor.executeScript("window.history.go(-1)");
wait.sleep(3000);
}
public boolean isLeftMenuOptionVisible(String menuOptionText) {
return driver
.findElement(By.xpath("//nav[@id='sidemenu']//a[contains(.,'" + menuOptionText + "')]"))
.isDisplayed();
}
public boolean checkIfTableWithHeadersIsVisible(String commaSeparatedHeaderNames) {
wait.sleep(3000);
for (String headerLabel : commaSeparatedHeaderNames.split(",")) {
if (!driver
.findElement(By.xpath("//table/thead/th[contains(.,'" + headerLabel.trim() + "')]"))
.isDisplayed()) {
return false;
}
}
return true;
}
public void rememberSystemNameAndShortName(String systemName, String shortName) {
scenarioContext.saveToContext(ScenarioContext.CREATED_SYSTEM_NAME, systemName);
scenarioContext.saveToContext(ScenarioContext.CREATED_SYSTEM_SHORT_NAME, shortName);
}
}
package ee.ria.riha.pages;
import ee.ria.riha.context.*;
import org.openqa.selenium.*;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.*;
import static ee.ria.riha.Timeouts.*;
public class EvaluateSystemsPage extends BasePage{
@FindBy(xpath = "//table[@id='infosystems-table']/tbody/tr[last()]/td[last()]")
private WebElement lastInfosystemDate;
@FindBy(xpath = "//table[@id='infosystems-table']/tbody/tr[last()]/td/a")
private WebElement lastInfosystem;
public EvaluateSystemsPage(ScenarioContext scenarioContext) {
super(scenarioContext);
PageFactory.initElements(driver, this);
}
public void clickLastInfosystem() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, lastInfosystem, "lastInfosystem");
lastInfosystem.click();
}
public String getLastInfosystemDateClass() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, lastInfosystemDate, "lastInfosystemDate");
return lastInfosystemDate.getAttribute("class");
}
public boolean isPreviouslySavedSystemVisibleInTheFeedbackTable() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, lastInfosystem, "lastInfosystem");
String savedShortName = scenarioContext.getFromContext(ScenarioContext.CREATED_SYSTEM_SHORT_NAME);
return savedShortName.trim().equalsIgnoreCase(lastInfosystem.getText().trim());
}
public boolean isPreviouslySavedSystemFeedbackDeadlineDateIsNotRed() {
return !getLastInfosystemDateClass().contains("text-danger");
}
public void clickOnPreviouslySavedSystemLink() {
if (!isPreviouslySavedSystemVisibleInTheFeedbackTable()) {
return;
}
lastInfosystem.click();
}
}
package ee.ria.riha.pages;
import ee.ria.riha.context.ScenarioContext;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import ee.ria.riha.context.*;
import org.openqa.selenium.*;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.*;
import static ee.ria.riha.Timeouts.DISPLAY_ELEMENT_TIMEOUT;
import static ee.ria.riha.Timeouts.*;
public class HomePage extends BasePage {
......@@ -25,6 +24,16 @@ public class HomePage extends BasePage {
@FindBy(tagName = "ngb-modal-window")
private WebElement modalContainer;
@FindBy(xpath = "//input[@id='search']")
private WebElement searchBarInput;
@FindBy(xpath = "//a[contains(text(),'Hinda')]")
private WebElement evaluateButton;
@FindBy(xpath = "//header[@id='header']/div[2]/app-riha-navbar/div/div/div[2]/div/span/a")
private WebElement selectOrganizationButton;
public HomePage(ScenarioContext scenarioContext) {
super(scenarioContext);
PageFactory.initElements(driver, this);
......@@ -54,20 +63,43 @@ public class HomePage extends BasePage {
}
public void selectOrganization(String organization) {
driver.findElement(By.cssSelector(".right a")).click();
wait.forPresenceOfElements(2, By.tagName("ngb-modal-window"), "modal");
modalContainer.findElement(By.xpath("//td[contains(.,'" + organization +"')]")).click();
wait.forPresenceOfElements(25, By.tagName("ngb-modal-window"), "modal");
modalContainer.findElement(By.xpath("//td[text()='"+organization+"']")).click();
}
public void goToLoginPage() {
driver.navigate().refresh();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, loginButton, "loginButton");
loginButton.click();
}
public WebElement getModalContainer() {
return modalContainer;
}
public void goToMyInfosystemsPage() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, goToMyInfosystemsPageButton, "goToMyInfosystemsPageButton");
goToMyInfosystemsPageButton.click();
}
public void goToInfosystemsPage() {
goToInfosystemsPageLink.click();
}
public void inputSearchTerm(String word) {
this.searchBarInput.sendKeys(word);
this.searchBarInput.sendKeys(Keys.RETURN);
}
public void clickEvaluate() {
driver.navigate().refresh();
wait.forElementToBeClickable(DISPLAY_ELEMENT_TIMEOUT, By.xpath("//a[contains(text(),'Hinda')]"), "evaluateButton");
this.evaluateButton.click();
}
public void openSelectOrganizationDialog() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, selectOrganizationButton, "selectOrganizationButton");
selectOrganizationButton.click();
}
}
\ No newline at end of file
......@@ -30,6 +30,9 @@ public class InfosystemsPage extends BasePage {
@FindBy(id = "info-systems-table")
private WebElement infosystemsTable;
@FindBy(xpath = "//input[@id='search-text-input']")
private WebElement searchBarInput;
public InfosystemsPage(ScenarioContext scenarioContext) {
super(scenarioContext);
PageFactory.initElements(driver, this);
......@@ -94,4 +97,10 @@ public class InfosystemsPage extends BasePage {
wait.sleep(TABLE_SORT_TIMEOUT);
}
public String getInputSearchTerm() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, searchBarInput, "searchBarInput");
return this.searchBarInput.getAttribute("value");
}
}
package ee.ria.riha.pages;
import ee.ria.riha.context.ScenarioContext;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.util.List;
import static ee.ria.riha.Timeouts.DISPLAY_ELEMENT_TIMEOUT;
public class MyDiscussionsPage extends BasePage {
public static final String DISCUSSION_SYSTEM_SHORT_NAME = "DISCUSSION_SYSTEM_SHORT_NAME";
public static final String DISCUSSION_TITLE_NAME = "DISCUSSION_TITLE_NAME";
@FindBy(id = "infosystems-table")
private WebElement myDiscussionsTable;
@FindBy(css = "th:nth-child(1) .btn")
private WebElement nameFilter;
@FindBy(css = "th:nth-child(2) .btn")
private WebElement shortNameFilter;
@FindBy(css = "th:nth-child(3) .btn")
private WebElement titleFilter;
@FindBy(css = "th:nth-child(4) .btn")
private WebElement lastCommentDateFilter;
public MyDiscussionsPage(ScenarioContext scenarioContext) {
super(scenarioContext);
PageFactory.initElements(driver, this);
}
public int getNumberOfDiscussion() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, myDiscussionsTable, "myDiscussionsTable");
List<WebElement> elements = driver.findElements(By.xpath("//tr"));
return elements.size();
}
public void clickOnSortableHeaders() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, nameFilter, "myDiscussionsTable");
nameFilter.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, shortNameFilter, "myDiscussionsTable");
shortNameFilter.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, titleFilter, "myDiscussionsTable");
titleFilter.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, lastCommentDateFilter, "myDiscussionsTable");
lastCommentDateFilter.click();
}
public void clickOnFirstDiscussionShortNameAndRememberIt() {
WebElement shortNameLink = driver.findElement(By.cssSelector("tr:nth-child(1) > td:nth-child(2) > a"));
scenarioContext.saveToContext(DISCUSSION_SYSTEM_SHORT_NAME, shortNameLink.getText());
shortNameLink.click();
}
public boolean isUserRedirectedToSystemPageWithRememberedShortName() {
wait.sleep(2000);
return driver.findElement(By.cssSelector("h2"))
.getText().equalsIgnoreCase(scenarioContext.getFromContext(DISCUSSION_SYSTEM_SHORT_NAME));
}
public void clickOnFirstDiscussionTitleLinkAndRememberIt() {
WebElement discussionTitleLink = driver.findElement(By.cssSelector("tr:nth-child(1) > td:nth-child(3) > a"));
scenarioContext.saveToContext(DISCUSSION_TITLE_NAME, discussionTitleLink.getText());
discussionTitleLink.click();
}
public boolean isUserRedirectedToSystemPageAndPopupIsOpened() {
wait.sleep(2000);
return driver.findElement(By.cssSelector(".text-gray-dark:nth-child(1)"))
.getText().equalsIgnoreCase(scenarioContext.getFromContext(DISCUSSION_TITLE_NAME));
}
}
package ee.ria.riha.pages;
import ee.ria.riha.context.ScenarioContext;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import ee.ria.riha.context.*;
import org.openqa.selenium.*;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.*;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.*;
import java.util.stream.*;
import static ee.ria.riha.Timeouts.DISPLAY_ELEMENT_TIMEOUT;
import static ee.ria.riha.Timeouts.TABLE_SORT_TIMEOUT;
import static ee.ria.riha.context.ScenarioContext.LAST_INFOSYSTEM_NUMBER;
import static ee.ria.riha.context.ScenarioContext.SEARCH_TEXT_KEY;
import static ee.ria.riha.Timeouts.*;
import static ee.ria.riha.context.ScenarioContext.*;
public class MyInfosystemsPage extends BasePage {
@FindBy(xpath = "//main[@id='content']/app-producer-list/section/div[2]/a[4]")
......@@ -38,14 +33,20 @@ public class MyInfosystemsPage extends BasePage {
@FindBy(css = ".table-responsive > .btn")
private WebElement createNewLink;
@FindBy(linkText = "Minu arutelud")
private WebElement myDiscussionsLink;
@FindBy(linkText = "Minu organisatsioon")
private WebElement myOrganization;
@FindBy(xpath = "//button[@type='submit']")
private WebElement submitButton;
@FindBy(id = "infosystems-table")
private WebElement infosystemsTable;
@FindBy(xpath = "//table[@id='infosystems-table']/thead/th/app-sort-button/button")
private WebElement sortByShortNameButton;
@FindBy(xpath = "//table[@id='infosystems-table']/thead/th[6]/app-sort-button/button")
private WebElement sortByLastModifiedButton;
public MyInfosystemsPage(ScenarioContext scenarioContext) {
super(scenarioContext);
......@@ -83,14 +84,30 @@ public class MyInfosystemsPage extends BasePage {
createNewLink.click();
}
public void goToMyDiscussionsInfosystemPage() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, myDiscussionsLink, "myDiscussionsLink");
myDiscussionsLink.click();
}
public void goToMyOrganizationInfosystemPage() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, myOrganization, "myOrganizationLink");
myOrganization.click();
}
public void enterNameShortNameAndPurpose(String namePrefix, String shortNamePrefix, String purpose) {
String lastCreatedInfosystemNumber = scenarioContext.getFromContext(LAST_INFOSYSTEM_NUMBER);
int i = Integer.parseInt(lastCreatedInfosystemNumber);
i++;
nameInput.sendKeys(namePrefix + " " + i);
shortNameInput.sendKeys(shortNamePrefix + "-" + i);
String systemName = namePrefix + " " + i;
nameInput.sendKeys(systemName);
scenarioContext.saveToContext(CREATED_SYSTEM_NAME, systemName);
String shortName = shortNamePrefix + "-" + i;
shortNameInput.sendKeys(shortName);
scenarioContext.saveToContext(CREATED_SYSTEM_SHORT_NAME, shortName);
purposeInput.sendKeys(purpose);
submitButton.click();
}
......@@ -103,17 +120,23 @@ public class MyInfosystemsPage extends BasePage {
waitForLoading();
}
public void sortByShortNameDesc() {
sortByShortNameButton.click(); //asc
public void sortByLastModifiedDesc() {
sortByLastModifiedButton.click(); //asc
waitForLoading();
sortByShortNameButton.click(); //desc
sortByLastModifiedButton.click(); //desc
waitForLoading();
}
public void saveFirstFoundInfosystemShortNameToScenarioContext() {
WebElement firstRow = infosystemsTable.findElement(By.xpath("//tr[1]"));
String shortName = firstRow.findElement(By.xpath("//td[1]")).findElement(By.tagName("a")).getText();
scenarioContext.saveToContext(LAST_INFOSYSTEM_NUMBER, shortName.substring(scenarioContext.getFromContext(SEARCH_TEXT_KEY).length() + 1));
String lastInfoSystemNumber;
if (shortName.equalsIgnoreCase(scenarioContext.getFromContext(SEARCH_TEXT_KEY))) {
lastInfoSystemNumber = "1";
} else {
lastInfoSystemNumber = shortName.substring(scenarioContext.getFromContext(SEARCH_TEXT_KEY).length() + 1);
}
scenarioContext.saveToContext(LAST_INFOSYSTEM_NUMBER, lastInfoSystemNumber);
}
public void selectFirstFoundInfosystem() {
......@@ -125,4 +148,5 @@ public class MyInfosystemsPage extends BasePage {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, infosystemsTable, "infosystems-table");
wait.sleep(TABLE_SORT_TIMEOUT);
}
}
package ee.ria.riha.pages;
import ee.ria.riha.context.ScenarioContext;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.util.List;
import static ee.ria.riha.Timeouts.DISPLAY_ELEMENT_TIMEOUT;
public class MyOrganizationPage extends BasePage {
@FindBy(id = "users-table")
private WebElement employeesTable;
@FindBy(css = "th:nth-child(1) .btn")
private WebElement firstNameColumnSortHeader;
@FindBy(css = "th:nth-child(2) .btn")
private WebElement lastNameColumnSortHeader;
@FindBy(css = "th:nth-child(3) .btn")
private WebElement emailColumnSortHeader;
@FindBy(css = "th:nth-child(4) .btn")
private WebElement describerColumnSortHeader;
@FindBy(css = "th:nth-child(5) .btn")
private WebElement approverColumnSortHeader;
public MyOrganizationPage(ScenarioContext scenarioContext) {
super(scenarioContext);
PageFactory.initElements(driver, this);
}
public int getNumberOfEmployees() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, employeesTable, "employeesTable");
List<WebElement> elements = driver.findElements(By.xpath("//tr"));
return elements.size();
}
public void clickOnSortableHeaders() {
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, firstNameColumnSortHeader, "firstNameColumnSortHeader");
firstNameColumnSortHeader.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, lastNameColumnSortHeader, "lastNameColumnSortHeader");
lastNameColumnSortHeader.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, emailColumnSortHeader, "emailColumnSortHeader");
emailColumnSortHeader.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, describerColumnSortHeader, "describerColumnSortHeader");
describerColumnSortHeader.click();
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, approverColumnSortHeader, "approverColumnSortHeader");
approverColumnSortHeader.click();
}
}
package ee.ria.riha.util;
import java.io.File;
public class Utils {
public static final String RESOURCES_PATH = "/src/test/resources/";
public static String getFileResourcePath(File file) {
return file.getAbsoluteFile().getParent() + RESOURCES_PATH + file.getName();
}
}
package ee.ria.riha;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/ee/ria/riha/AddReferenceToInfoSystem.feature"},
strict = false, plugin = {"pretty",
"json:target/cucumber_json_reports/add-reference-to-infosystem.json",
"html:target/add-reference-to-infosystem-html"},
glue = {"ee.ria.riha"})
public class AddReferenceToInfoSystemTest {
}
package ee.ria.riha;
import ee.ria.riha.driver.Setup;
import ee.ria.riha.driver.Wait;
import ee.ria.riha.pages.HomePage;
import ee.ria.riha.pages.InfosystemPage;
import ee.ria.riha.pages.LoginPage;
import ee.ria.riha.pages.MyInfosystemsPage;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
public class BackgroundSteps {
public static final String FILE_UPLOAD_NAME = "test.txt";
private final Wait wait;
private HomePage homePage;
private LoginPage loginPage;
private MyInfosystemsPage myInfosystemsPage;
private final InfosystemPage infosystemPage;
public BackgroundSteps() {
loginPage = Setup.pageFactory.getPage(LoginPage.class);
homePage = Setup.pageFactory.getPage(HomePage.class);
myInfosystemsPage = Setup.pageFactory.getPage(MyInfosystemsPage.class);
infosystemPage = Setup.pageFactory.getPage(InfosystemPage.class);
wait = new Wait(Setup.driver);
}
@Given("User is logged in to {string} as {string} using tel. number {string}")
......@@ -22,4 +35,42 @@ public class BackgroundSteps {
loginPage.enterIsikukoodAndTelefoninumber(personalCode, phoneNumber);
homePage.selectSecondOrganization();
}
@Given("BackgroundSteps: user creates system with name {string}, shortName {string}, purpose {string}," +
" dataObject {string}, url {string}, urlName {string}," +
" technicalDocumentationUrl {string}, technicalDocumentationLink {string}," +
" contactName {string}, email {string}," +
" legalUrl {string}, legalName {string}")
public void userCreatesAnInfosystem(String namePrefix, String shortNamePrefix, String purpose, String dataObject,
String url, String urlName, String technicalDocumentationUrl, String technicalDocumentationLink, String contactName, String email, String legalUrl, String legalName) {
myInfosystemsPage.goToCreateNewInfosystemPage();
myInfosystemsPage.enterNameShortNameAndPurpose(namePrefix, shortNamePrefix, purpose);
infosystemPage.clickEditButton();
infosystemPage.clickSelectSystemStatus("asutamisel");
infosystemPage.clickSelectDevelopmentStatus(true);
infosystemPage.clickSaveButton();
infosystemPage.clickEditDataButton();
infosystemPage.addDataObjectFileAndUrlToInfosystem(dataObject, FILE_UPLOAD_NAME, url, urlName);
testSleeps(2);
infosystemPage.clickEditDocumentationButton();
infosystemPage.clickOnAddNewDocumentationUrlButton();
infosystemPage.enterNewTechnicalDocumentationLink(technicalDocumentationUrl, technicalDocumentationLink);
testSleeps(2);
infosystemPage.clickEditContactsButton();
infosystemPage.enterContactNameAndEmail(contactName, email);
testSleeps(5);
infosystemPage.clickEditLegalActsButton();
infosystemPage.enterNewLegalActInfo(legalUrl, legalName);
testSleeps(2);
}
@And("Test sleeps for {int} seconds")
public void testSleeps(int seconds) {
homePage.getWait().sleep(seconds * 1000);
}
}
package ee.ria.riha;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/ee/ria/riha/FeedbackInfosystems.feature"},
strict = false, plugin = {"pretty",
"json:target/cucumber_json_reports/feedback-infosystems-page.json",
"html:target/feedback-infosystems-page-html"},
glue = {"ee.ria.riha"})
public class FeedbackInfosystemsTest {
}
package ee.ria.riha.evaluatepage;
import ee.ria.riha.driver.*;
import ee.ria.riha.pages.*;
import io.cucumber.java.en.*;
import static org.junit.Assert.*;
public class EvaluateSystemsPageSteps {
private EvaluateSystemsPage evaluateSystemsPage;
public EvaluateSystemsPageSteps() {
evaluateSystemsPage = Setup.pageFactory.getPage(EvaluateSystemsPage.class);
}
@Then("EvaluateSystemsPage: date field for the last infosystem in list is not red")
public void getLastInfosystemDateClass() {
assertFalse("Infosystem date is red ", evaluateSystemsPage.getLastInfosystemDateClass().contains("text-danger"));
}
@When("EvaluateSystemsPage: user clicks on last infosystem")
public void userClicksLastInfosystem() {
evaluateSystemsPage.clickLastInfosystem();
}
@And("EvaluateSystemsPage: previously saved system is visible in required feedback table")
public void isPreviouslySavedSystemVisibleInTheFeedbackTable() {
assertTrue("previously saved system is not visible:", evaluateSystemsPage.isPreviouslySavedSystemVisibleInTheFeedbackTable());
}
@And("EvaluateSystemsPage: previously saved system is not visible in required feedback table")
public void isPreviouslySavedSystemNotVisibleInTheFeedbackTable() {
assertFalse("previously saved system is visible:", evaluateSystemsPage.isPreviouslySavedSystemVisibleInTheFeedbackTable());
}
@And("EvaluateSystemsPage: previously saved system feedback deadline date is not red")
public void isPreviouslySavedSystemFeedbackDeadlineDateIsNotRed() {
assertTrue("previously saved system feedback deadline date is red:", evaluateSystemsPage.isPreviouslySavedSystemFeedbackDeadlineDateIsNotRed());
}
@When("EvaluateSystemsPage: previously saved system shortName link is clicked")
public void clickOnPreviouslySavedSystemLink(){
evaluateSystemsPage.clickOnPreviouslySavedSystemLink();
}
}
package ee.ria.riha.homepage;
import ee.ria.riha.driver.Setup;
import ee.ria.riha.pages.HomePage;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import ee.ria.riha.driver.*;
import ee.ria.riha.pages.*;
import io.cucumber.java.en.*;
import org.openqa.selenium.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
public class HomePageSteps {
private HomePage homePage;
......@@ -20,6 +19,11 @@ public class HomePageSteps {
homePage.goToPage(url);
}
@And("HomePage: user cancels organization select dialog")
public void userCancelsOrgSelectDialog() {
homePage.getModalContainer().sendKeys(Keys.ESCAPE);
}
@Given("HomePage: user selects organization {string}")
public void userSelectsOrganization(String organization) {
homePage.selectOrganization(organization);
......@@ -60,4 +64,40 @@ public class HomePageSteps {
public void organizationNameIsShownNextToUsersName(String organizationName) {
assertTrue("Organization name " + organizationName + " is not shown", homePage.getLoggedInUsersName().contains(organizationName));
}
@And("HomePage: user returns to the previous page")
public void goOnePageBack() {
homePage.goHistoryMinusOne();
}
@Given("HomePage: user clicks on the search bar and enters {string}")
public void userClicksOnSearchBar(String word) {
this.homePage.inputSearchTerm(word);
}
@And("HomePage: user clicks on evaluate button")
public void userClicksEvaluate() {
homePage.clickEvaluate();
}
@And("HomePage: user opens Select Organization dialog")
public void openSelectOrganizationDialog() {
homePage.openSelectOrganizationDialog();
}
@Then("HomePage: option {string} is visible in left menu")
public void checkIfMenuOptionInLeftMenuIsVisible(String menuOptionLabel) {
assertTrue(homePage.isLeftMenuOptionVisible(menuOptionLabel));
}
@And("HomePage: table with headers {string} is visible")
public void checkIfTableWithHeadersIsVisible(String commaSeparatedHeaderNames) {
assertTrue(homePage.checkIfTableWithHeadersIsVisible(commaSeparatedHeaderNames));
}
@Given("HomePage: user remembers systemName {} and shortName: {}")
public void rememberSystemNameAndShortName(String systemName, String shortName) {
homePage.rememberSystemNameAndShortName(systemName, shortName);
}
}
......@@ -30,6 +30,18 @@ public class InfosystemManagementSteps {
myInfosystemsPage.goToCreateNewInfosystemPage();
}
@And("MyInfosystemsPage: user clicks 'Minu arutelud'")
public void userClicksMyFeedbackDiscussions() {
myInfosystemsPage.goToMyDiscussionsInfosystemPage();
}
@And("MyInfosystemsPage: user clicks 'Minu organisatsioon'")
public void userClicksMyOrganization() {
myInfosystemsPage.goToMyOrganizationInfosystemPage();
}
@And("MyInfosystemsPage: user enters name as {string} short name as {string} increasing last number and purpose as {string}")
public void userEntersNameShortNameAndPurpose(String namePrefix, String shortNamePrefix, String purpose) {
myInfosystemsPage.enterNameShortNameAndPurpose(namePrefix, shortNamePrefix, purpose);
......@@ -38,7 +50,7 @@ public class InfosystemManagementSteps {
@Given("MyInfosystemsPage: user knows the number of last created infosystem with prefix {string}")
public void userKnowsTheNameOfLastCreatedInfosystem(String namePrefix) {
myInfosystemsPage.enterSearchText(namePrefix);
myInfosystemsPage.sortByShortNameDesc();
myInfosystemsPage.sortByLastModifiedDesc();
myInfosystemsPage.saveFirstFoundInfosystemShortNameToScenarioContext();
}
......@@ -48,6 +60,11 @@ public class InfosystemManagementSteps {
myInfosystemsPage.selectFirstFoundInfosystem();
}
@Given("MyInfosystemsPage: user select first found infosystem")
public void userSelectsFirstFoundInfosystem() {
myInfosystemsPage.selectFirstFoundInfosystem();
}
@When("MyInfosystemsPage: user clicks on {string} infosystem link")
public void userClicksOnIfosystemLink(String infosystem) {
myInfosystemsPage.goToInfosystemPage(infosystem);
......
......@@ -5,6 +5,7 @@ import ee.ria.riha.pages.InfosystemsPage;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Then;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class InfosystemsPageSteps {
......@@ -36,9 +37,9 @@ public class InfosystemsPageSteps {
@Then("InfosystemsPage: URL contains 'ownerName={string}', 'name={string}' and 'topic={string}' elements")
public void urlContainsOwnerNameAndtopicElements(String ownerName, String name, String topic) {
assertTrue("Search URL doesn't contain 'ownerName' element", infosystemsPage.getCurrentUrl().contains("ownerName=" + ownerName));
assertTrue("Search URL doesn't contain 'name' element", infosystemsPage.getCurrentUrl().contains("name=" + name));
assertTrue("Search URL doesn't contain 'topic' element", infosystemsPage.getCurrentUrl().contains("topic=" + topic));
assertTrue("Search URL doesn't contain 'ownerName' element", infosystemsPage.getCurrentUrl(false).contains("ownerName=" + ownerName));
assertTrue("Search URL doesn't contain 'name' element", infosystemsPage.getCurrentUrl(false).contains("name=" + name));
assertTrue("Search URL doesn't contain 'topic' element", infosystemsPage.getCurrentUrl(false).contains("topic=" + topic));
}
@Then("InfosytemsPage: 'owner' input has {string} text, 'name' input has {string} text and 'topic' input has {string} text")
......@@ -53,4 +54,10 @@ public class InfosystemsPageSteps {
assertTrue("Infosystem with short name " + shortName + " not found", infosystemsPage.getFoundInfosystemsShortName().stream().anyMatch(shortName::equalsIgnoreCase));
}
@Then("InfosytemsPage: the search bar still contains entered words {string} and url ends with {string}")
public void checkSearchAndUrl(String word, String url) {
assertEquals("Search bar does not contain " + word, infosystemsPage.getInputSearchTerm(), word);
assertTrue("Url does not end with " + url, infosystemsPage.getCurrentUrl(true).contains(url));
}
}
package ee.ria.riha.mydiscussions;
import ee.ria.riha.driver.Setup;
import ee.ria.riha.pages.MyDiscussionsPage;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import static org.junit.Assert.assertTrue;
public class MyDiscussionsPageSteps {
private final MyDiscussionsPage myDiscussionsPage;
public MyDiscussionsPageSteps() {
myDiscussionsPage = Setup.pageFactory.getPage(MyDiscussionsPage.class);
}
@Then("MyDiscussionsPage: table with discussions is displayed")
public void myDiscussionsTableIsDisplayed() {
assertTrue(myDiscussionsPage.getNumberOfDiscussion() > 0);
}
@And("MyDiscussionsPage: table with discussions is sortable")
public void clickOnSortableHeaders() {
myDiscussionsPage.clickOnSortableHeaders();
}
@Given("MyDiscussionsPage: user clicks on discussion shortName link and remembers the shortName")
public void clickOnFirstDiscussionShortNameAndRememberIt() {
myDiscussionsPage.clickOnFirstDiscussionShortNameAndRememberIt();
}
@Then("MyDiscussionsPage: user is located on the selected infosystem page")
public void checkTheInfoSystemPage() {
assertTrue(myDiscussionsPage.isUserRedirectedToSystemPageWithRememberedShortName());
}
@Given("MyDiscussionsPage: user clicks on discussion discussion title link and remembers the title")
public void clickOnFirstDiscussionTitleLinkAndRememberIt() {
myDiscussionsPage.clickOnFirstDiscussionTitleLinkAndRememberIt();
}
@Then("MyDiscussionsPage: user navigates to the selected discussion popup")
public void checkTheSystemPageAndPopup() {
assertTrue(myDiscussionsPage.isUserRedirectedToSystemPageAndPopupIsOpened());
}
}
package ee.ria.riha.mydiscussions;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/ee/ria/riha/MyDiscussions.feature"},
strict = false, plugin = {"pretty",
"json:target/cucumber_json_reports/my-discussions-page.json",
"html:target/my-discussions-page-html"},
glue = {"ee.ria.riha"})
public class MyDiscussionsPageTest {
}
package ee.ria.riha.myorganization;
import ee.ria.riha.driver.Setup;
import ee.ria.riha.pages.MyOrganizationPage;
import io.cucumber.java.en.And;
import io.cucumber.java.en.Then;
import static org.junit.Assert.assertTrue;
public class MyOrganizationPageSteps {
private final MyOrganizationPage myOrganizationPage;
public MyOrganizationPageSteps() {
myOrganizationPage = Setup.pageFactory.getPage(MyOrganizationPage.class);
}
@Then("MyOrganizationPage: table with employees is displayed")
public void checkEmployeesTable() {
assertTrue("number of employees must be greater than 0", myOrganizationPage.getNumberOfEmployees() > 0);
}
@And("MyOrganizationPage: table with discussions is sortable")
public void clickOnSortableHeaders() {
myOrganizationPage.clickOnSortableHeaders();
}
}
package ee.ria.riha.myorganization;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/ee/ria/riha/MyOrganization.feature"},
strict = false, plugin = {"pretty",
"json:target/cucumber_json_reports/my-organization-page.json",
"html:target/my-organization-page-html"},
glue = {"ee.ria.riha"})
public class MyOrganizationPageTest {
}
Feature: Infosystems feedback requesting
Background:
Given User is logged in to "/" as "60001019906" using tel. number "00000766"
And HomePage: user opens 'my organization infosystems' page
Scenario: User can add contact to infosystem (RIHAKB-423)
Given MyInfosystemsPage: user select "riha-test" infosystem
When InfosytemPage: user clicks on 'Seosed süsteemidega' in the navigation bar
Then InfosystemPage: url will contain '/Infosüsteemid/Vaata/riha-test#seosed'
When InfosystemPage: user clicks on edit in 'Seosed süsteemidega' block
And InfosystemPage: user enters 'ummik' in shortname input box in modal window and clicks on suggested name
And InfosystemPage: user selects 'alaminfosüsteem' as type and saves
Then InfosystemPage: a new associated infosystem 'Ummikuregister (ummik.test)' appears as a clickable link
When InfosystemPage: user clicks the new associated infosystem and is redirected to a new tab
And InfosytemPage: user clicks on 'Seosed süsteemidega' in the navigation bar
Then InfosystemPage: url will contain 'Infosüsteemid/Vaata/ummik.test#seosed'
And InfosystemPage: associated infosystem 'Riigi infosüsteemi haldussüsteem (riha-test)' will appear
When InfosystemPage: user clicks on said associated infosystem and new detail view page opens
And InfosystemPage: user goes back to last page
And InfosystemPage: user goes back to the last tab '0'
And InfosystemPage: user deletes infosystem association
And InfosystemPage: user goes back to the last tab '1'
When InfosystemPage: user refreshes current page
Then InfosystemPage: first infosystem is not listed as associated
@RIHAKB-710
Feature: Infosystems feedback requesting
Background:
Given User is logged in to "/" as "60001019906" using tel. number "00000766"
And HomePage: user opens 'my organization infosystems' page
And MyInfosystemsPage: user knows the number of last created infosystem with prefix "riha-auto-test"
Scenario: Owner of the system can request feedback (RIHAKB-463)
Given BackgroundSteps: user creates system with name "riha-auto-test", shortName "riha-auto-test", purpose "purpose test", dataObject "dataObject", url "https://ria.ee", urlName "Ria web", technicalDocumentationUrl "https://ria.ee", technicalDocumentationLink "riaDok", contactName "contactName", email "test@test.ee", legalUrl "https://riigiteataja.ee", legalName "riigiteataja"
When InfosytemPage: feedback button is clicked
And InfosytemPage: feedback of type "KASUTUSELE_VOTMISEKS" with comment "test comment" is requested
Then InfosystemPage: feedback form title is "Infosüsteemil puudub kasutusele võtmise kooskõlastus" and is editable "false"
And InfosytemPage: feedback request submit button is clicked
Then InfosystemPage: feedback request with title "Infosüsteemil puudub kasutusele võtmise kooskõlastus" is saved
Scenario: Owner of the system with Approver role can leave comments (RIHAKB-464)
Given BackgroundSteps: user creates system with name "riha-auto-test", shortName "riha-auto-test", purpose "purpose test", dataObject "dataObject", url "https://ria.ee", urlName "Ria web", technicalDocumentationUrl "https://ria.ee", technicalDocumentationLink "riaDok", contactName "contactName", email "test@test.ee", legalUrl "https://riigiteataja.ee", legalName "riigiteataja"
When InfosytemPage: feedback button is clicked
And InfosytemPage: feedback of type "KASUTUSELE_VOTMISEKS" with comment "test comment" is requested
Then InfosystemPage: feedback form title is "Infosüsteemil puudub kasutusele võtmise kooskõlastus" and is editable "false"
And InfosytemPage: feedback request submit button is clicked
Then InfosystemPage: feedback request with title "Infosüsteemil puudub kasutusele võtmise kooskõlastus" is saved
When InfosytemPage: feedback button is clicked
And InfosytemPage: user adds issue with title "test title" and comment "this is a test comment" to the system
And InfosytemPage: feedback request submit button is clicked
Then InfosystemPage: issue is saved
Scenario: Approver can give feedback to infosystem (RIHAKB-342)
Given MyInfosystemsPage: user select first found infosystem
When InfosytemPage: feedback button is clicked
And InfosytemPage: approver gives feedback with tile "test hinnang" and comment "test kommentaar"
And InfosytemPage: feedback request submit button is clicked
Then InfosytemPage: issue with title "test hinnang" is visible in open issues list
Scenario: Approver can check for systems in need of feedback (RIHAKB-592)
Given BackgroundSteps: user creates system with name "riha-auto-test", shortName "riha-auto-test", purpose "purpose test", dataObject "dataObject", url "https://ria.ee", urlName "Ria web", technicalDocumentationUrl "https://ria.ee", technicalDocumentationLink "riaDok", contactName "contactName", email "test@test.ee", legalUrl "https://riigiteataja.ee", legalName "riigiteataja"
When InfosytemPage: feedback button is clicked
And InfosytemPage: feedback of type "ANDMEKOOSSEISU_MUUTMISEKS" with comment "test" is requested
And InfosytemPage: feedback request submit button is clicked
Then InfosystemPage: feedback request with title "Infosüsteemil puudub andmekoosseisu muutmise kooskõlastus" is saved
And HomePage: user opens Select Organization dialog
And HomePage: user selects organization 'Testasutus 2'
When HomePage: user clicks on evaluate button
Then HomePage: option 'Kooskõlastamisel infosüsteemid' is visible in left menu
Then HomePage: option 'Aktiivsed arutelud' is visible in left menu
Then HomePage: table with headers 'Lühinimi,Infosüsteemi nimi,Kooskõlastamine,Otsuse tähtpäev' is visible
And EvaluateSystemsPage: previously saved system is visible in required feedback table
And EvaluateSystemsPage: previously saved system feedback deadline date is not red
When EvaluateSystemsPage: previously saved system shortName link is clicked
And InfosystemPage: user clicks on feedback topic 'Infosüsteemil puudub andmekoosseisu muutmise kooskõlastus'
And InfosystemPage: user adds feedback with type 'Kooskõlastan' and comment 'test comment on feedback form'
When HomePage: user clicks on evaluate button
Then EvaluateSystemsPage: previously saved system is not visible in required feedback table
And HomePage: user opens Select Organization dialog
And HomePage: user selects organization 'Testasutus'
When HomePage: user clicks on evaluate button
And EvaluateSystemsPage: previously saved system is visible in required feedback table
@RIHAKB-710
Feature: Home page functionality
Background:
Given User is logged in to "/" as "60001019906" using tel. number "00000766"
Scenario: User can select organization which he is representing in RIHA (RIHAKB-343)
Given HomePage: user selects organization "Testasutus 2"
And HomePage: user opens Select Organization dialog
Given HomePage: user selects organization 'Testasutus 2'
Then HomePage: organization name "Testasutus 2" is shown next to user's name
And HomePage: page title is "Avaleht - Riigi infosüsteemi haldussüsteem RIHA"
\ No newline at end of file
And HomePage: page title is "Avaleht - Riigi infosüsteemi haldussüsteem RIHA"
Scenario: End user can perform a search in RIHA navigation (RIHAKB-540)
Given HomePage: user clicks on the search bar and enters 'kontakt'
Then InfosytemsPage: the search bar still contains entered words 'kontakt' and url ends with '/Infosüsteemid?searchText=kontakt&sort=meta.update_timestamp&dir=DESC'
\ No newline at end of file
@RIHAKB-710
Feature: My organization infosystems page functionality
Background:
......@@ -45,11 +46,11 @@ Feature: My organization infosystems page functionality
Scenario: User can add infosystem data (RIHAKB-356)
Given MyInfosystemsPage: user select "riha-test" infosystem
And InfosystemPage: user clicks on 'edit data' button
And InfosystemPage: user adds data object "Minu andmeobjekti" and url "https://www.riha.ee" - "RIHA testimine" to infosystem
Then InfosystemPage: data object "Minu andmeobjekti" and url "RIHA testimine" present in 'data' block
And InfosystemPage: user adds data object "Minu andmeobjekti", data file "test.txt" and url "https://www.riha.ee" - "RIHA testimine" to infosystem
Then InfosystemPage: data object "Minu andmeobjekti", data file "test.txt" and url "RIHA testimine" present in 'data' block
And InfosystemPage: user clicks on 'edit data' button
And InfosystemPage: user removes data object "Minu andmeobjekti" and url "RIHA testimine"
Then InfosystemPage: data object "Minu andmeobjekti" and url "RIHA testimine" not present in 'data' block
And InfosystemPage: user removes data object "Minu andmeobjekti", data file "test.txt" and url "RIHA testimine"
Then InfosystemPage: data object "Minu andmeobjekti", data file "test.txt" and url "RIHA testimine" not present in 'data' block
Scenario: User can add contact to infosystem (RIHAKB-357)
Given MyInfosystemsPage: user select "riha-test" infosystem
......@@ -59,3 +60,11 @@ Feature: My organization infosystems page functionality
And InfosystemPage: user clicks on 'edit contacts' button
And InfosystemPage: user clicks on 'delete contacts' button
Then InfosystemPage: placeholder "Kontaktid puuduvad" is visible in 'contacts' block
Scenario: User can add documents and legal acts to infosystem (RIHAKB-793)
Given MyInfosystemsPage: user select "riha-test" infosystem
And InfosystemPage: user clicks on 'edit documentation' button
And InfosystemPage: user clicks on 'upload file' button
And InfosystemPage: user adds documentation file
Then InfosystemPage: last uploaded file info is editable
And InfosystemPage: last uploaded date is displayed in the documentation section
@RIHAKB-710
Feature: Login
Scenario Outline: Login to application (RIHAKB-308)
......
@RIHAKB-710
Feature: My feedbacks listing feature
Scenario: User can navigate to Minu arutelu listing page (among his own infosystems) (RIHAKB-736)
Given User is logged in to "/" as "60001019906" using tel. number "00000766"
And HomePage: user opens 'my organization infosystems' page
And MyInfosystemsPage: user clicks 'Minu arutelud'
Then MyDiscussionsPage: table with discussions is displayed
And MyDiscussionsPage: table with discussions is sortable
Given MyDiscussionsPage: user clicks on discussion shortName link and remembers the shortName
Then MyDiscussionsPage: user is located on the selected infosystem page
And HomePage: user returns to the previous page
Given MyDiscussionsPage: user clicks on discussion discussion title link and remembers the title
Then MyDiscussionsPage: user navigates to the selected discussion popup
\ No newline at end of file
@RIHAKB-710
Feature: My organization listing feature
Scenario: User can navigate to Minu organisatsioon listing page (RIHAKB-791)
Given User is logged in to "/" as "60001019906" using tel. number "00000766"
And HomePage: user opens 'my organization infosystems' page
And MyInfosystemsPage: user clicks 'Minu organisatsioon'
Then MyOrganizationPage: table with employees is displayed
And MyOrganizationPage: table with discussions is sortable
@RIHAKB-710
Feature: Search infosystems functionality
Scenario: User can search infosystem by keyword (among his own infosystems) (RIHAKB-425)
......
test
\ No newline at end of file
......@@ -12,7 +12,7 @@
<parent>
<groupId>ee.ria.riha</groupId>
<artifactId>browser</artifactId>
<version>7.6</version>
<version>7.6.2</version>
</parent>
<dependencies>
......
......@@ -45,7 +45,7 @@ validation.issueApprovalDecision.create.noRightToAddDecision=User is not allowed
## Email notification messages
notifications.createdInfoSystemsOverview.subject=Uued infosüsteemid RIHAs
notifications.newIssue.toSystemContacts.subject=Teie infosüsteemile on RIHAs lisatud uus arutelu
notifications.newIssue.toSystemContacts.subject=Sinu asutuse infosüsteemile on RIHAs lisatud uus arutelu
notifications.newIssue.toApprovers.subject=Infosüsteemile "{0}" on RIHAs lisatud uus arutelu
notifications.newApprovalRequestIssue.establishmentRequest.subject=Infosüsteem "{0}" soovib saada hinnangut asutamiseks
notifications.newApprovalRequestIssue.takeIntoUseRequest.subject=Infosüsteem "{0}" soovib saada hinnangut kasutusele võtmiseks
......@@ -58,4 +58,4 @@ notifications.newIssueDecision.positive=Kooskõlastan
notifications.newIssueDecision.negative=Ei kooskõlasta
notifications.newIssueDecision.dismissed=Jätan läbi vaatamata
notifications.issueStatusUpdate.subject=Infosüsteemi "{0}" arutelu staatus on muudetud
\ No newline at end of file
notifications.issueStatusUpdate.subject=Infosüsteemi "{0}" arutelu staatus on muudetud
......@@ -10,7 +10,7 @@
<parent>
<groupId>ee.ria.riha</groupId>
<artifactId>browser</artifactId>
<version>7.6</version>
<version>7.6.2</version>
</parent>
<properties>
......
......@@ -107,9 +107,9 @@ const routes: Routes = [
{ path: 'Describe', component: ProducerListComponent },
{ path: 'Infosüsteemid/Vaata/:reference', component: ProducerDetailsComponent, canDeactivate: [CanDeactivateModalGuard] },
{ path: 'Infosüsteemid/Vaata/:reference/Arutelu/:issue_id', component: ProducerDetailsComponent },
{ path: 'Systems/Vaata/:reference', component: ProducerDetailsComponent },
{ path: 'Kirjelda/Vaata/:reference', component: ProducerDetailsComponent },
{ path: 'Describe/View/:reference', component: ProducerDetailsComponent },
{ path: 'Systems/Vaata/:reference', component: ProducerDetailsComponent, canDeactivate: [CanDeactivateModalGuard] },
{ path: 'Kirjelda/Vaata/:reference', component: ProducerDetailsComponent, canDeactivate: [CanDeactivateModalGuard] },
{ path: 'Describe/View/:reference', component: ProducerDetailsComponent,canDeactivate: [CanDeactivateModalGuard] },
{ path: 'Kirjelda/Muuda/:reference', component: ProducerEditComponent },
{ path: 'Describe/Edit/:reference', component: ProducerEditComponent },
{ path: 'Kirjelda/Uus', component: ProducerAddComponent },
......
......@@ -11,7 +11,7 @@
<p class="text">Aktiivset asutust ja ettevõtet</p>
</div>
<div class="item-single">
<p class="h1">üle 2300</p>
<p class="h1">üle 2600</p>
<p class="text">registreeritud infosüsteemi ja andmekogu</p>
</div>
</div>
......
......@@ -166,7 +166,7 @@ export class GeneralHelperService {
$('html, body').animate({
scrollTop: $(el).offset().top
}, 500);
this.location.replaceState(this.router.url.split('#')[0] + el)
this.location.replaceState(this.location.path().split('#')[0] + el)
}
public adjustSection(hash?){
......
......@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Riigi infosüsteemi haldussüsteem RIHA</title>
<base href="/">
<script src="https://browser.plumbr.io/pa.js" data-plumbr='{"accountId":"3abpe9idtkv5qogsv111qrcl8c","appName":"www_riha_ee", "serverUrl":"https://plumbr.ria.ee"}'></script>
<link rel="icon" type="image/png" href="assets/coat-of-arms-favicon.png">
<link rel="apple-touch-icon" href="assets/apple-touch-coat-of-arms-favicon.png"/>
</head>
......
......@@ -46,7 +46,7 @@ textarea {
.form-control {
box-shadow: 0px 1px 4px 0px rgba($black, 0.1);
font-size: 14px;
height: unset!important;
height: unset;
&:disabled,
&[readonly] {
border-width: 1px;
......
......@@ -5,7 +5,7 @@
<groupId>ee.ria.riha</groupId>
<artifactId>browser</artifactId>
<version>7.6</version>
<version>7.6.2</version>
<packaging>pom</packaging>
<name>RIHA-Browser</name>
......