spec: add student context card student avatar check

Change-Id: Iaabddc7a6a2ae95f7c1959c0f13c10ca9dbfe803
Reviewed-on: https://gerrit.instructure.com/120734
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tucker McKnight <tmcknight@instructure.com>
This commit is contained in:
Jeremy Putnam 2017-07-25 10:11:05 -06:00 committed by Tucker McKnight
parent 9a49b30067
commit bc3c5f7d95
1 changed files with 17 additions and 0 deletions

View File

@ -118,4 +118,21 @@ describe "admin avatars" do
expect(user.avatar_state).to eq :none
expect(user.avatar_image_url).to be_nil
end
context "student tray" do
before(:each) do
@account = Account.default
@account.enable_feature!(:student_context_cards)
@student = User.create!
@student.avatar_image_url = "http://www.example.com"
@course.enroll_student(@student).accept!
end
it "should display student avatar in tray", priority: "1", test_id: 3299466 do
get("/courses/#{@course.id}/gradebook")
f("a[data-student_id='#{@student.id}']").click
expect(f(".StudentContextTray__Avatar a span")).to have_attribute('style', /http/)
end
end
end