Skip to content
Snippets Groups Projects
Unverified Commit d1390395 authored by Alper Akgun's avatar Alper Akgun
Browse files

Improve flaky issue weight callout

parent 9c8f090c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,7 +10,7 @@
= s_('Promotions|Weight')
.hide-collapsed.js-toggle-container.promotion-issue-weight-sidebar-message
= s_('Promotions|This feature is locked.')
%a.btn-link.js-toggle-button.js-weight-sidebar-callout{ href: '#' }
%a.btn-link.js-toggle-button.js-weight-sidebar-callout-btn{ href: '#' }
= s_('Promotions|Learn more')
= sprite_icon('chevron-up', css_class: 'js-sidebar-collapse hidden')
= sprite_icon('chevron-down', css_class: 'js-sidebar-expand')
Loading
Loading
Loading
Loading
@@ -180,28 +180,26 @@
visit project_issue_path(project, issue)
wait_for_requests
 
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
 
expect(find('.promotion-issue-weight-sidebar-message')).to have_content 'Improve issues management with Issue weight and GitLab Enterprise Edition'
end
 
it 'is removed after dismissal', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/222518' do
it 'is removed after dismissal' do
visit project_issue_path(project, issue)
wait_for_requests
 
within 'div.js-weight-sidebar-callout' do
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
click_link "Don't show me this again"
end
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
click_link "Not now, thanks"
 
expect(page).not_to have_selector('.js-weight-sidebar-callout')
expect(page).not_to have_content('.js-weight-sidebar-callout')
end
 
it 'does not appear on page after dismissal and reload' do
visit project_issue_path(project, issue)
wait_for_requests
 
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
find('.js-weight-sidebar-callout .js-close-callout').click
visit project_issue_path(project, issue)
 
Loading
Loading
@@ -212,8 +210,8 @@
visit project_issue_path(project, issue)
wait_for_requests
 
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
 
expect(page).to have_selector('.js-weight-sidebar-callout')
expect(page).to have_selector('.promotion-issue-sidebar-message', visible: false)
Loading
Loading
@@ -230,7 +228,7 @@
visit project_issue_path(project, issue)
wait_for_requests
 
find('.btn-link.js-toggle-button.js-weight-sidebar-callout').click
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click
 
expect(page).to have_link 'Try it for free', href: new_trial_registration_path(glm_source: 'gitlab.com', glm_content: 'discover-issue-weights'), class: 'issue-weights-trial-cta'
expect(find('.js-close-callout.js-close-session.tr-issue-weights-not-now-cta')).to have_content 'Not now, thanks!'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment