forked from SatelliteQE/airgun
-
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.
Add support for getting documentaion related urls from Satellite page
- Loading branch information
1 parent
adffe5c
commit 5d77ac1
Showing
7 changed files
with
127 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,19 @@ | ||
from airgun.entities.base import BaseEntity | ||
from airgun.navigation import NavigateStep, navigator | ||
from airgun.utils import retry_navigation | ||
from airgun.views.about import AboutView | ||
|
||
|
||
class AboutEntity(BaseEntity): | ||
endpoint_path = '/about' | ||
|
||
|
||
@navigator.register(AboutEntity, 'All') | ||
class ShowAboutPage(NavigateStep): | ||
"""Navigate to About page.""" | ||
|
||
VIEW = AboutView | ||
|
||
@retry_navigation | ||
def step(self, *args, **kwargs): | ||
self.view.menu.select('Administer', 'About') |
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,19 @@ | ||
from airgun.entities.base import BaseEntity | ||
from airgun.navigation import NavigateStep, navigator | ||
from airgun.utils import retry_navigation | ||
from airgun.views.fact import HostFactView | ||
|
||
|
||
class FactValueEntity(BaseEntity): | ||
endpoint_path = '/fact_values' | ||
|
||
|
||
@navigator.register(FactValueEntity, 'All') | ||
class ShowFactValuePage(NavigateStep): | ||
"""Navigate to Fact Values page.""" | ||
|
||
VIEW = HostFactView | ||
|
||
@retry_navigation | ||
def step(self, *args, **kwargs): | ||
self.view.menu.select('Monitor', 'Facts') |
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,19 @@ | ||
from airgun.entities.base import BaseEntity | ||
from airgun.navigation import NavigateStep, navigator | ||
from airgun.utils import retry_navigation | ||
from airgun.views.global_parameter import GlobalParameterView | ||
|
||
|
||
class GlobalParameterEntity(BaseEntity): | ||
endpoint_path = '/common_parameters' | ||
|
||
|
||
@navigator.register(GlobalParameterEntity, 'All') | ||
class ShowGlobalParameters(NavigateStep): | ||
"""Navigate to Global Parameters page.""" | ||
|
||
VIEW = GlobalParameterView | ||
|
||
@retry_navigation | ||
def step(self, *args, **kwargs): | ||
self.view.menu.select('Configure', 'Global Parameters') |
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,11 @@ | ||
from widgetastic.widget import Text | ||
|
||
from airgun.views.common import BaseLoggedInView, SearchableViewMixinPF4 | ||
|
||
|
||
class AboutView(BaseLoggedInView, SearchableViewMixinPF4): | ||
title = Text("//h1[normalize-space(.)='About']") | ||
|
||
@property | ||
def is_displayed(self): | ||
return self.browser.wait_for_element(self.title, exception=False) is not None |
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,11 @@ | ||
from widgetastic.widget import Text | ||
|
||
from airgun.views.common import BaseLoggedInView, SearchableViewMixinPF4 | ||
|
||
|
||
class GlobalParameterView(BaseLoggedInView, SearchableViewMixinPF4): | ||
title = Text("//h1[normalize-space(.)='Global Parameters']") | ||
|
||
@property | ||
def is_displayed(self): | ||
return self.browser.wait_for_element(self.title, exception=False) is not None |