diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index 077134659b..42e3193cf3 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -56,10 +56,8 @@ def i_have_opened_a_new_course(_step): @step('(I select|s?he selects) the new course') def select_new_course(_step, whom): - course_link_xpath = '//div[contains(@class, "courses")]//a[contains(@class, "class-link")]//span[contains(., "{name}")]/..'.format( - name="Robot Super Course") - element = world.browser.find_by_xpath(course_link_xpath) - element.click() + course_link_css = 'a.course-link' + world.css_click(course_link_css) @step(u'I press the "([^"]*)" notification button$') diff --git a/cms/djangoapps/contentstore/features/course-team.py b/cms/djangoapps/contentstore/features/course-team.py index 57545060c1..6bea1b40f0 100644 --- a/cms/djangoapps/contentstore/features/course-team.py +++ b/cms/djangoapps/contentstore/features/course-team.py @@ -93,7 +93,7 @@ def other_user_login(_step, name): @step(u'I( do not)? see the course on my page') @step(u's?he does( not)? see the course on (his|her) page') def see_course(_step, inverted, gender='self'): - class_css = 'span.class-name' + class_css = 'h3.course-title' all_courses = world.css_find(class_css, wait_time=1) all_names = [item.html for item in all_courses] if inverted: diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 2feafce361..f18b06ec64 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -30,7 +30,7 @@ def i_create_a_course(step): @step('I click the course link in My Courses$') def i_click_the_course_link_in_my_courses(step): - course_css = 'span.class-name' + course_css = 'a.course-link' world.css_click(course_css) ############ ASSERTIONS ################### @@ -44,7 +44,7 @@ def courseware_page_has_loaded_in_studio(step): @step('I see the course listed in My Courses$') def i_see_the_course_in_my_courses(step): - course_css = 'span.class-name' + course_css = 'h3.class-title' assert world.css_has_text(course_css, world.scenario_dict['COURSE'].display_name)