Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/datetime_on_tooltips_spec.rb4
-rw-r--r--spec/features/dashboard/issues_filter_spec.rb2
-rw-r--r--spec/features/dashboard/projects_spec.rb3
-rw-r--r--spec/features/dashboard/user_filters_projects_spec.rb7
4 files changed, 11 insertions, 5 deletions
diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb
index 48a6976f263..875ae41c55d 100644
--- a/spec/features/dashboard/datetime_on_tooltips_spec.rb
+++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb
@@ -41,9 +41,9 @@ RSpec.describe 'Tooltips on .timeago dates', :js do
end
it 'has the datetime formated correctly' do
- expect(page).to have_selector('.js-timeago.snippet-created-ago', text: '1 day ago')
+ expect(page).to have_selector('[data-testid=snippet-created-at] .js-timeago', text: '1 day ago')
- page.find('.js-timeago.snippet-created-ago').hover
+ page.find('[data-testid=snippet-created-at] .js-timeago').hover
expect(datetime_in_tooltip).to eq(created_date)
end
diff --git a/spec/features/dashboard/issues_filter_spec.rb b/spec/features/dashboard/issues_filter_spec.rb
index 3c774f8b269..0d10aed955a 100644
--- a/spec/features/dashboard/issues_filter_spec.rb
+++ b/spec/features/dashboard/issues_filter_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe 'Dashboard Issues filtering', :js do
it 'updates atom feed link' do
visit_issues(milestone_title: '', assignee_username: user.username)
- link = find('.nav-controls a[title="Subscribe to RSS feed"]')
+ link = find('[data-testid="rss-feed-link"]')
params = CGI.parse(URI.parse(link[:href]).query)
auto_discovery_link = find('link[type="application/atom+xml"]', visible: false)
auto_discovery_params = CGI.parse(URI.parse(auto_discovery_link[:href]).query)
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 847d0faf60d..0b468854322 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -112,13 +112,12 @@ RSpec.describe 'Dashboard Projects' do
end
context 'when on Starred projects tab', :js do
- it 'shows the empty state when there are no starred projects', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/222357' do
+ it 'shows the empty state when there are no starred projects' do
visit(starred_dashboard_projects_path)
element = page.find('.row.empty-state')
expect(element).to have_content("You don't have starred projects yet.")
- expect(element.find('.svg-content img')['src']).to have_content('illustrations/starred_empty')
end
it 'shows only starred projects' do
diff --git a/spec/features/dashboard/user_filters_projects_spec.rb b/spec/features/dashboard/user_filters_projects_spec.rb
index 2cf56f93cf9..e25da5854ab 100644
--- a/spec/features/dashboard/user_filters_projects_spec.rb
+++ b/spec/features/dashboard/user_filters_projects_spec.rb
@@ -145,7 +145,14 @@ RSpec.describe 'Dashboard > User filters projects' do
end
it 'filters any project' do
+ # Selecting the same option in the `GlListbox` does not emit `select` event
+ # and that is why URL update won't be triggered. Given that `Any` is a default option
+ # we need to explicitly switch from some other option (e.g. `Internal`) to `Any`
+ # to trigger the page update
+ select_dropdown_option '#filtered-search-visibility-dropdown > .dropdown', 'Internal', '.dropdown-item'
+
select_dropdown_option '#filtered-search-visibility-dropdown > .dropdown', 'Any', '.dropdown-item'
+
list = page.all('.projects-list .project-name').map(&:text)
expect(list).to contain_exactly("Internal project", "Private project", "Treasure", "Victorialand")