Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add locator for content_default_http_proxy checkbox on HTTP proxy create page #1636

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airgun/entities/http_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ShowAllHTTPProxy(NavigateStep):

@retry_navigation
def step(self, *args, **kwargs):
self.view.menu.select('Infrastructure', 'HTTP Proxies')
self.view.menu.select('Infrastructure', 'HTTP proxies')


@navigator.register(HTTPProxyEntity, 'New')
Expand Down
13 changes: 7 additions & 6 deletions airgun/views/http_proxy.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from widgetastic.widget import Table, Text, TextInput, View
from widgetastic.widget import Checkbox, Table, Text, TextInput, View
from widgetastic_patternfly import BreadCrumb

from airgun.views.common import BaseLoggedInView, SatTab, SearchableViewMixin
from airgun.widgets import MultiSelect


class HTTPProxyView(BaseLoggedInView, SearchableViewMixin):
title = Text('//*[(self::h1 or self::h5) and normalize-space(.)="HTTP Proxies"]')
new = Text('//a[normalize-space(.)="New HTTP Proxy"]')
title = Text('//*[(self::h1 or self::h5) and normalize-space(.)="HTTP proxies"]')
new = Text('//a[normalize-space(.)="New HTTP proxy"]')
table = Table(
'.//table',
column_widgets={
Expand All @@ -32,8 +32,8 @@ def is_displayed(self):
breadcrumb_loaded = self.browser.wait_for_element(self.breadcrumb, exception=False)
return (
breadcrumb_loaded
and self.breadcrumb.locations[0] == 'HTTP Proxies'
and self.breadcrumb.read() == 'New HTTP Proxy'
and self.breadcrumb.locations[0] == 'HTTP proxies'
and self.breadcrumb.read() == 'New HTTP proxy'
)

@View.nested
Expand All @@ -46,6 +46,7 @@ class http_proxy(SatTab):
password = TextInput(id='http_proxy_password')
test_url = TextInput(id='http_proxy_test_url')
test_connection = Text('//a[@id="test_connection_button"]')
content_default_http_proxy = Checkbox(id='content_default_http_proxy')

@View.nested
class locations(SatTab):
Expand All @@ -62,6 +63,6 @@ def is_displayed(self):
breadcrumb_loaded = self.browser.wait_for_element(self.breadcrumb, exception=False)
return (
breadcrumb_loaded
and self.breadcrumb.locations[0] == 'Http Proxies'
and self.breadcrumb.locations[0] == 'Http proxies'
and self.breadcrumb.read().startswith('Edit ')
)