Commit f95afa02 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'jivl-add-faq-install-specs' into 'master'

Add specs for the install and faq pages

Closes #3854

See merge request gitlab-com/www-gitlab-com!20208
parents 4708882d 480582e4
Pipeline #52534605 passed with stages
in 16 minutes and 10 seconds
......@@ -67,7 +67,7 @@ extra_js:
%p
= method.desc
.method
.method.community
.method-content
%h2.block-title Community contributed
.flex-tile-list
......
require 'spec_helper'
describe 'install page', :js do
before do
visit '/install'
end
context 'when browsing for the desired installation methods' do
it 'shows a list of supported platforms' do
expect(all('.method.omnibus .js-distro-tile').count).to eq(6)
expect(all('.method.official a.tile').count).to eq(13)
expect(all('.method.community a.tile').count).to eq(13)
end
it 'shows the installation instructions of a supported omnibus platform' do
find('.distro-tile-1').click
distro_instructions_ee = find('.distro-content-1 .js-platform-ee')
within distro_instructions_ee do
expect(page).to have_content('Install and configure the necessary dependencies')
end
expect(page.has_selector?('.distro-content-1 .js-platform-ce')).to eq(false)
end
it 'contains links for each omnibus supported platform' do
page.all('.method.omnibus a.tile').each do |installation_tile|
expect(installation_tile[:href]).to_not be_empty
end
end
it 'contains links for each official installation method' do
page.all('.method.official a.tile').each do |installation_tile|
expect(installation_tile[:href]).to_not be_empty
end
end
end
end
require 'spec_helper'
describe 'pricing page', :js do
before do
visit '/pricing'
end
context 'when looking at the offerings' do
context 'the page starts with gitlab.com plans' do
it 'shows the pane with the gitlab-com id as active' do
expect(find('.tab-pane.active')[:id]).to eq('gitlab-com')
end
it 'sends you to the gitlab.com signup form when clicking at the free plan' do
expect(find('.plan--free .plan-actions a')[:href]).to eq('https://gitlab.com/users/sign_in')
end
it 'contains a total of 4 plans with their characteristics' do
expect(page.assert_selector('.tab-pane.active .plan', count: 4)).to be_truthy
end
end
context 'when looking at the self-hosted offerings' do
before do
click_link('Self-Managed', { href: '#self-managed' })
end
it 'shows the pane with the self-hosted id as active' do
expect(find('.tab-pane.active')[:id]).to eq('self-managed')
end
it 'sends you to the install page for the core plan' do
expect(find('.plan--core .plan-actions a')[:href]).to include('/install')
end
it 'contains a total of 4 plans with their characteristics' do
expect(page.assert_selector('.tab-pane.active .plan', count: 4)).to be_truthy
end
end
end
context 'when looking at the CTA' do
it 'is able to contact sales' do
expect(page).to have_css('.contact-block')
expect(page).to have_selector(:link_or_button, 'Contact Sales')
expect(find('.contact-block a')[:href]).to include('/sales')
end
end
context 'when looking at the FAQ' do
it 'contains a list of questions' do
expect(page.assert_selector('.faq-item', minimum: 1)).to be_truthy
end
it 'shows the contents of a question when it is clicked' do
first('.faq-item .js-faq-question').click
expect(page.assert_selector('.faq-item.is-open', count: 1)).to be_truthy
end
end
end
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