summaryrefslogtreecommitdiff
path: root/tests/functional/features/steps/vpn.py
blob: 056b2cdfd16f883f3aff8ad851d09e6320337fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from behave import when, then
from common import (
    click_button,
    wait_until_button_is_visible,
    find_element_containing_text
)
from selenium.common.exceptions import TimeoutException


@when('I activate VPN')
def activate_vpn(context):
    try:
        click_button(context, 'Install Helper Files')
    except TimeoutException:
        pass
    click_button(context, 'Turn ON')


@then('I should have my ass covered')
def assert_vpn(context):
    wait_until_button_is_visible(context, 'Turn OFF')
    assert find_element_containing_text(context, 'Turn OFF', 'button')