From 9f6454411e03481689cf6228c84a72c42f8d0abd Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Tue, 23 Sep 2014 10:30:55 -0400 Subject: [PATCH] Update tests for changed text --- common/test/acceptance/pages/lms/dashboard.py | 4 ++-- common/test/acceptance/tests/test_lms.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/test/acceptance/pages/lms/dashboard.py b/common/test/acceptance/pages/lms/dashboard.py index fda5f84f3a..e8151ffa52 100644 --- a/common/test/acceptance/pages/lms/dashboard.py +++ b/common/test/acceptance/pages/lms/dashboard.py @@ -20,8 +20,8 @@ class DashboardPage(PageObject): return self.q(css='section.my-courses').present @property - def current_courses_text(self): - text_items = self.q(css='section#my-courses').text + def courses_text(self): + text_items = self.q(css='section#my-courses span.my-courses-title-label').text if len(text_items) > 0: return text_items[0] else: diff --git a/common/test/acceptance/tests/test_lms.py b/common/test/acceptance/tests/test_lms.py index 2cf870a798..fba6bbbcc5 100644 --- a/common/test/acceptance/tests/test_lms.py +++ b/common/test/acceptance/tests/test_lms.py @@ -77,10 +77,10 @@ class LanguageTest(UniqueCourseTest): self.dashboard_page = DashboardPage(self.browser) self.test_new_lang = 'eo' - # This string is unicode for "ÇÜRRÉNT ÇØÜRSÉS", which should appear in our Dummy Esperanto page + # This string is unicode for "ÇØÜRSÉS", which should appear in our Dummy Esperanto page # We store the string this way because Selenium seems to try and read in strings from # the HTML in this format. Ideally we could just store the raw ÇÜRRÉNT ÇØÜRSÉS string here - self.current_courses_text = u'\xc7\xdcRR\xc9NT \xc7\xd6\xdcRS\xc9S' + self.courses_text = u'\xc7\xd6\xdcRS\xc9S' self.username = "test" self.password = "testpass" @@ -92,10 +92,10 @@ class LanguageTest(UniqueCourseTest): # Change language to Dummy Esperanto self.dashboard_page.change_language(self.test_new_lang) - changed_text = self.dashboard_page.current_courses_text + changed_text = self.dashboard_page.courses_text # We should see the dummy-language text on the page - self.assertIn(self.current_courses_text, changed_text) + self.assertIn(self.courses_text, changed_text) def test_language_persists(self): auto_auth_page = AutoAuthPage(self.browser, username=self.username, password=self.password, email=self.email, course_id=self.course_id) @@ -113,10 +113,10 @@ class LanguageTest(UniqueCourseTest): self.dashboard_page.visit() - changed_text = self.dashboard_page.current_courses_text + changed_text = self.dashboard_page.courses_text # We should see the dummy-language text on the page - self.assertIn(self.current_courses_text, changed_text) + self.assertIn(self.courses_text, changed_text) class HighLevelTabTest(UniqueCourseTest):