Commit 42a69d75 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'rc-gitlab-qa-26-add-instance-mattermost-scenario' into 'master'

Add Test::Integration::Mattermost

See merge request gitlab-org/gitlab-ce!14818
parents 980423f6 d600ea75
......@@ -18,6 +18,7 @@ module QA
# Support files
#
autoload :Actable, 'qa/scenario/actable'
autoload :Entrypoint, 'qa/scenario/entrypoint'
autoload :Template, 'qa/scenario/template'
##
......@@ -25,6 +26,10 @@ module QA
#
module Test
autoload :Instance, 'qa/scenario/test/instance'
module Integration
autoload :Mattermost, 'qa/scenario/test/integration/mattermost'
end
end
##
......
module QA
module Scenario
##
# Base class for running the suite against any GitLab instance,
# including staging and on-premises installation.
#
class Entrypoint < Template
def self.tags(*tags)
@tags = tags
end
def self.get_tags
@tags
end
def perform(address, *files)
Specs::Config.perform do |specs|
specs.address = address
end
##
# Perform before hooks, which are different for CE and EE
#
Runtime::Release.perform_before_hooks
Specs::Runner.perform do |specs|
specs.rspec(
tty: true,
tags: self.class.get_tags,
files: files.any? ? files : 'qa/specs/features'
)
end
end
end
end
end
......@@ -5,21 +5,8 @@ module QA
# Run test suite against any GitLab instance,
# including staging and on-premises installation.
#
class Instance < Scenario::Template
def perform(address, *files)
Specs::Config.perform do |specs|
specs.address = address
end
##
# Perform before hooks, which are different for CE and EE
#
Runtime::Release.perform_before_hooks
Specs::Runner.perform do |specs|
specs.rspec('--tty', files.any? ? files : 'qa/specs/features')
end
end
class Instance < Entrypoint
tags :core
end
end
end
......
module QA
module Scenario
module Test
module Integration
##
# Run test suite against any GitLab instance where mattermost is enabled,
# including staging and on-premises installation.
#
class Mattermost < Scenario::Entrypoint
tags :core, :mattermost
end
end
end
end
end
module QA
feature 'standard root login' do
feature 'standard root login', :core do
scenario 'user logs in using credentials' do
Page::Main::Entry.act { sign_in_using_credentials }
......
module QA
feature 'create a new group', :mattermost do
scenario 'creating a group with a mattermost team' do
Page::Main::Entry.act { sign_in_using_credentials }
Page::Main::Menu.act { go_to_groups }
Page::Dashboard::Groups.perform do |page|
page.go_to_new_group
expect(page).to have_content(
/Create a Mattermost team for this group/
)
end
end
end
end
module QA
feature 'create a new project' do
feature 'create a new project', :core do
scenario 'user creates a new project' do
Page::Main::Entry.act { sign_in_using_credentials }
......
module QA
feature 'clone code from the repository' do
feature 'clone code from the repository', :core do
context 'with regular account over http' do
given(:location) do
Page::Project::Show.act do
......
module QA
feature 'push code to repository' do
feature 'push code to repository', :core do
context 'with regular account over http' do
scenario 'user pushes code to the repository' do
scenario 'user pushes code to the repository' do
Page::Main::Entry.act { sign_in_using_credentials }
Scenario::Gitlab::Project::Create.perform do |scenario|
......
......@@ -5,7 +5,14 @@ module QA
class Runner
include Scenario::Actable
def rspec(*args)
def rspec(tty: false, tags: [], files: ['qa/specs/features'])
args = []
args << '--tty' if tty
tags.to_a.each do |tag|
args << ['-t', tag.to_s]
end
args << files
RSpec::Core::Runner.run(args.flatten, $stderr, $stdout).tap do |status|
abort if status.nonzero?
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