Skip to content

Commit

Permalink
Merge pull request #11618 from edx/benp/library-test-flaky-fix
Browse files Browse the repository at this point in the history
Ensure test waits for the library list to populate before continuing.
  • Loading branch information
Ben Patterson committed Feb 23, 2016
2 parents acf6c1d + 3afc2a9 commit a11ca6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/test/acceptance/tests/studio/test_studio_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
from bok_choy.web_app_test import WebAppTest
from opaque_keys.edx.locator import LibraryLocator
from uuid import uuid4

from ...fixtures import PROGRAMS_STUB_URL
from ...fixtures.config import ConfigModelFixture
Expand Down Expand Up @@ -41,12 +42,14 @@ def test_create_library(self):
Return to the home page
The newly created library should now appear in the list of libraries
"""
name = "New Library Name"
org = "TestOrgX"
number = "TESTLIB"
unique_suffix = uuid4().hex[:4]
name = "New Library Name " + unique_suffix
org = "TestOrgX" + unique_suffix
number = "TESTLIB_" + unique_suffix

self.auth_page.visit()
self.dashboard_page.visit()
self.dashboard_page.wait_for_element_visibility('.content-primary', 'See library list.')
self.assertFalse(self.dashboard_page.has_library(name=name, org=org, number=number))
self.assertTrue(self.dashboard_page.has_new_library_button())

Expand Down

0 comments on commit a11ca6c

Please sign in to comment.