blob: 8c668ae9a8721e8dc6f539615868b527b0147744 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
RSpec.shared_examples 'page has active tab' do |title|
it "activates #{title} tab" do
within_testid('super-sidebar') do
expect(page).to have_selector('button[aria-expanded="true"]', text: title)
end
end
end
RSpec.shared_examples 'page has active sub tab' do |title|
it "activates #{title} sub tab" do
within_testid('super-sidebar') do
expect(page).to have_selector('a[aria-current="page"]', text: title)
end
end
end
|