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 ...@@ -38,23 +38,6 @@ module QA
element :new_note_form, 'attr: :note' # rubocop:disable QA/ElementWithPattern element :new_note_form, 'attr: :note' # rubocop:disable QA/ElementWithPattern
end 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 def click_remove_related_issue_button
click_element(:remove_related_issue_button) click_element(:remove_related_issue_button)
end end
......
# frozen_string_literal: true # frozen_string_literal: true
module QA module QA
context 'Create' do RSpec.describe 'Create' do
describe 'Design management' do context 'Design Management' do
let(:issue) { Resource::Issue.fabricate_via_api! } let(:issue) { Resource::Issue.fabricate_via_api! }
let(:design_filename) { 'banana_sample.gif' } let(:design_filename) { 'banana_sample.gif' }
let(:design) { File.absolute_path(File.join('spec', 'fixtures', design_filename)) } let(:design) { File.absolute_path(File.join('spec', 'fixtures', design_filename)) }
...@@ -12,18 +12,15 @@ module QA ...@@ -12,18 +12,15 @@ module QA
Flow::Login.sign_in Flow::Login.sign_in
end end
it 'user adds a design and annotation' do it 'user adds a design and annotates it' do
issue.visit! issue.visit!
Page::Project::Issue::Show.perform do |show| Page::Project::Issue::Show.perform do |issue|
show.click_designs_tab issue.add_design(design)
show.add_design(design) issue.click_design(design_filename)
show.click_design(design_filename) issue.add_annotation(annotation)
show.add_annotation(annotation)
expect(show).to have_annotation(annotation) expect(issue).to have_annotation(annotation)
show.click_discussion_tab
end end
end 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