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
Léo-Paul Géneau
gitlab-ce
Commits
d2db7d40
Commit
d2db7d40
authored
Jul 18, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disambiguate 'File' under qa/ since we have a QA::Factory::Resource::File class as well
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
d8118902
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
14 deletions
+14
-14
qa/qa/git/repository.rb
qa/qa/git/repository.rb
+1
-1
qa/qa/page/component/dropzone.rb
qa/qa/page/component/dropzone.rb
+1
-1
qa/qa/runtime/api/request.rb
qa/qa/runtime/api/request.rb
+1
-1
qa/qa/runtime/browser.rb
qa/qa/runtime/browser.rb
+2
-2
qa/qa/runtime/key/base.rb
qa/qa/runtime/key/base.rb
+2
-2
qa/qa/runtime/release.rb
qa/qa/runtime/release.rb
+1
-1
qa/qa/scenario/test/instance.rb
qa/qa/scenario/test/instance.rb
+1
-1
qa/spec/git/repository_spec.rb
qa/spec/git/repository_spec.rb
+1
-1
qa/spec/page/view_spec.rb
qa/spec/page/view_spec.rb
+2
-2
qa/spec/scenario/test/instance_spec.rb
qa/spec/scenario/test/instance_spec.rb
+1
-1
qa/spec/spec_helper.rb
qa/spec/spec_helper.rb
+1
-1
No files found.
qa/qa/git/repository.rb
View file @
d2db7d40
...
...
@@ -59,7 +59,7 @@ module QA
end
def
add_file
(
name
,
contents
)
File
.
write
(
name
,
contents
)
::
File
.
write
(
name
,
contents
)
`git add
#{
name
}
`
end
...
...
qa/qa/page/component/dropzone.rb
View file @
d2db7d40
...
...
@@ -15,7 +15,7 @@ module QA
# instantiated on one page because there is no distinguishing
# attribute per dropzone file field.
def
attach_file
(
attachment
)
filename
=
File
.
basename
(
attachment
)
filename
=
::
File
.
basename
(
attachment
)
field_style
=
{
visibility:
'visible'
,
height:
''
,
width:
''
}
page
.
attach_file
(
attachment
,
class:
'dz-hidden-input'
,
make_visible:
field_style
)
...
...
qa/qa/runtime/api/request.rb
View file @
d2db7d40
...
...
@@ -28,7 +28,7 @@ module QA
#
# Returns the relative path to the requested API resource
def
request_path
(
path
,
version:
API_VERSION
,
**
query_string
)
full_path
=
File
.
join
(
'/api'
,
version
,
path
)
full_path
=
::
File
.
join
(
'/api'
,
version
,
path
)
if
query_string
.
any?
full_path
<<
(
path
.
include?
(
'?'
)
?
'&'
:
'?'
)
...
...
qa/qa/runtime/browser.rb
View file @
d2db7d40
...
...
@@ -86,7 +86,7 @@ module QA
end
Capybara
::
Screenshot
.
register_filename_prefix_formatter
(
:rspec
)
do
|
example
|
File
.
join
(
QA
::
Runtime
::
Namespace
.
name
,
example
.
file_path
.
sub
(
'./qa/specs/features/'
,
''
))
::
File
.
join
(
QA
::
Runtime
::
Namespace
.
name
,
example
.
file_path
.
sub
(
'./qa/specs/features/'
,
''
))
end
Capybara
.
configure
do
|
config
|
...
...
@@ -94,7 +94,7 @@ module QA
config
.
javascript_driver
=
:chrome
config
.
default_max_wait_time
=
10
# https://github.com/mattheworiordan/capybara-screenshot/issues/164
config
.
save_path
=
File
.
expand_path
(
'../../tmp'
,
__dir__
)
config
.
save_path
=
::
File
.
expand_path
(
'../../tmp'
,
__dir__
)
end
end
...
...
qa/qa/runtime/key/base.rb
View file @
d2db7d40
...
...
@@ -25,8 +25,8 @@ module QA
end
def
populate_key_data
(
path
)
@private_key
=
File
.
binread
(
path
)
@public_key
=
File
.
binread
(
"
#{
path
}
.pub"
)
@private_key
=
::
File
.
binread
(
path
)
@public_key
=
::
File
.
binread
(
"
#{
path
}
.pub"
)
@fingerprint
=
`ssh-keygen -l -E md5 -f
#{
path
}
| cut -d' ' -f2 | cut -d: -f2-`
.
chomp
end
...
...
qa/qa/runtime/release.rb
View file @
d2db7d40
...
...
@@ -13,7 +13,7 @@ module QA
end
def
version
@version
||=
File
.
directory?
(
"
#{
__dir__
}
/../ee"
)
?
:EE
:
:CE
@version
||=
::
File
.
directory?
(
"
#{
__dir__
}
/../ee"
)
?
:EE
:
:CE
end
def
strategy
...
...
qa/qa/scenario/test/instance.rb
View file @
d2db7d40
...
...
@@ -26,7 +26,7 @@ module QA
if
rspec_options
.
any?
rspec_options
else
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
::
File
.
expand_path
(
'../../specs/features'
,
__dir__
)
end
end
end
...
...
qa/spec/git/repository_spec.rb
View file @
d2db7d40
...
...
@@ -29,7 +29,7 @@ describe QA::Git::Repository do
def
cd_empty_temp_directory
tmp_dir
=
'tmp/git-repository-spec/'
FileUtils
.
rm_r
(
tmp_dir
)
if
File
.
exist?
(
tmp_dir
)
FileUtils
.
rm_r
(
tmp_dir
)
if
::
File
.
exist?
(
tmp_dir
)
FileUtils
.
mkdir_p
tmp_dir
FileUtils
.
cd
tmp_dir
end
...
...
qa/spec/page/view_spec.rb
View file @
d2db7d40
...
...
@@ -32,7 +32,7 @@ describe QA::Page::View do
context
'when pattern is found'
do
before
do
allow
(
File
).
to
receive
(
:foreach
)
allow
(
::
File
).
to
receive
(
:foreach
)
.
and_yield
(
'some element'
).
once
allow
(
element
).
to
receive
(
:matches?
)
.
with
(
'some element'
).
and_return
(
true
)
...
...
@@ -45,7 +45,7 @@ describe QA::Page::View do
context
'when pattern has not been found'
do
before
do
allow
(
File
).
to
receive
(
:foreach
)
allow
(
::
File
).
to
receive
(
:foreach
)
.
and_yield
(
'some element'
).
once
allow
(
element
).
to
receive
(
:matches?
)
.
with
(
'some element'
).
and_return
(
false
)
...
...
qa/spec/scenario/test/instance_spec.rb
View file @
d2db7d40
...
...
@@ -30,7 +30,7 @@ describe QA::Scenario::Test::Instance do
subject
.
perform
(
"test"
)
expect
(
runner
).
to
have_received
(
:options
=
)
.
with
(
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
.
with
(
::
File
.
expand_path
(
'../../../qa/specs/features'
,
__dir__
))
end
end
...
...
qa/spec/spec_helper.rb
View file @
d2db7d40
require_relative
'../qa'
Dir
[
File
.
join
(
__dir__
,
'support'
,
'**'
,
'*.rb'
)].
each
{
|
f
|
require
f
}
Dir
[
::
File
.
join
(
__dir__
,
'support'
,
'**'
,
'*.rb'
)].
each
{
|
f
|
require
f
}
RSpec
.
configure
do
|
config
|
config
.
expect_with
:rspec
do
|
expectations
|
...
...
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