Skip to content
代码片段 群组 项目
未验证 提交 cbfd6975 编辑于 作者: Deepika Guliani's avatar Deepika Guliani 提交者: GitLab
浏览文件

Add a11y tests for work item milestone

上级 dcd2d86e
No related branches found
No related tags found
无相关合并请求
......@@ -343,12 +343,23 @@ def click_reply_and_enter_slash
RSpec.shared_examples 'work items milestone' do
let(:work_item_milestone_selector) { '[data-testid="work-item-milestone-with-edit"]' }
it 'passes axe automated accessibility testing in closed state' do
find(work_item_milestone_selector)
it 'has the work item milestone with edit' do
expect(page).to have_selector(work_item_milestone_selector)
end
it 'passes axe automated accessibility testing in closed state' do
expect(page).to be_axe_clean.within(work_item_milestone_selector)
end
it 'passes axe automated accessibility testing in open state' do
within(work_item_milestone_selector) do
click_button _('Edit')
wait_for_requests
expect(page).to be_axe_clean.within(work_item_milestone_selector)
end
end
context 'when edit is clicked' do
it 'selects and updates the right milestone', :aggregate_failures do
find_and_click_edit(work_item_milestone_selector)
......@@ -565,22 +576,20 @@ def find_and_click_clear(selector)
)
end
context 'for accessibility' do
it 'has the work item iteration with edit' do
expect(page).to have_selector(work_item_iteration_selector)
end
it 'has the work item iteration with edit' do
expect(page).to have_selector(work_item_iteration_selector)
end
it 'passes axe automated accessibility testing in closed state' do
expect(page).to be_axe_clean.within(work_item_iteration_selector)
end
it 'passes axe automated accessibility testing in closed state' do
expect(page).to be_axe_clean.within(work_item_iteration_selector)
end
it 'passes axe automated accessibility testing in open state' do
within(work_item_iteration_selector) do
click_button _('Edit')
wait_for_requests
it 'passes axe automated accessibility testing in open state' do
within(work_item_iteration_selector) do
click_button _('Edit')
wait_for_requests
expect(page).to be_axe_clean.within(work_item_iteration_selector)
end
expect(page).to be_axe_clean.within(work_item_iteration_selector)
end
end
......@@ -636,19 +645,17 @@ def find_and_click_clear(selector)
include_context 'with work_items_rolledup_dates', true
context 'for accessibility' do
it 'passes axe automated accessibility testing in closed state' do
expect(page).to have_selector(work_item_rolledup_dates_selector)
expect(page).to be_axe_clean.within(work_item_rolledup_dates_selector)
end
it 'passes axe automated accessibility testing in closed state' do
expect(page).to have_selector(work_item_rolledup_dates_selector)
expect(page).to be_axe_clean.within(work_item_rolledup_dates_selector)
end
it 'passes axe automated accessibility testing in open state' do
within(work_item_rolledup_dates_selector) do
click_button _('Edit')
wait_for_requests
it 'passes axe automated accessibility testing in open state' do
within(work_item_rolledup_dates_selector) do
click_button _('Edit')
wait_for_requests
expect(page).to be_axe_clean.within(work_item_rolledup_dates_selector)
end
expect(page).to be_axe_clean.within(work_item_rolledup_dates_selector)
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册