Commit 88d31df6 authored by Kristjan Kruus's avatar Kristjan Kruus
Browse files

Pull request #111: Develop

Merge in RIHA/riha-browser from develop to release

* commit 'c212c403': (23 commits)
  package.json edited online with Bitbucket
  test
  testing
  added phantomjs-prebuilt to global package
  changed all dependencies to local repo
  Phantomjs to local repo
  Version up, dependency updates.
  revert truststore use
  setting truststore on load
  STARTTLS fix
  Updated repository
  removed typeo
  typeo fix
  removed text from frontpage card component
  page-not-found clarifications
  edited homepage numbers
  changed page-not-found component
  plumbr removed
  version up
  Version up
  ...
parents e4d0d0ca c212c403
......@@ -11,7 +11,7 @@
<parent>
<artifactId>browser</artifactId>
<groupId>ee.ria.riha</groupId>
<version>7.7.3</version>
<version>7.7.5</version>
</parent>
<properties>
......
......@@ -18,6 +18,7 @@ import java.util.stream.*;
import static ee.ria.riha.Timeouts.*;
import static ee.ria.riha.context.ScenarioContext.*;
import static ee.ria.riha.util.Utils.*;
import static org.openqa.selenium.Keys.*;
public class InfosystemPage extends BasePage {
......@@ -234,8 +235,9 @@ public class InfosystemPage extends BasePage {
}
public boolean isUploadedDateDisplayedOnTheLastUploadedDocument() {
wait.sleep(3000);
wait.forElementToBeDisplayed(DISPLAY_ELEMENT_TIMEOUT, documentationSection, "documentationSection");
wait.sleep(3000);
//sort by the end date desc
driver.findElement(By.cssSelector("app-producer-details-tech-docs:nth-child(1) th:nth-child(3) .btn:nth-child(1)")).click();
wait.sleep(1000);
......@@ -446,7 +448,7 @@ public class InfosystemPage extends BasePage {
WebElement linkTypeElement = modalContainer.findElement(By.id("linkType"));
linkTypeElement.click();
new Select(linkTypeElement).selectByValue("DOC_TYPE_OTHER");
modifiedSelectByValue(new Select(linkTypeElement), "DOC_TYPE_OTHER");
modalContainer.findElement(By.cssSelector(".col-12 > .btn")).click();
modalContainer.findElement(By.cssSelector(".btn-success")).click();
......@@ -457,7 +459,7 @@ public class InfosystemPage extends BasePage {
WebElement linkTypeElement = modalContainer.findElement(By.id("fileType"));
linkTypeElement.click();
new Select(linkTypeElement).selectByValue("DOC_TYPE_ISKE_ACT");
modifiedSelectByValue(new Select(linkTypeElement), "DOC_TYPE_ISKE_ACT");
//upload test data file
makeElementVisible("dataFile");
......@@ -483,7 +485,7 @@ public class InfosystemPage extends BasePage {
modalContainer.findElement(By.id("name")).sendKeys(title);
WebElement legalTypeSelect = modalContainer.findElement(By.id("type"));
legalTypeSelect.click();
new Select(legalTypeSelect).selectByValue("LEGAL_TYPE_STATUTE");
modifiedSelectByValue(new Select(legalTypeSelect), "LEGAL_TYPE_STATUTE");
modalContainer.findElement(By.cssSelector(".col-12 > .btn")).click();
modalContainer.findElement(By.cssSelector(".btn-success")).click();
}
......@@ -603,7 +605,7 @@ public class InfosystemPage extends BasePage {
public void selectAssociationTypeAndSave() {
this.associationTypeDropDown.click();
new Select(associationTypeDropDown).selectByValue("SUB_SYSTEM");
modifiedSelectByValue(new Select(associationTypeDropDown), "SUB_SYSTEM");
this.saveNewAssociation.click();
}
......
package ee.ria.riha.util;
import java.io.File;
import org.openqa.selenium.*;
import org.openqa.selenium.support.ui.*;
import java.io.*;
public class Utils {
public static final String RESOURCES_PATH = "/src/test/resources/";
......@@ -8,4 +11,12 @@ public class Utils {
public static String getFileResourcePath(File file) {
return file.getAbsoluteFile().getParent() + RESOURCES_PATH + file.getName();
}
public static void modifiedSelectByValue(Select select, String valueToSelect) {
WebElement optionToSelect = select.getOptions()
.stream()
.filter(webElement -> webElement.getAttribute("value")
.endsWith(valueToSelect)).findFirst().orElseThrow(IllegalStateException::new);
select.selectByValue(optionToSelect.getAttribute("value"));
}
}
......@@ -12,7 +12,7 @@
<parent>
<groupId>ee.ria.riha</groupId>
<artifactId>browser</artifactId>
<version>7.7.3</version>
<version>7.7.5</version>
</parent>
<dependencies>
......
{
"name": "riha",
"version": "7.7.3",
"version": "7.7.5",
"license": "MIT",
"scripts": {
"static": "static ../main/resources --port 8085",
......@@ -16,16 +16,16 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^10.0.14",
"@angular/common": "^10.0.14",
"@angular/compiler": "^10.0.14",
"@angular/core": "^10.0.14",
"@angular/forms": "^10.0.14",
"@angular/localize": "^10.0.14",
"@angular/platform-browser": "^10.0.14",
"@angular/platform-browser-dynamic": "^10.0.14",
"@angular/platform-server": "^10.0.14",
"@angular/router": "^10.0.14",
"@angular/animations": "^11.0.5",
"@angular/common": "^11.0.5",
"@angular/compiler": "^11.0.5",
"@angular/core": "^11.0.5",
"@angular/forms": "^11.0.5",
"@angular/localize": "^11.0.5",
"@angular/platform-browser": "^11.0.5",
"@angular/platform-browser-dynamic": "^11.0.5",
"@angular/platform-server": "^11.0.5",
"@angular/router": "^11.0.5",
"@ng-bootstrap/ng-bootstrap": "^5.1.0",
"@ngx-translate/core": "12.1.2",
"@ngx-translate/http-loader": "^4.0",
......@@ -43,15 +43,16 @@
"ngx-custom-validators": "^8.0.0",
"ngx-toastr": "11.3.3",
"ngx-ui-switch": "^8.2.0",
"phantomjs-prebuilt": "^2.1.7",
"poor-mans-proxy": "1.0.0",
"rxjs": "^6.5.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.8",
"@angular/cli": "^10.0.8",
"@angular/compiler-cli": "^10.0.14",
"@angular-devkit/build-angular": "^0.1100.5",
"@angular/cli": "^11.0.5",
"@angular/compiler-cli": "^11.0.5",
"@types/jasmine": "^3.4.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
......@@ -68,6 +69,6 @@
"protractor": "~7.0.0",
"ts-node": "8.10.1",
"tslint": "~6.1.0",
"typescript": "3.9.7"
"typescript": "4.0.5"
}
}
......@@ -10,7 +10,7 @@
<parent>
<groupId>ee.ria.riha</groupId>
<artifactId>browser</artifactId>
<version>7.7.3</version>
<version>7.7.5</version>
</parent>
<properties>
......@@ -112,7 +112,7 @@
</execution>
</executions>
<configuration>
s <nodeVersion>v12.18.3</nodeVersion>
<nodeVersion>v12.18.3</nodeVersion>
<yarnVersion>v1.22.4</yarnVersion>
<npmVersion>6.11.3</npmVersion>
<workingDirectory>.</workingDirectory>
......
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import {TranslateModule, TranslateLoader} from '@ngx-translate/core';
import {TranslateService, LangChangeEvent} from '@ngx-translate/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {LangChangeEvent, TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
import {HttpClient, HttpClientModule} from '@angular/common/http';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import {MissingTranslationHandler} from '@ngx-translate/core';
import {DebugElement} from '@angular/core';
import { AppComponent} from './app.component';
import {AppComponent} from './app.component';
import missingTranslationHandler from './app.missingTranslation';
export function HttpLoaderFactory(http: HttpClient) {
......
......@@ -200,7 +200,7 @@ const routes: Routes = [
TagInputModule,
BrowserAnimationsModule,
CustomFormsModule,
RouterModule.forRoot(routes),
RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }),
UiSwitchModule,
ToastrModule.forRoot(),
TranslateModule.forRoot({
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ActiveOrganizationChooserComponent } from './active-organization-chooser.component';
import {ActiveOrganizationChooserComponent} from './active-organization-chooser.component';
describe('ActiveOrganizationChooserComponent', () => {
let component: ActiveOrganizationChooserComponent;
let fixture: ComponentFixture<ActiveOrganizationChooserComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ActiveOrganizationChooserComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { AlertComponent } from './alert.component';
import {AlertComponent} from './alert.component';
describe('AlertComponent', () => {
let component: AlertComponent;
let fixture: ComponentFixture<AlertComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ AlertComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ApproverAddIssueComponent } from './approver-add-issue.component';
import {ApproverAddIssueComponent} from './approver-add-issue.component';
describe('ApproverAddIssueComponent', () => {
let component: ApproverAddIssueComponent;
let fixture: ComponentFixture<ApproverAddIssueComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ApproverAddIssueComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ActiveDiscussionsComponent } from './active-discussions.component';
import {ActiveDiscussionsComponent} from './active-discussions.component';
describe('ActiveDiscussionsComponent', () => {
let component: ActiveDiscussionsComponent;
let fixture: ComponentFixture<ActiveDiscussionsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ActiveDiscussionsComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { DiscussionsListComponent } from './discussions-list.component';
import {DiscussionsListComponent} from './discussions-list.component';
describe('DiscussionsListComponent', () => {
let component: DiscussionsListComponent;
let fixture: ComponentFixture<DiscussionsListComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ DiscussionsListComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ApproverDashboardComponent } from './approver-dashboard.component';
import {ApproverDashboardComponent} from './approver-dashboard.component';
describe('ApproverDashboardComponent', () => {
let component: ApproverDashboardComponent;
let fixture: ComponentFixture<ApproverDashboardComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ApproverDashboardComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { SystemsForApprovalListComponent } from './systems-for-approval-list.component';
import {SystemsForApprovalListComponent} from './systems-for-approval-list.component';
describe('SystemsForApprovalListComponent', () => {
let component: SystemsForApprovalListComponent;
let fixture: ComponentFixture<SystemsForApprovalListComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SystemsForApprovalListComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ApproverIssueDetailsComponent } from './approver-issue-details.component';
import {ApproverIssueDetailsComponent} from './approver-issue-details.component';
describe('ApproverIssueDetailsComponent', () => {
let component: ApproverIssueDetailsComponent;
let fixture: ComponentFixture<ApproverIssueDetailsComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ApproverIssueDetailsComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { ApproverSystemCheckComponent } from './approver-system-check.component';
import {ApproverSystemCheckComponent} from './approver-system-check.component';
describe('ApproverSystemCheckComponent', () => {
let component: ApproverSystemCheckComponent;
let fixture: ComponentFixture<ApproverSystemCheckComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ApproverSystemCheckComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { CheckResultRowComponent } from './check-result-row.component';
import {CheckResultRowComponent} from './check-result-row.component';
describe('CheckResultRowComponent', () => {
let component: CheckResultRowComponent;
let fixture: ComponentFixture<CheckResultRowComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ CheckResultRowComponent ]
})
......
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import { BrowserFilesListComponent } from './browser-files-list.component';
import {BrowserFilesListComponent} from './browser-files-list.component';
describe('BrowserFilesListComponent', () => {
let component: BrowserFilesListComponent;
let fixture: ComponentFixture<BrowserFilesListComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ BrowserFilesListComponent ]
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment