Remove unnecessary broken link for unpublished course

Fixes CNVS-21785

Test Plan:
1. Navigate to Courses show page as a teacher for unpublished course
2. Ensure that the alert saying 'Only Teachers Can See This Course
   Until It Is Published' does not contain a link
3. Prior version only had a broken link leading nowhere. Removing to
   avoid confusion.

Change-Id: I7312a34e22d76b1035385887d141d138d944aada
Reviewed-on: https://gerrit.instructure.com/59185
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
This commit is contained in:
Brock Cooper 2015-07-23 15:35:01 -06:00 committed by Dan Minkevitch
parent e1d458dd34
commit 03c818abde
2 changed files with 1 additions and 6 deletions

View File

@ -165,7 +165,7 @@
<%= t('headings.unpublished', %{This Course is Unpublished}) %>
<span class="Reminder__course-setup-subttitle">
<%= t 'teachers_only', "Only teachers can see this course until it is *published*", :wrapper => (can_do(@context, @current_user, :update) ? '<a href="#" class="publish_course_in_wizard_link"><b>\1</b></a>' : '\1') %>
<%= t "Only teachers can see this course until it is published" %>
</span>
</h2>
<div class="body Reminder__course-setup-body">

View File

@ -37,13 +37,11 @@ describe "courses" do
@course.save!
get "/courses/#{@course.id}"
course_status_buttons = ff('#course_status_actions button')
expect(f('.publish_course_in_wizard_link')).to be_displayed
expect(course_status_buttons.first).to have_class('disabled')
expect(course_status_buttons.first.text).to eq 'Unpublished'
expect(course_status_buttons.last).not_to have_class('disabled')
expect(course_status_buttons.last.text).to eq 'Publish'
expect_new_page_load { course_status_buttons.last.click }
expect(f('.publish_course_in_wizard_link')).to be_nil
validate_action_button(:last, 'Published')
@course.reload
@ -53,13 +51,11 @@ describe "courses" do
it "should allow unpublishing of a course through the course status actions" do
get "/courses/#{@course.id}"
course_status_buttons = ff('#course_status_actions button')
expect(f('.publish_course_in_wizard_link')).to be_nil
expect(course_status_buttons.first).not_to have_class('disabled')
expect(course_status_buttons.first.text).to eq 'Unpublish'
expect(course_status_buttons.last).to have_class('disabled')
expect(course_status_buttons.last.text).to eq 'Published'
expect_new_page_load { course_status_buttons.first.click }
expect(f('.publish_course_in_wizard_link')).to be_displayed
validate_action_button(:first, 'Unpublished')
end
@ -67,7 +63,6 @@ describe "courses" do
course_with_student_submissions({submission_points: true, unpublished: true})
get "/courses/#{@course.id}"
course_status_buttons = ff('#course_status_actions button')
expect(f('.publish_course_in_wizard_link')).to be_displayed
expect(course_status_buttons.first).to have_class('disabled')
expect(course_status_buttons.first.text).to eq 'Unpublished'
expect(course_status_buttons.last).not_to have_class('disabled')