Merge pull request #7245 from open-craft/studio-home-test
Exfoliate flaky studio home test. (SOL-430)
This commit is contained in:
@@ -86,16 +86,21 @@ class DashboardPage(PageObject):
|
||||
|
||||
def list_libraries(self):
|
||||
"""
|
||||
List all the libraries found on the page's list of libraries.
|
||||
Click the tab to display the available libraries, and return detail of them.
|
||||
"""
|
||||
# Workaround Selenium/Firefox bug: `.text` property is broken on invisible elements
|
||||
self.q(css='#course-index-tabs .libraries-tab a').click()
|
||||
if self.q(css='.list-notices.libraries-tab').present:
|
||||
# No libraries are available.
|
||||
self.wait_for_element_visibility('.libraries-tab .new-library-button', "Switch to library tab")
|
||||
return []
|
||||
div2info = lambda element: {
|
||||
'name': element.find_element_by_css_selector('.course-title').text,
|
||||
'org': element.find_element_by_css_selector('.course-org .value').text,
|
||||
'number': element.find_element_by_css_selector('.course-num .value').text,
|
||||
'url': element.find_element_by_css_selector('a.library-link').get_attribute('href'),
|
||||
}
|
||||
self.wait_for_element_visibility('.libraries li.course-item', "Switch to library tab")
|
||||
return self.q(css='.libraries li.course-item').map(div2info).results
|
||||
|
||||
def has_library(self, **kwargs):
|
||||
|
||||
@@ -24,7 +24,6 @@ class CreateLibraryTest(WebAppTest):
|
||||
self.auth_page = AutoAuthPage(self.browser, staff=True)
|
||||
self.dashboard_page = DashboardPage(self.browser)
|
||||
|
||||
@skip("Flaky test. See SOL-430")
|
||||
def test_create_library(self):
|
||||
"""
|
||||
From the home page:
|
||||
|
||||
Reference in New Issue
Block a user