use click on create run button instead of opening page by direct link
This commit is contained in:
Родитель
fc55867c4a
Коммит
b953984b90
|
@ -14,6 +14,7 @@ class MozTrapManageRunsPage(MozTrapBasePage):
|
|||
|
||||
_page_title = 'Manage-Runs'
|
||||
|
||||
_create_run_locator = (By.CSS_SELECTOR, '#manageruns .create.single')
|
||||
_delete_run_locator = (By.CSS_SELECTOR, '#manageruns .itemlist .listitem[data-title="%(run_name)s"] .action-delete')
|
||||
_run_activate_locator = (By.CSS_SELECTOR, '#manageruns .itemlist .listitem[data-title="%(run_name)s"] .status-action.active')
|
||||
_run_status_locator = (By.CSS_SELECTOR, '#manageruns .itemlist .listitem[data-title="%(run_name)s"] .status-title')
|
||||
|
@ -32,6 +33,11 @@ class MozTrapManageRunsPage(MozTrapBasePage):
|
|||
self.selenium.get(self.base_url + '/manage/runs/')
|
||||
self.is_the_current_page
|
||||
|
||||
def click_create_run_button(self):
|
||||
self.selenium.find_element(*self._create_run_locator).click()
|
||||
from pages.create_run_page import MozTrapCreateRunPage
|
||||
return MozTrapCreateRunPage(self.testsetup)
|
||||
|
||||
def delete_run(self, name='Test Run'):
|
||||
_delete_locator = (self._delete_run_locator[0], self._delete_run_locator[1] % {'run_name': name})
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@ class TestPinningFilters(BaseTest):
|
|||
manage_runs_pg.pinned_filter_color.upper(),
|
||||
u'#DFB081')
|
||||
|
||||
create_run_pg = MozTrapCreateRunPage(mozwebqa_logged_in)
|
||||
create_run_pg.go_to_create_run_page()
|
||||
create_run_pg = manage_runs_pg.click_create_run_button()
|
||||
|
||||
Assert.equal(
|
||||
create_run_pg.product_version,
|
||||
|
|
Загрузка…
Ссылка в новой задаче