forked from HyperIoT-Labs/HyperIoT-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added files to run tests with karate UI
- Loading branch information
1 parent
77007ee
commit c2c0a72
Showing
4 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/.gradle/ | ||
**/.idea/** | ||
/gradle/wrapper/ | ||
/target/** | ||
/.gradle/ | ||
/.idea/ | ||
/build/ | ||
/gradle/ | ||
/gradlew | ||
/gradlew.bat |
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,28 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
group 'it.hyperiot.test' | ||
version '1.0-SNAPSHOT' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation 'com.intuit.karate:karate-junit5:1.3.0' | ||
|
||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
sourceSets { | ||
test { | ||
resources { | ||
srcDir file('src/test/java') | ||
exclude '**/*.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,2 @@ | ||
rootProject.name = 'HYTFrontEndTest' | ||
|
22 changes: 22 additions & 0 deletions
22
test/HYTFrontEndTest/src/test/java/it/hyperiot/test/frontend-login.feature
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,22 @@ | ||
Feature: Backoffice login | ||
|
||
Background: | ||
* configure driver = { type: 'chrome'} | ||
* def portalUrl = 'https://dashboard-test.hyperiot.cloud' | ||
# * configure driverTarget = { docker: 'justinribeiro/chrome-headless', showDriverLog: true } | ||
# * configure driverTarget = { docker: 'ptrthomas/karate-chrome', showDriverLog: true } | ||
# * configure driver = { type: 'chromedriver', showDriverLog: true } | ||
# * configure driver = { type: 'geckodriver', showDriverLog: true } | ||
# * configure driver = { type: 'safaridriver', showDriverLog: true } | ||
# * configure driver = { type: 'iedriver', showDriverLog: true, httpConfig: { readTimeout: 120000 } } | ||
|
||
Scenario: Login come utente backoffice e popolamento cookie | ||
|
||
Given driver portalUrl+'/auth/login' | ||
And waitUntil("document.readyState == 'complete'") | ||
And value('input#mat-input-0', '') | ||
And input('input#mat-input-0', 'hadmin', 200) | ||
And input('input#mat-input-1', 'admin', 200) | ||
When input('input#mat-input-1', [Key.ENTER],1000) | ||
Then waitForUrl('https://dashboard-test.hyperiot.cloud/') | ||
And match text('h3#welcome-title') == 'Welcome to HyperIoT' |