|
|
|
@ -18,7 +18,6 @@ package org.thingsboard.server.msa.ui.base; |
|
|
|
import io.github.bonigarcia.wdm.WebDriverManager; |
|
|
|
import io.qameta.allure.Allure; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.openqa.selenium.By; |
|
|
|
import org.openqa.selenium.Dimension; |
|
|
|
import org.openqa.selenium.JavascriptExecutor; |
|
|
|
import org.openqa.selenium.OutputType; |
|
|
|
@ -48,7 +47,6 @@ import java.io.ByteArrayInputStream; |
|
|
|
import java.net.MalformedURLException; |
|
|
|
import java.net.URL; |
|
|
|
import java.time.Duration; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static org.thingsboard.server.msa.TestProperties.getBaseUiUrl; |
|
|
|
@ -87,7 +85,7 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest { |
|
|
|
|
|
|
|
@BeforeMethod |
|
|
|
public void open() { |
|
|
|
openHomePage(); |
|
|
|
openLocalhost(); |
|
|
|
} |
|
|
|
|
|
|
|
@AfterMethod |
|
|
|
@ -101,12 +99,13 @@ abstract public class AbstractDriverBaseTest extends AbstractContainerTest { |
|
|
|
driver.quit(); |
|
|
|
} |
|
|
|
|
|
|
|
public void openLocalhost() { |
|
|
|
driver.get(getBaseUiUrl()); |
|
|
|
public String getJwtTokenFromLocalStorage() { |
|
|
|
js = (JavascriptExecutor) driver; |
|
|
|
return (String) js.executeScript("return window.localStorage.getItem('jwt_token');"); |
|
|
|
} |
|
|
|
|
|
|
|
public void openHomePage() { |
|
|
|
driver.get(getBaseUiUrl() + "/home"); |
|
|
|
public void openLocalhost() { |
|
|
|
driver.get(getBaseUiUrl()); |
|
|
|
} |
|
|
|
|
|
|
|
public String getUrl() { |
|
|
|
|