summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/mattermost/login_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/specs/features/mattermost/login_spec.rb')
-rw-r--r--qa/qa/specs/features/mattermost/login_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/qa/qa/specs/features/mattermost/login_spec.rb b/qa/qa/specs/features/mattermost/login_spec.rb
new file mode 100644
index 00000000000..1fde3f89a99
--- /dev/null
+++ b/qa/qa/specs/features/mattermost/login_spec.rb
@@ -0,0 +1,24 @@
+module QA
+ feature 'logging in to Mattermost', :mattermost do
+ scenario 'can use gitlab oauth' do
+ Page::Main::Entry.act { visit_login_page }
+ Page::Main::Login.act { sign_in_using_credentials }
+ Page::Mattermost::Login.act { sign_in_using_oauth }
+
+ Page::Mattermost::Main.perform do |page|
+ expect(page).to have_content(/(Welcome to: Mattermost|Logout GitLab Mattermost)/)
+ end
+ end
+
+ ##
+ # TODO, temporary workaround for gitlab-org/gitlab-qa#102.
+ #
+ after do
+ visit Runtime::Scenario.mattermost_address
+ reset_session!
+
+ visit Runtime::Scenario.gitlab_address
+ reset_session!
+ end
+ end
+end