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
a5f0f581
Commit
a5f0f581
authored
Jul 22, 2020
by
Tiffany Rea
Committed by
Dan Davison
Jul 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new selectors in Main page
parent
3625ab69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+3
-3
qa/qa/page/main/menu.rb
qa/qa/page/main/menu.rb
+15
-0
No files found.
app/views/layouts/header/_default.html.haml
View file @
a5f0f581
...
@@ -35,21 +35,21 @@
...
@@ -35,21 +35,21 @@
=
sprite_icon
(
'search'
,
size:
16
)
=
sprite_icon
(
'search'
,
size:
16
)
-
if
header_link?
(
:issues
)
-
if
header_link?
(
:issues
)
=
nav_link
(
path:
'dashboard#issues'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
path:
'dashboard#issues'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
assigned_issues_dashboard_path
,
title:
_
(
'Issues'
),
class:
'dashboard-shortcuts-issues'
,
aria:
{
label:
_
(
'Issues'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
assigned_issues_dashboard_path
,
title:
_
(
'Issues'
),
class:
'dashboard-shortcuts-issues'
,
aria:
{
label:
_
(
'Issues'
)
},
data:
{
qa_selector:
'issues_shortcut_button'
,
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'issues'
,
size:
16
)
=
sprite_icon
(
'issues'
,
size:
16
)
-
issues_count
=
assigned_issuables_count
(
:issues
)
-
issues_count
=
assigned_issuables_count
(
:issues
)
%span
.badge.badge-pill.issues-count.green-badge
{
class:
(
'hidden'
if
issues_count
.
zero?
)
}
%span
.badge.badge-pill.issues-count.green-badge
{
class:
(
'hidden'
if
issues_count
.
zero?
)
}
=
number_with_delimiter
(
issues_count
)
=
number_with_delimiter
(
issues_count
)
-
if
header_link?
(
:merge_requests
)
-
if
header_link?
(
:merge_requests
)
=
nav_link
(
path:
'dashboard#merge_requests'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
path:
'dashboard#merge_requests'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
assigned_mrs_dashboard_path
,
title:
_
(
'Merge requests'
),
class:
'dashboard-shortcuts-merge_requests'
,
aria:
{
label:
_
(
'Merge requests'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
assigned_mrs_dashboard_path
,
title:
_
(
'Merge requests'
),
class:
'dashboard-shortcuts-merge_requests'
,
aria:
{
label:
_
(
'Merge requests'
)
},
data:
{
qa_selector:
'merge_requests_shortcut_button'
,
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'git-merge'
,
size:
16
)
=
sprite_icon
(
'git-merge'
,
size:
16
)
-
merge_requests_count
=
assigned_issuables_count
(
:merge_requests
)
-
merge_requests_count
=
assigned_issuables_count
(
:merge_requests
)
%span
.badge.badge-pill.merge-requests-count
{
class:
(
'hidden'
if
merge_requests_count
.
zero?
)
}
%span
.badge.badge-pill.merge-requests-count
{
class:
(
'hidden'
if
merge_requests_count
.
zero?
)
}
=
number_with_delimiter
(
merge_requests_count
)
=
number_with_delimiter
(
merge_requests_count
)
-
if
header_link?
(
:todos
)
-
if
header_link?
(
:todos
)
=
nav_link
(
controller:
'dashboard/todos'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
controller:
'dashboard/todos'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
dashboard_todos_path
,
title:
_
(
'To-Do List'
),
aria:
{
label:
_
(
'To-Do List'
)
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
dashboard_todos_path
,
title:
_
(
'To-Do List'
),
aria:
{
label:
_
(
'To-Do List'
)
},
class:
'shortcuts-todos'
,
data:
{
qa_selector:
'todos_shortcut_button'
,
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'todo-done'
,
size:
16
)
=
sprite_icon
(
'todo-done'
,
size:
16
)
%span
.badge.badge-pill.todos-count
{
class:
(
'hidden'
if
todos_pending_count
.
zero?
)
}
%span
.badge.badge-pill.todos-count
{
class:
(
'hidden'
if
todos_pending_count
.
zero?
)
}
=
todos_count_format
(
todos_pending_count
)
=
todos_count_format
(
todos_pending_count
)
...
...
qa/qa/page/main/menu.rb
View file @
a5f0f581
...
@@ -14,6 +14,9 @@ module QA
...
@@ -14,6 +14,9 @@ module QA
element
:user_avatar
,
required:
true
element
:user_avatar
,
required:
true
element
:user_menu
,
required:
true
element
:user_menu
,
required:
true
element
:stop_impersonation_link
element
:stop_impersonation_link
element
:issues_shortcut_button
,
required:
true
element
:merge_requests_shortcut_button
,
required:
true
element
:todos_shortcut_button
,
required:
true
end
end
view
'app/views/layouts/nav/_dashboard.html.haml'
do
view
'app/views/layouts/nav/_dashboard.html.haml'
do
...
@@ -63,6 +66,18 @@ module QA
...
@@ -63,6 +66,18 @@ module QA
end
end
end
end
# To go to one of the popular pages using the provided shortcut buttons within top menu
# @param [Symbol] the name of the element (e.g: `:issues_shortcut button`)
# @example:
# Menu.perform do |menu|
# menu.go_to_page_by_shortcut(:issues_shortcut_button) #=> Go to Issues page using shortcut button
# end
def
go_to_page_by_shortcut
(
button
)
within_top_menu
do
click_element
(
button
)
end
end
def
go_to_admin_area
def
go_to_admin_area
click_admin_area
click_admin_area
...
...
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