-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from selinanatschke-mms/add_video_tab
Add video tab
- Loading branch information
Showing
23 changed files
with
457 additions
and
83 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
54 changes: 54 additions & 0 deletions
54
...tests/src/main/java/io/testerra/report/test/pages/report/methodReport/ReportVideoTab.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Testerra | ||
* | ||
* (C) 2024, Selina Natschke, T-Systems Multimedia Solutions GmbH, Deutsche Telekom AG | ||
* | ||
* Deutsche Telekom AG and all other contributors / | ||
* copyright owners license this file to you under the Apache | ||
* License, Version 2.0 (the "License"); you may not use this | ||
* file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
*/ | ||
|
||
package io.testerra.report.test.pages.report.methodReport; | ||
|
||
|
||
import eu.tsystems.mms.tic.testframework.pageobjects.Check; | ||
import eu.tsystems.mms.tic.testframework.pageobjects.UiElement; | ||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebDriver; | ||
|
||
public class ReportVideoTab extends AbstractReportMethodPage { | ||
|
||
@Check | ||
private final UiElement videoCard = tabPagesContent.find(By.tagName("mdc-card")); | ||
private final UiElement headline = videoCard.find(By.xpath("//*[contains(@class, 'card-headline') and contains(text(),'Session')]")); | ||
@Check | ||
private final UiElement id = videoCard.find(By.xpath("//a[contains(@href, 'browser-info')]")); | ||
@Check | ||
private final UiElement browser = videoCard.find(By.xpath("//li[./span[contains(text(), 'Browser')]]")); | ||
@Check | ||
private final UiElement video = videoCard.find(By.xpath("//video")); | ||
|
||
public ReportVideoTab(WebDriver driver) { | ||
super(driver); | ||
} | ||
|
||
public void validateBrowser(String browser) { | ||
this.browser.assertThat().text().isContaining(browser); | ||
} | ||
|
||
public void checkFirstId(String sessionId){ | ||
this.id.assertThat().text().isContaining(sessionId); | ||
} | ||
} |
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
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
61 changes: 61 additions & 0 deletions
61
...sts/src/test/java/io/testerra/report/test/report_test/methodpages/ReportVideoTabTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Testerra | ||
* | ||
* (C) 2024, Selina Natschke, T-Systems Multimedia Solutions GmbH, Deutsche Telekom AG | ||
* | ||
* Deutsche Telekom AG and all other contributors / | ||
* copyright owners license this file to you under the Apache | ||
* License, Version 2.0 (the "License"); you may not use this | ||
* file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
*/ | ||
|
||
package io.testerra.report.test.report_test.methodpages; | ||
|
||
import eu.tsystems.mms.tic.testframework.pageobjects.TestableUiElement; | ||
import eu.tsystems.mms.tic.testframework.report.model.steps.TestStep; | ||
import io.testerra.report.test.AbstractReportTest; | ||
import io.testerra.report.test.pages.ReportSidebarPageType; | ||
import io.testerra.report.test.pages.report.methodReport.ReportBrowserInfoTab; | ||
import io.testerra.report.test.pages.report.methodReport.ReportStepsTab; | ||
import io.testerra.report.test.pages.report.methodReport.ReportVideoTab; | ||
import io.testerra.report.test.pages.report.sideBarPages.ReportDashBoardPage; | ||
import io.testerra.report.test.pages.report.sideBarPages.ReportTestsPage; | ||
import org.testng.annotations.Test; | ||
|
||
public class ReportVideoTabTest extends AbstractReportTest { | ||
|
||
@Test | ||
public void testT01_checkDisplayedVideoGotContent() { | ||
String preTestWithVideoTab = "preTest10_videoTest_passed"; | ||
String usedBrowser = "Chrome"; | ||
|
||
TestStep.begin("Navigate to dashboard page."); | ||
ReportDashBoardPage reportDashBoardPage = this.gotoDashBoardOnAdditionalReport(WEB_DRIVER_MANAGER.getWebDriver()); | ||
|
||
TestStep.begin("Navigate to tests page."); | ||
ReportTestsPage reportTestsPage = reportDashBoardPage.gotoToReportPage(ReportSidebarPageType.TESTS, ReportTestsPage.class); | ||
|
||
TestStep.begin("Navigate to method browser info page and check for correct content"); | ||
reportTestsPage = reportTestsPage.clickConfigurationMethodsSwitch(); | ||
ReportStepsTab reportStepsTab = reportTestsPage.navigateToStepsTab(preTestWithVideoTab); | ||
|
||
ReportBrowserInfoTab browserInfoTab = reportStepsTab.navigateToBrowserInfoTab(); | ||
TestableUiElement sessionIdElement = browserInfoTab.getSessionIdElement(); | ||
String sessionIdString = sessionIdElement.assertThat().text().getActual(); | ||
ReportVideoTab reportVideoTab = browserInfoTab.navigateToVideoTab(); | ||
|
||
reportVideoTab.checkFirstId(sessionIdString); | ||
reportVideoTab.validateBrowser(usedBrowser); | ||
} | ||
} |
82 changes: 82 additions & 0 deletions
82
report-ng/app/src/components/method-details/browser-info.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!-- | ||
~ Testerra | ||
~ | ||
~ (C) 2020, Mike Reiche, T-Systems Multimedia Solutions GmbH, Deutsche Telekom AG | ||
~ | ||
~ Deutsche Telekom AG and all other contributors / | ||
~ copyright owners license this file to you under the Apache | ||
~ License, Version 2.0 (the "License"); you may not use this | ||
~ file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, | ||
~ software distributed under the License is distributed on an | ||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
~ KIND, either express or implied. See the License for the | ||
~ specific language governing permissions and limitations | ||
~ under the License. | ||
--> | ||
|
||
<template> | ||
<mdc-layout-grid class="pt0"> | ||
<mdc-card class="mb1" repeat.for="session of _sessionInformationArray" mdc-body1 id="${session.sessionId}"> | ||
<div mdc-subtitle2 class="card-headline">Session: ${session.sessionName}</div> | ||
<mdc-list-divider></mdc-list-divider> | ||
<div class="card-content"> | ||
<mdc-layout-grid-inner> | ||
<mdc-layout-grid-cell span="6"> | ||
<ul class="mdc-list mdc-list--dense" mdc-caption> | ||
<div mdc-subtitle2>General information</div> | ||
<li class="mdc-custom-list-item"> | ||
<span class="secondary sr1">ID</span><span>${session.sessionId}</span> | ||
</li> | ||
<li class="mdc-custom-list-item"> | ||
<span class="secondary sr1">Browser</span>${session.browserName}:${session.browserVersion} | ||
</li> | ||
<li class="mdc-custom-list-item"> | ||
<span class="secondary sr1">User agent</span>${session.userAgent} | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.serverUrl.length>0"> | ||
<span class="secondary sr1">Server</span><a href="${session.serverUrl}">${session.serverUrl}</a> | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.nodeUrl.length>0"> | ||
<span class="secondary sr1">Node</span><a href="${session.nodeUrl}">${session.nodeUrl}</a> | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.videoId"> | ||
<span class="secondary sr1">Video ID</span><a route-href="route: video; params.bind: {id: session.sessionId}">${session.videoId}</a> | ||
</li> | ||
|
||
<div mdc-subtitle2 class="mt1">Session metrics</div> | ||
<li class="mdc-custom-list-item" if.bind="session.sessionDuration>0"> | ||
<span class="secondary sr1">Session duration</span>${session.sessionDuration}s | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.sessionStartDuration>0"> | ||
<span class="secondary sr1">Session start duration</span>${session.sessionStartDuration}s | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.sessionStartTime>0"> | ||
<span class="secondary sr1">Session start time</span>${session.sessionStartTime|dateFormat} | ||
</li> | ||
|
||
<div mdc-subtitle2 class="mt1" if.bind="session.baseUrl">Base URL metrics</div> | ||
<li class="mdc-custom-list-item" if.bind="session.baseUrl"> | ||
<span class="secondary sr1">Base URL</span><a href="${session.baseUrl}">${session.baseUrl}</a> | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.baseurlStartDuration>0"> | ||
<span class="secondary sr1">Base URL start duration</span>${session.baseurlStartDuration}s | ||
</li> | ||
<li class="mdc-custom-list-item" if.bind="session.baseurlStartTime>0"> | ||
<span class="secondary sr1">Base URL start time</span>${session.baseurlStartTime|dateFormat} | ||
</li> | ||
</ul> | ||
</mdc-layout-grid-cell> | ||
<mdc-layout-grid-cell span="6"> | ||
<div mdc-subtitle2>Capabilities</div> | ||
<div class="code-view capabilities-view">${session.capabilities|json}</div> | ||
</mdc-layout-grid-cell> | ||
</mdc-layout-grid-inner> | ||
</div> | ||
</mdc-card> | ||
</mdc-layout-grid> | ||
</template> |
File renamed without changes.
Oops, something went wrong.