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
e6e01c50
Commit
e6e01c50
authored
Jun 29, 2021
by
Nicolò Maria Mezzopera
Committed by
Mark Lapierre
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add details page test to infra registry feature spec
parent
5c16ff17
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
16 deletions
+29
-16
spec/features/groups/packages_spec.rb
spec/features/groups/packages_spec.rb
+6
-8
spec/features/projects/infrastructure_registry_spec.rb
spec/features/projects/infrastructure_registry_spec.rb
+18
-1
spec/features/projects/packages_spec.rb
spec/features/projects/packages_spec.rb
+3
-3
spec/support/shared_examples/features/packages_shared_examples.rb
...port/shared_examples/features/packages_shared_examples.rb
+2
-4
No files found.
spec/features/groups/packages_spec.rb
View file @
e6e01c50
...
...
@@ -38,18 +38,16 @@ RSpec.describe 'Group Packages' do
context
'when there are packages'
do
let_it_be
(
:second_project
)
{
create
(
:project
,
name:
'second-project'
,
group:
group
)
}
let_it_be
(
:
conan_package
)
{
create
(
:conan
_package
,
project:
project
,
name:
'zzz'
,
created_at:
1
.
day
.
ago
,
version:
'1.0.0'
)
}
let_it_be
(
:
npm_package
)
{
create
(
:npm
_package
,
project:
project
,
name:
'zzz'
,
created_at:
1
.
day
.
ago
,
version:
'1.0.0'
)
}
let_it_be
(
:maven_package
)
{
create
(
:maven_package
,
project:
second_project
,
name:
'aaa'
,
created_at:
2
.
days
.
ago
,
version:
'2.0.0'
)
}
let_it_be
(
:packages
)
{
[
conan
_package
,
maven_package
]
}
let_it_be
(
:packages
)
{
[
npm
_package
,
maven_package
]
}
it_behaves_like
'packages list'
,
check_project_name:
true
it_behaves_like
'package details link'
it
'allows you to navigate to the project page'
do
page
.
within
(
'[data-qa-selector="packages-table"]'
)
do
find
(
'[data-qa-selector="package-path"]'
,
text:
project
.
name
).
click
end
find
(
'[data-testid="root-link"]'
,
text:
project
.
name
).
click
expect
(
page
).
to
have_current_path
(
project_path
(
project
))
expect
(
page
).
to
have_content
(
project
.
name
)
...
...
@@ -58,15 +56,15 @@ RSpec.describe 'Group Packages' do
context
'sorting'
do
it_behaves_like
'shared package sorting'
do
let_it_be
(
:package_one
)
{
maven_package
}
let_it_be
(
:package_two
)
{
conan
_package
}
let_it_be
(
:package_two
)
{
npm
_package
}
end
it_behaves_like
'correctly sorted packages list'
,
'Project'
do
let
(
:packages
)
{
[
maven_package
,
conan
_package
]
}
let
(
:packages
)
{
[
maven_package
,
npm
_package
]
}
end
it_behaves_like
'correctly sorted packages list'
,
'Project'
,
ascending:
true
do
let
(
:packages
)
{
[
conan
_package
,
maven_package
]
}
let
(
:packages
)
{
[
npm
_package
,
maven_package
]
}
end
end
end
...
...
spec/features/projects/infrastructure_registry_spec.rb
View file @
e6e01c50
...
...
@@ -28,13 +28,30 @@ RSpec.describe 'Infrastructure Registry' do
visit_project_infrastructure_registry
end
context
'when there are
packag
es'
do
context
'when there are
modul
es'
do
let_it_be
(
:terraform_module
)
{
create
(
:terraform_module_package
,
project:
project
,
created_at:
1
.
day
.
ago
,
version:
'1.0.0'
)
}
let_it_be
(
:terraform_module2
)
{
create
(
:terraform_module_package
,
project:
project
,
created_at:
2
.
days
.
ago
,
version:
'2.0.0'
)
}
let_it_be
(
:packages
)
{
[
terraform_module
,
terraform_module2
]
}
it_behaves_like
'packages list'
context
'details link'
do
it
'navigates to the correct url'
do
page
.
within
(
packages_table_selector
)
do
click_link
terraform_module
.
name
end
expect
(
page
).
to
have_current_path
(
project_infrastructure_registry_path
(
terraform_module
.
project
,
terraform_module
))
expect
(
page
).
to
have_css
(
'.packages-app h1[data-testid="title"]'
,
text:
terraform_module
.
name
)
page
.
within
(
%Q([name="
#{
terraform_module
.
name
}
"])
)
do
expect
(
page
).
to
have_content
(
'Provision instructions'
)
expect
(
page
).
to
have_content
(
'Registry setup'
)
end
end
end
context
'deleting a package'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:terraform_module
)
{
create
(
:terraform_module_package
,
project:
project
)
}
...
...
spec/features/projects/packages_spec.rb
View file @
e6e01c50
...
...
@@ -31,9 +31,9 @@ RSpec.describe 'Packages' do
end
context
'when there are packages'
do
let_it_be
(
:
conan_package
)
{
create
(
:conan
_package
,
project:
project
,
name:
'zzz'
,
created_at:
1
.
day
.
ago
,
version:
'1.0.0'
)
}
let_it_be
(
:
npm_package
)
{
create
(
:npm
_package
,
project:
project
,
name:
'zzz'
,
created_at:
1
.
day
.
ago
,
version:
'1.0.0'
)
}
let_it_be
(
:maven_package
)
{
create
(
:maven_package
,
project:
project
,
name:
'aaa'
,
created_at:
2
.
days
.
ago
,
version:
'2.0.0'
)
}
let_it_be
(
:packages
)
{
[
conan
_package
,
maven_package
]
}
let_it_be
(
:packages
)
{
[
npm
_package
,
maven_package
]
}
it_behaves_like
'packages list'
...
...
@@ -54,7 +54,7 @@ RSpec.describe 'Packages' do
it_behaves_like
'shared package sorting'
do
let_it_be
(
:package_one
)
{
maven_package
}
let_it_be
(
:package_two
)
{
conan
_package
}
let_it_be
(
:package_two
)
{
npm
_package
}
end
end
...
...
spec/support/shared_examples/features/packages_shared_examples.rb
View file @
e6e01c50
...
...
@@ -32,11 +32,9 @@ RSpec.shared_examples 'package details link' do |property|
expect
(
page
).
to
have_current_path
(
project_package_path
(
package
.
project
,
package
))
page
.
within
(
'[data-qa-selector="package_title"]'
)
do
expect
(
page
).
to
have_content
(
package
.
name
)
end
expect
(
page
).
to
have_css
(
'.packages-app h1[data-testid="title"]'
,
text:
package
.
name
)
page
.
within
(
'[data-qa-selector="package_information_content"]'
)
do
page
.
within
(
%Q([name="
#{
package
.
name
}
"])
)
do
expect
(
page
).
to
have_content
(
'Installation'
)
expect
(
page
).
to
have_content
(
'Registry setup'
)
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