Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
cbae3e97
Commit
cbae3e97
authored
Sep 06, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[QA] Change Test::Sanity::Failing to Test::Sanity::Framework
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
4a14ff5b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
6 deletions
+43
-6
qa/qa.rb
qa/qa.rb
+1
-1
qa/qa/page/main/login.rb
qa/qa/page/main/login.rb
+10
-2
qa/qa/scenario/test/sanity/framework.rb
qa/qa/scenario/test/sanity/framework.rb
+4
-3
qa/qa/specs/features/sanity/framework_spec.rb
qa/qa/specs/features/sanity/framework_spec.rb
+23
-0
qa/spec/scenario/test/sanity/framework_spec.rb
qa/spec/scenario/test/sanity/framework_spec.rb
+5
-0
No files found.
qa/qa.rb
View file @
cbae3e97
...
...
@@ -100,7 +100,7 @@ module QA
end
module
Sanity
autoload
:F
ailing
,
'qa/scenario/test/sanity/failing
'
autoload
:F
ramework
,
'qa/scenario/test/sanity/framework
'
autoload
:Selectors
,
'qa/scenario/test/sanity/selectors'
end
end
...
...
qa/qa/page/main/login.rb
View file @
cbae3e97
...
...
@@ -63,6 +63,14 @@ module QA
'/users/sign_in'
end
def
sign_in_tab?
page
.
has_button?
(
'Sign in'
)
end
def
ldap_tab?
page
.
has_button?
(
'LDAP'
)
end
def
switch_to_sign_in_tab
click_on
'Sign in'
end
...
...
@@ -90,8 +98,8 @@ module QA
end
def
sign_in_using_gitlab_credentials
(
user
)
switch_to_sign_in_tab
unless
page
.
has_button?
(
'Sign in'
)
switch_to_standard_tab
if
page
.
has_content?
(
'LDAP'
)
switch_to_sign_in_tab
unless
sign_in_tab?
switch_to_standard_tab
if
ldap_tab?
fill_in
:user_login
,
with:
user
.
username
fill_in
:user_password
,
with:
user
.
password
...
...
qa/qa/scenario/test/sanity/f
ailing
.rb
→
qa/qa/scenario/test/sanity/f
ramework
.rb
View file @
cbae3e97
...
...
@@ -5,12 +5,13 @@ module QA
module
Test
module
Sanity
##
# This scenario exits with a 1 exit code.
# This scenario runs 1 passing example, and 1 failing example, and exits
# with a 1 exit code.
#
class
F
ailing
<
Template
class
F
ramework
<
Template
include
Bootable
tags
:f
ailing
tags
:f
ramework
end
end
end
...
...
qa/qa/specs/features/sanity/f
ailing
_spec.rb
→
qa/qa/specs/features/sanity/f
ramework
_spec.rb
View file @
cbae3e97
# frozen_string_literal: true
module
QA
context
'Sanity checks'
,
:orchestrated
,
:failing
do
context
'Framework sanity checks'
,
:orchestrated
,
:framework
do
describe
'Passing orchestrated example'
do
it
'succeeds'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
do
|
main_login
|
expect
(
main_login
.
sign_in_tab?
).
to
be
(
true
)
end
end
end
describe
'Failing orchestrated example'
do
it
'
always
fails'
do
it
'fails'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
expect
(
page
).
to
have_text
(
"These Aren't the Texts You're Looking For"
,
wait:
1
)
...
...
qa/spec/scenario/test/sanity/framework_spec.rb
0 → 100644
View file @
cbae3e97
describe
QA
::
Scenario
::
Test
::
Sanity
::
Framework
do
it_behaves_like
'a QA scenario class'
do
let
(
:tags
)
{
[
:framework
]
}
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment