Commit 16cf8e47 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'tmslvnkc/design/refactor' into 'master'

Refactor basic design management test

See merge request gitlab-org/gitlab!38131
parents 73cfa33e 9c9de7ac
......@@ -38,23 +38,6 @@ module QA
element :new_note_form, 'attr: :note' # rubocop:disable QA/ElementWithPattern
end
view 'app/views/projects/issues/_tabs.html.haml' do
element :designs_tab_content
element :designs_tab_link
element :discussion_tab_content
element :discussion_tab_link
end
def click_discussion_tab
click_element(:discussion_tab_link)
active_element?(:discussion_tab_content)
end
def click_designs_tab
click_element(:designs_tab_link)
active_element?(:designs_tab_content)
end
def click_remove_related_issue_button
click_element(:remove_related_issue_button)
end
......
# frozen_string_literal: true
module QA
context 'Create' do
describe 'Design management' do
RSpec.describe 'Create' do
context 'Design Management' do
let(:issue) { Resource::Issue.fabricate_via_api! }
let(:design_filename) { 'banana_sample.gif' }
let(:design) { File.absolute_path(File.join('spec', 'fixtures', design_filename)) }
......@@ -12,18 +12,15 @@ module QA
Flow::Login.sign_in
end
it 'user adds a design and annotation' do
it 'user adds a design and annotates it' do
issue.visit!
Page::Project::Issue::Show.perform do |show|
show.click_designs_tab
show.add_design(design)
show.click_design(design_filename)
show.add_annotation(annotation)
Page::Project::Issue::Show.perform do |issue|
issue.add_design(design)
issue.click_design(design_filename)
issue.add_annotation(annotation)
expect(show).to have_annotation(annotation)
show.click_discussion_tab
expect(issue).to have_annotation(annotation)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment