Commit 778045ee authored by Alper Akgun's avatar Alper Akgun

Merge branch...

Merge branch '322522-refactor-ee-app-views-shared-promotions-_promote_issue_weights-html-haml-page' into 'master'

Refactor issue weights promotion view

See merge request gitlab-org/gitlab!55381
parents c012265e e2659825
...@@ -82,7 +82,7 @@ RSpec.describe 'Promotions', :js do ...@@ -82,7 +82,7 @@ RSpec.describe 'Promotions', :js do
it 'appears in milestone page' do it 'appears in milestone page' do
visit project_milestone_path(project, milestone) visit project_milestone_path(project, milestone)
expect(find('#promote_burndown_charts')).to have_content "Upgrade your plan to improve milestones with Burndown Charts." expect(find('#promote_burndown_charts')).to have_content 'Upgrade your plan to improve milestones with Burndown Charts.'
end end
it 'does not show when cookie is set' do it 'does not show when cookie is set' do
...@@ -180,7 +180,7 @@ RSpec.describe 'Promotions', :js do ...@@ -180,7 +180,7 @@ RSpec.describe 'Promotions', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
expect(find('.promotion-issue-weight-sidebar-message')).to have_content 'Improve issues management with Issue weight and GitLab Enterprise Edition' expect(find('.promotion-issue-weight-sidebar-message')).to have_content 'Improve issues management with Issue weight and GitLab Enterprise Edition'
end end
...@@ -189,8 +189,8 @@ RSpec.describe 'Promotions', :js do ...@@ -189,8 +189,8 @@ RSpec.describe 'Promotions', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
click_link "Not now, thanks" click_link 'Not now, thanks'
expect(page).not_to have_content('.js-weight-sidebar-callout') expect(page).not_to have_content('.js-weight-sidebar-callout')
end end
...@@ -199,8 +199,8 @@ RSpec.describe 'Promotions', :js do ...@@ -199,8 +199,8 @@ RSpec.describe 'Promotions', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
find('.js-weight-sidebar-callout .js-close-callout').click click_link 'Not now, thanks'
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
expect(page).not_to have_selector('.js-weight-sidebar-callout') expect(page).not_to have_selector('.js-weight-sidebar-callout')
...@@ -210,8 +210,8 @@ RSpec.describe 'Promotions', :js do ...@@ -210,8 +210,8 @@ RSpec.describe 'Promotions', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
expect(page).to have_selector('.js-weight-sidebar-callout') expect(page).to have_selector('.js-weight-sidebar-callout')
expect(page).to have_selector('.promotion-issue-sidebar-message', visible: false) expect(page).to have_selector('.promotion-issue-sidebar-message', visible: false)
...@@ -228,7 +228,7 @@ RSpec.describe 'Promotions', :js do ...@@ -228,7 +228,7 @@ RSpec.describe 'Promotions', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.btn-link.js-toggle-button.js-weight-sidebar-callout-btn').click click_link 'Learn more'
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(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!' expect(find('.js-close-callout.js-close-session.tr-issue-weights-not-now-cta')).to have_content 'Not now, thanks!'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment