Skip to content

Commit 73958d8

Browse files
Rewrite of UI framework (#153)
* Initial adaption * More adaption * Minor fix * Minor fix * Fix Tests * Format files and clean up unused ones * Fix some IE and Edge issues * Testrules page fixes and some others * Redraw datatable fix... * Safer redraw fix that doesn't rely on arbitrary delay * Fix InformSubscriber info and some other things * Remove bullets from sub menu lists * Removed medium view that I felt had no purpose * Removed list padding in minimized sidebar * Fix response match in integrationtest * Fix * All menu items are now highlighted by text color * Status code 500 message template are no longer delivered * Spelling error * Sub menus now collapse if any other outside menu item is clicked * No shadow on datatable expand button * Prevent propagation of link event on minimized collapse items * Fix test * Add link redirection prevention on document links * Smaller text on test rules pop up for firefox * Fix touchscreen issues and test rules link * Removed console log * Uniform look on alert and user drop down when alert is empty
1 parent 6feb388 commit 73958d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1866
-4743
lines changed

src/functionaltest/java/com/ericsson/ei/frontend/TestAlarm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ public void testAlarm() throws IOException {
3434
for (int i = 0; i < 5; i++) {
3535
indexPageObject.clickAlarmButton();
3636
}
37-
assertTrue(driver.findElements(By.className("dropdown-item")).size() >= 2);
37+
assertTrue(driver.findElements(By.cssSelector(".alert-list .dropdown-item")).size() >= 2);
3838
}
3939
}

src/functionaltest/java/com/ericsson/ei/frontend/TestSwitchBackend.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ public void testSwitchBackend() throws Exception {
6565
assertEquals("new_instance_subscription", subscriptionPage.getSubscriptionNameFromSubscription());
6666

6767
indexPageObject.clickAdminBackendInstancesBtn();
68-
indexPageObject.clickSwitchBackendButton();
68+
indexPageObject.clickSwitchBackendInstanceBtn();
6969
switchBackendPage.switchToBackendInstance(0);
7070
indexPageObject.clickSubscriptionPage();
7171
assertEquals("default_instance_subscription", subscriptionPage.getSubscriptionNameFromSubscription());
7272

7373
// Test that backend instance can be removed
7474
indexPageObject.clickAdminBackendInstancesBtn();
75-
indexPageObject.clickSwitchBackendButton();
75+
indexPageObject.clickSwitchBackendInstanceBtn();
7676
switchBackendPage.removeInstanceNumber(1);
7777
assertEquals("switchBackendPage.presenceOfInstance returned true when it should have been false", false,
7878
switchBackendPage.presenceOfInstance(1));

src/functionaltest/java/com/ericsson/ei/frontend/pageobjects/IndexPage.java

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ public String getTitle() {
4242
}
4343

4444
public TestRulesPage clickTestRulesPage() throws IOException {
45-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("testRulesBtn")));
46-
WebElement testRulesBtn = driver.findElement(By.id("testRulesBtn"));
45+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#test-rules']")));
46+
WebElement testRulesBtn = driver.findElement(By.xpath("//a[@href='#test-rules']"));
4747
testRulesBtn.click();
4848
TestRulesPage testRulesPage = new TestRulesPage(mockedHttpClient, driver, baseUrl);
4949
waitForJQueryToLoad();
5050
return testRulesPage;
5151
}
5252

5353
public SubscriptionPage clickSubscriptionPage() throws IOException {
54-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("subscriptionBtn")));
55-
WebElement subscriptionBtn = driver.findElement(By.id("subscriptionBtn"));
54+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#subscriptions']")));
55+
WebElement subscriptionBtn = driver.findElement(By.xpath("//a[@href='#subscriptions']"));
5656
subscriptionBtn.click();
5757
SubscriptionPage subscriptionPage = new SubscriptionPage(mockedHttpClient, driver, baseUrl);
5858
waitForJQueryToLoad();
@@ -66,48 +66,41 @@ public void clickReloadButton() throws IOException {
6666

6767

6868
public void clickAdminBackendInstancesBtn() {
69-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("adminBackendInstancesBtn")));
70-
WebElement adminBackendInstancesBtn = driver.findElement(By.id("adminBackendInstancesBtn"));
69+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#confBackend']")));
70+
WebElement adminBackendInstancesBtn = driver.findElement(By.xpath("//a[@href='#confBackend']"));
7171
adminBackendInstancesBtn.click();
7272
}
7373

7474
public AddBackendPage clickAddBackendInstanceBtn() throws IOException {
75-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("addInstanceBtn")));
76-
WebElement addInstanceBtn = driver.findElement(By.id("addInstanceBtn"));
75+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#add-backend']")));
76+
WebElement addInstanceBtn = driver.findElement(By.xpath("//a[@href='#add-backend']"));
7777
addInstanceBtn.click();
7878
AddBackendPage addBackendPage = new AddBackendPage(mockedHttpClient, driver, baseUrl);
7979
waitForJQueryToLoad();
8080
return addBackendPage;
8181
}
8282

8383
public SwitchBackendPage clickSwitchBackendInstanceBtn() throws IOException {
84-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("switcherBtn")));
85-
WebElement addInstanceBtn = driver.findElement(By.id("switcherBtn"));
86-
addInstanceBtn.click();
87-
SwitchBackendPage addBackendPage = new SwitchBackendPage(mockedHttpClient, driver, baseUrl);
84+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#switch-backend']")));
85+
WebElement switchBackendBtn = driver.findElement(By.xpath("//a[@href='#switch-backend']"));
86+
switchBackendBtn.click();
87+
SwitchBackendPage switchBackendPage = new SwitchBackendPage(mockedHttpClient, driver, baseUrl);
8888
waitForJQueryToLoad();
89-
return addBackendPage;
89+
return switchBackendPage;
9090
}
9191

9292
public InfoPage clickEiInfoBtn() {
93-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("eiInfoBtn")));
94-
WebElement eiInfoBtn = driver.findElement(By.id("eiInfoBtn"));
93+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#ei-info']")));
94+
WebElement eiInfoBtn = driver.findElement(By.xpath("//a[@href='#ei-info']"));
9595
eiInfoBtn.click();
9696
InfoPage infoPage = new InfoPage(mockedHttpClient, driver, baseUrl);
9797
waitForJQueryToLoad();
9898
return infoPage;
9999
}
100100

101-
public void clickSwitchBackendButton() {
102-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("switcherBtn")));
103-
WebElement switcherBtn = driver.findElement(By.id("switcherBtn"));
104-
switcherBtn.click();
105-
waitForJQueryToLoad();
106-
}
107-
108101
public void clickAlarmButton(){
109-
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("alertsDropdown")));
110-
WebElement alarmBtn = driver.findElement(By.id("alertsDropdown"));
102+
new WebDriverWait(driver, TIMEOUT_TIMER).until(ExpectedConditions.elementToBeClickable(By.id("alertsLink")));
103+
WebElement alarmBtn = driver.findElement(By.id("alertsLink"));
111104
alarmBtn.click();
112105
waitForJQueryToLoad();
113106
}

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ei.backendInstancesListJsonContent=[{ "contextPath": "", "port": "8090", "name":
2525
ei.eiffelDocumentationUrls={ "EI Frontend GitHub": "https://github.com/eiffel-community/eiffel-intelligence-frontend",\
2626
"EI Backend GitHub": "https://github.com/eiffel-community/eiffel-intelligence",\
2727
"Eiffel Github main page": "https://github.com/eiffel-community/eiffel",\
28-
"Test Rules User Guide": "https://github.com/eiffel-community/eiffel-intelligence-frontend/blob/master/wiki/markdown/Test-Rules.md" }
28+
"Test Rules User Guide": "https://github.com/eiffel-community/eiffel-intelligence-frontend/blob/master/wiki/markdown/test-rules.md" }
2929

3030
#### LOGGING #########
3131
logging.level.root: INFO

src/main/resources/static/assets/js/sb-admin-charts.js

Lines changed: 0 additions & 108 deletions
This file was deleted.

src/main/resources/static/assets/js/sb-admin-charts.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/main/resources/static/assets/js/sb-admin-datatables.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/resources/static/assets/js/sb-admin-datatables.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/main/resources/static/assets/js/sb-admin.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/main/resources/static/assets/js/sb-admin.min.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)