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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
245e5ded
Commit
245e5ded
authored
Jan 22, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various improvements to the QA framework
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
a06a5e38
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
12 deletions
+14
-12
qa/qa/ee/resource/license.rb
qa/qa/ee/resource/license.rb
+1
-1
qa/qa/ee/strategy.rb
qa/qa/ee/strategy.rb
+5
-1
qa/qa/runtime/logger.rb
qa/qa/runtime/logger.rb
+3
-5
qa/qa/support/page/logging.rb
qa/qa/support/page/logging.rb
+1
-1
qa/spec/page/base_spec.rb
qa/spec/page/base_spec.rb
+1
-1
qa/spec/spec_helper.rb
qa/spec/spec_helper.rb
+3
-3
qa/spec/support/helpers/stub_env.rb
qa/spec/support/helpers/stub_env.rb
+0
-0
qa/spec/support/shared_examples/scenario_shared_examples.rb
qa/spec/support/shared_examples/scenario_shared_examples.rb
+0
-0
No files found.
qa/qa/ee/resource/license.rb
View file @
245e5ded
...
...
@@ -13,7 +13,7 @@ module QA
license_page
.
add_new_license
(
license
)
unless
license_page
.
license?
end
QA
::
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
)
QA
::
Page
::
Main
::
Menu
.
perform
(
&
:sign_out
_if_signed_in
)
end
end
end
...
...
qa/qa/ee/strategy.rb
View file @
245e5ded
...
...
@@ -18,7 +18,11 @@ module QA
return
unless
ENV
[
'EE_LICENSE'
]
EE
::
Resource
::
License
.
fabricate!
(
ENV
[
'EE_LICENSE'
])
QA
::
Support
::
Retrier
.
retry_on_exception
do
QA
::
Runtime
::
Browser
.
visit
(
:gitlab
,
QA
::
Page
::
Main
::
Login
)
do
EE
::
Resource
::
License
.
fabricate!
(
ENV
[
'EE_LICENSE'
])
end
end
end
end
end
...
...
qa/qa/runtime/logger.rb
View file @
245e5ded
...
...
@@ -14,11 +14,9 @@ module QA
attr_writer
:logger
def
logger
return
@logger
if
@logger
@logger
=
::
Logger
.
new
Runtime
::
Env
.
log_destination
@logger
.
level
=
Runtime
::
Env
.
debug?
?
::
Logger
::
DEBUG
:
::
Logger
::
ERROR
@logger
@logger
||=
::
Logger
.
new
(
Runtime
::
Env
.
log_destination
).
tap
do
|
logger
|
logger
.
level
=
Runtime
::
Env
.
debug?
?
::
Logger
::
DEBUG
:
::
Logger
::
ERROR
end
end
end
end
...
...
qa/qa/support/page/logging.rb
View file @
245e5ded
...
...
@@ -16,7 +16,7 @@ module QA
super
end
def
wait_until
(
max_duration:
60
,
sleep_interval:
0.1
,
reload:
true
)
def
wait_until
(
max_duration:
60
,
sleep_interval:
0.1
,
reload:
true
,
raise_on_failure:
false
)
log
(
"next wait uses reload:
#{
reload
}
"
)
# Logging of wait start/end/duration is handled by QA::Support::Waiter
...
...
qa/spec/page/base_spec.rb
View file @
245e5ded
...
...
@@ -62,7 +62,7 @@ describe QA::Page::Base do
end
end
describe
'#wait'
do
describe
'#wait
_until
'
do
subject
{
Class
.
new
(
described_class
).
new
}
context
'when the condition is true'
do
...
...
qa/spec/spec_helper.rb
View file @
245e5ded
...
...
@@ -12,9 +12,9 @@ QA::Runtime::Browser.configure!
QA
::
Runtime
::
Scenario
.
from_env
(
QA
::
Runtime
::
Env
.
runtime_scenario_attributes
)
if
QA
::
Runtime
::
Env
.
runtime_scenario_attributes
%w[helpers shared_examples]
.
each
do
|
d
|
Dir
[
::
File
.
join
(
__dir__
,
d
,
'**'
,
'*.rb'
)].
each
{
|
f
|
require
f
}
end
Dir
[
::
File
.
join
(
__dir__
,
"support/helpers/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
::
File
.
join
(
__dir__
,
"support/shared_contexts/*.rb"
)].
each
{
|
f
|
require
f
}
Dir
[
::
File
.
join
(
__dir__
,
"support/shared_examples/*.rb"
)].
each
{
|
f
|
require
f
}
RSpec
.
configure
do
|
config
|
QA
::
Specs
::
Helpers
::
Quarantine
.
configure_rspec
...
...
qa/spec/helpers/stub_env.rb
→
qa/spec/
support/
helpers/stub_env.rb
View file @
245e5ded
File moved
qa/spec/shared_examples/scenario_shared_examples.rb
→
qa/spec/s
upport/s
hared_examples/scenario_shared_examples.rb
View file @
245e5ded
File moved
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