summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/issue/show.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/issue/show.rb')
-rw-r--r--qa/qa/page/project/issue/show.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb
new file mode 100644
index 00000000000..10644c0fecc
--- /dev/null
+++ b/qa/qa/page/project/issue/show.rb
@@ -0,0 +1,37 @@
+module QA
+ module Page
+ module Project
+ module Issue
+ class Show < Page::Base
+ view 'app/views/projects/issues/show.html.haml' do
+ element :issue_details, '.issue-details'
+ element :title, '.title'
+ end
+
+ view 'app/views/shared/notes/_form.html.haml' do
+ element :new_note_form, 'new-note'
+ element :new_note_form, 'attr: :note'
+ end
+
+ view 'app/views/shared/notes/_comment_button.html.haml' do
+ element :comment_button, '%strong Comment'
+ end
+
+ def issue_title
+ find('.issue-details .title').text
+ end
+
+ # Adds a comment to an issue
+ # attachment option should be an absolute path
+ def comment(text, attachment:)
+ fill_in(with: text, name: 'note[note]')
+
+ attach_file_to_dropzone(attachment, '.new-note') if attachment
+
+ click_on 'Comment'
+ end
+ end
+ end
+ end
+ end
+end