These images are always displayed next to a username, meaning people using screen readers were hearing the same username twice in a row. Even though we're about to replace the initialjs gem, we're making this change in case so we've got one more test and we can check everything keeps working after replacing the gem.
11 lines
304 B
Ruby
11 lines
304 B
Ruby
require "rails_helper"
|
|
|
|
describe Shared::AvatarComponent do
|
|
it "does not contain redundant text already present around it" do
|
|
render_inline Shared::AvatarComponent.new(double(id: 1, name: "Johnny"))
|
|
|
|
expect(page).to have_css "img", count: 1
|
|
expect(page).to have_css "img[alt='']"
|
|
end
|
|
end
|