diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-30 14:06:13 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-30 14:06:16 +0100 |
commit | 38f300081714c03bca88d7d7a4633fbf5ff1f154 (patch) | |
tree | 4d24ea5e50f73cd0109d84851383ef69b993b276 /qa/qa/page/project/issue | |
parent | e74e6fcb5eecb7841a412cb0d3e9627556d83eaf (diff) | |
download | gitlab-ce-38f300081714c03bca88d7d7a4633fbf5ff1f154.tar.gz |
Port changes from gitlab-org/gitlab-ee!4064 to CE
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/qa/page/project/issue')
-rw-r--r-- | qa/qa/page/project/issue/index.rb | 17 | ||||
-rw-r--r-- | qa/qa/page/project/issue/new.rb | 33 | ||||
-rw-r--r-- | qa/qa/page/project/issue/show.rb | 37 |
3 files changed, 87 insertions, 0 deletions
diff --git a/qa/qa/page/project/issue/index.rb b/qa/qa/page/project/issue/index.rb new file mode 100644 index 00000000000..b5903f536a4 --- /dev/null +++ b/qa/qa/page/project/issue/index.rb @@ -0,0 +1,17 @@ +module QA + module Page + module Project + module Issue + class Index < Page::Base + view 'app/views/projects/issues/_issue.html.haml' do + element :issue_link, 'link_to issue.title' + end + + def go_to_issue(title) + click_link(title) + end + end + end + end + end +end diff --git a/qa/qa/page/project/issue/new.rb b/qa/qa/page/project/issue/new.rb new file mode 100644 index 00000000000..7fc581da1ed --- /dev/null +++ b/qa/qa/page/project/issue/new.rb @@ -0,0 +1,33 @@ +module QA + module Page + module Project + module Issue + class New < Page::Base + view 'app/views/shared/issuable/_form.html.haml' do + element :submit_issue_button, 'form.submit "Submit' + end + + view 'app/views/shared/issuable/form/_title.html.haml' do + element :issue_title_textbox, 'form.text_field :title' + end + + view 'app/views/shared/form_elements/_description.html.haml' do + element :issue_description_textarea, "render 'projects/zen', f: form, attr: :description" + end + + def add_title(title) + fill_in 'issue_title', with: title + end + + def add_description(description) + fill_in 'issue_description', with: description + end + + def create_new_issue + click_on 'Submit issue' + end + end + end + end + end +end 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 |