Add spec to show sticky button on mobile screens
Also remove some unnecessary css lines that were causing some unrelated specs to fail.
This commit is contained in:
@@ -446,8 +446,6 @@ header {
|
||||
background: $brand;
|
||||
border-bottom: 1px solid $border;
|
||||
margin-bottom: $line-height;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.selected {
|
||||
border-bottom: 1px solid #fff;
|
||||
|
||||
@@ -178,6 +178,27 @@ feature "Proposals" do
|
||||
end
|
||||
end
|
||||
|
||||
context "Show on mobile screens" do
|
||||
|
||||
before do
|
||||
Capybara.page.driver.browser.manage.window.resize_to(640, 480)
|
||||
end
|
||||
|
||||
after do
|
||||
Capybara.page.driver.browser.manage.window.maximize
|
||||
end
|
||||
|
||||
scenario "Show support button sticky at bottom", :js do
|
||||
proposal = create(:proposal)
|
||||
visit proposal_path(proposal)
|
||||
|
||||
within("#proposal_sticky") do
|
||||
expect(page).to have_css(".is-stuck")
|
||||
expect(page).not_to have_css(".is-anchored")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "Embedded video" do
|
||||
|
||||
scenario "Show YouTube video" do
|
||||
|
||||
Reference in New Issue
Block a user