-
-
Notifications
You must be signed in to change notification settings - Fork 256
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 #432 from bugy/e2e_tests
E2e tests
- Loading branch information
Showing
15 changed files
with
144 additions
and
33 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 |
---|---|---|
|
@@ -77,4 +77,5 @@ web-src/selenium-debug.log | |
web-src/chromedriver.log | ||
web-src/geckodriver.log | ||
|
||
venv/ | ||
venv/ | ||
/venv2/ |
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
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
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,6 @@ | ||
[pytest] | ||
|
||
log_cli = 1 | ||
log_cli_level = INFO | ||
log_cli_format = %(asctime)s %(levelname)8s %(message)s | ||
log_cli_date_format=%Y-%m-%d %H:%M:%S |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from common.pages import Page | ||
import allure | ||
from common.pages import is_displayed | ||
from delayed_assert import expect, assert_expectations | ||
from allure import severity, severity_level | ||
|
||
|
||
subscripts_list = ["Ploty HTML output", "Simple HTML output"] | ||
|
||
@severity(severity_level.NORMAL) | ||
@allure.title("Check presented scripts group 'HTML'") | ||
def test_presented_group_link(browser, config_host): | ||
home_page = Page(browser, config_host) | ||
home_page.load() | ||
|
||
group_link = home_page.get_scripts_group_by_name("HTML") | ||
expect(is_displayed(group_link), "Group 'HTML' link not displayed") | ||
expect(is_displayed(home_page.find_element("i.material-icons", group_link)), "Icon 'Show more' not displayed") | ||
|
||
assert_expectations() | ||
|
||
|
||
@severity(severity_level.NORMAL) | ||
@allure.title("Check subscripts are hide by default") | ||
def test_subscripts_are_hide_by_default(browser, config_host): | ||
home_page = Page(browser, config_host) | ||
home_page.load() | ||
|
||
for subscript in subscripts_list: | ||
expect(not is_displayed(home_page.get_script_link_by_name(subscript)), "Subscript {} is displayed by default".format(subscript)) | ||
|
||
assert_expectations() | ||
|
||
|
||
@severity(severity_level.NORMAL) | ||
@allure.title("Check subscripts are shown after click") | ||
def test_subscripts_are_shown_on_click(browser, config_host): | ||
home_page = Page(browser, config_host) | ||
home_page.load() | ||
|
||
home_page.get_scripts_group_by_name("HTML").click() | ||
|
||
for subscript in subscripts_list: | ||
expect(is_displayed(home_page.get_script_link_by_name(subscript)), "Subscript {} is not displayed after group name click".format(subscript)) | ||
|
||
assert_expectations() |
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
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,12 @@ | ||
#!/bin/bash | ||
|
||
aws s3 sync /tmp/allure_report "s3://script-server-tests/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER" | ||
|
||
allure_url="https://script-server-tests.s3-us-west-2.amazonaws.com/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/index.html" | ||
echo "Test results: $allure_url" | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST \ | ||
-d "{\"body\": \"Test results: $allure_url\"}" \ | ||
"https://api.github.com/repos/${TRAVIS_REPO_SLUG}/issues/${TRAVIS_PULL_REQUEST}/comments" | ||
fi |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
mkdir -p conf/runners | ||
cp samples/configs/* conf/runners/ | ||
|
||
./launcher.py > /dev/null & | ||
SERVER_PID=$! | ||
|
||
set +e | ||
|
||
cd src/e2e_tests | ||
|
||
../../e2e_venv/bin/python -m pytest --alluredir /tmp/allure_result | ||
STATUS=$? | ||
|
||
kill $SERVER_PID | ||
rm -rf conf/runners | ||
|
||
../../web-src/node_modules/allure-commandline/dist/bin/allure generate /tmp/allure_result --clean -o /tmp/allure_report | ||
|
||
exit $STATUS |
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