gitea + delete Browsestack
This commit is contained in:
parent
0bf89e85dd
commit
080c51a003
38
BrowserStackJunit/.gitignore
vendored
38
BrowserStackJunit/.gitignore
vendored
@ -1,38 +0,0 @@
|
|||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea/modules.xml
|
|
||||||
.idea/jarRepositories.xml
|
|
||||||
.idea/compiler.xml
|
|
||||||
.idea/libraries/
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### Eclipse ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
||||||
|
|
||||||
### Mac OS ###
|
|
||||||
.DS_Store
|
|
8
BrowserStackJunit/.idea/.gitignore
generated
vendored
8
BrowserStackJunit/.idea/.gitignore
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
7
BrowserStackJunit/.idea/encodings.xml
generated
7
BrowserStackJunit/.idea/encodings.xml
generated
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
14
BrowserStackJunit/.idea/misc.xml
generated
14
BrowserStackJunit/.idea/misc.xml
generated
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
|
||||||
<component name="MavenProjectsManager">
|
|
||||||
<option name="originalFiles">
|
|
||||||
<list>
|
|
||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
|
||||||
</list>
|
|
||||||
</option>
|
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" default="true" project-jdk-name="20" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
6
BrowserStackJunit/.idea/vcs.xml
generated
6
BrowserStackJunit/.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,7 +0,0 @@
|
|||||||
Install:
|
|
||||||
|
|
||||||
Maven build
|
|
||||||
|
|
||||||
Selenide: https://selenide.org/quick-start.html
|
|
||||||
|
|
||||||
Junit5: search Juni t5 --> install Hunit Jupiter API
|
|
@ -1,37 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>cz.kankys</groupId>
|
|
||||||
<artifactId>BrowserStackSelenideJunitKiwi</artifactId>
|
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<name>Archetype - BrowserStackJunit</name>
|
|
||||||
<url>http://maven.apache.org</url>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.codeborne</groupId>
|
|
||||||
<artifactId>selenide</artifactId>
|
|
||||||
<version>6.17.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
|
||||||
<version>5.10.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>3.11.0</version>
|
|
||||||
<configuration>
|
|
||||||
<source>20</source>
|
|
||||||
<target>20</target>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
@ -1,9 +0,0 @@
|
|||||||
<archetype>
|
|
||||||
<id>BrowserStackJunit</id>
|
|
||||||
<sources>
|
|
||||||
<source>src/main/java/App.java</source>
|
|
||||||
</sources>
|
|
||||||
<testSources>
|
|
||||||
<source>src/test/java/AppTest.java</source>
|
|
||||||
</testSources>
|
|
||||||
</archetype>
|
|
@ -1,15 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>$cz.kankys</groupId>
|
|
||||||
<artifactId>$BrowserStackJunit</artifactId>
|
|
||||||
<version>$1.0-SNAPSHOT</version>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
@ -1,13 +0,0 @@
|
|||||||
package $cz.kankys;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hello world!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class App
|
|
||||||
{
|
|
||||||
public static void main( String[] args )
|
|
||||||
{
|
|
||||||
System.out.println( "Hello World!" );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
package $cz.kankys;
|
|
||||||
|
|
||||||
import junit.framework.Test;
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
import junit.framework.TestSuite;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit test for simple App.
|
|
||||||
*/
|
|
||||||
public class AppTest
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create the test case
|
|
||||||
*
|
|
||||||
* @param testName name of the test case
|
|
||||||
*/
|
|
||||||
public AppTest( String testName )
|
|
||||||
{
|
|
||||||
super( testName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the suite of tests being tested
|
|
||||||
*/
|
|
||||||
public static Test suite()
|
|
||||||
{
|
|
||||||
return new TestSuite( AppTest.class );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Rigourous Test :-)
|
|
||||||
*/
|
|
||||||
public void testApp()
|
|
||||||
{
|
|
||||||
assertTrue( true );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package tests;
|
|
||||||
|
|
||||||
import com.codeborne.selenide.WebDriverRunner;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.openqa.selenium.Cookie;
|
|
||||||
|
|
||||||
import static com.codeborne.selenide.Selectors.byAttribute;
|
|
||||||
import static com.codeborne.selenide.Selectors.byXpath;
|
|
||||||
import static com.codeborne.selenide.Selenide.*;
|
|
||||||
|
|
||||||
public class KiwiTest {
|
|
||||||
@Test
|
|
||||||
void itShouldOpenMainPage() {
|
|
||||||
open("https://www.kiwi.com/en");
|
|
||||||
|
|
||||||
// Cookie (org.openqa.selenium), tento způsob nepůjde na všech webech. Všude to je jinde
|
|
||||||
//cookie_consent, agreed --> takto si to pojmenovalo kiwi
|
|
||||||
// nakonec za komentovaný způsob nešel použil jsem xpath
|
|
||||||
/*
|
|
||||||
Cookie cookie = new Cookie("cookie_consent", "agreed");
|
|
||||||
WebDriverRunner.getWebDriver().manage().addCookie(cookie);
|
|
||||||
//refresh();
|
|
||||||
*/
|
|
||||||
|
|
||||||
$(byXpath("//*[@id=\"cookies_accept\"]")).click();
|
|
||||||
$(byAttribute("data-test" ,"LandingSearchButton")).click();
|
|
||||||
System.out.println("");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package tests;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
import static com.codeborne.selenide.Selectors.byAttribute;
|
|
||||||
import static com.codeborne.selenide.Selectors.byXpath;
|
|
||||||
import static com.codeborne.selenide.Selenide.$;
|
|
||||||
import static com.codeborne.selenide.Selenide.open;
|
|
||||||
|
|
||||||
public class OveritCenuLetenkyTest {
|
|
||||||
@Test
|
|
||||||
void OverimeCenuLetenky() {
|
|
||||||
// jdeme na web kiwi
|
|
||||||
open("https://www.kiwi.com/cz/");
|
|
||||||
// potvrdíme cooki
|
|
||||||
$(byXpath("//*[@id=\"cookies_accept\"]")).click();
|
|
||||||
// kliknu na hlavni strane na prozkoumat
|
|
||||||
$(byAttribute("data-test" ,"LandingSearchButton")).click();
|
|
||||||
// kliknu na prvni nabídku na strance
|
|
||||||
$(byAttribute("data-test" ,"PictureCardContent")).click();
|
|
||||||
// pockam na nactení letenek
|
|
||||||
// ulozim si cenu letenky do promenne
|
|
||||||
// otevrem detail letenky a porovnam cenu
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,11 +8,13 @@ import static com.codeborne.selenide.Selenide.*;
|
|||||||
import static org.testng.AssertJUnit.assertEquals;
|
import static org.testng.AssertJUnit.assertEquals;
|
||||||
|
|
||||||
public class HomePage {
|
public class HomePage {
|
||||||
public HomePage open() {
|
public HomePage open()
|
||||||
|
{
|
||||||
Selenide.open("https://lukan.cz");
|
Selenide.open("https://lukan.cz");
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
public HomePage titulek() {
|
public HomePage titulek()
|
||||||
|
{
|
||||||
String title = title();
|
String title = title();
|
||||||
assertEquals(title, "Lukáš bloguje - Blog o všem možném i nemožném");
|
assertEquals(title, "Lukáš bloguje - Blog o všem možném i nemožném");
|
||||||
return this;
|
return this;
|
||||||
|
Loading…
Reference in New Issue
Block a user