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:
decabeza
2019-02-13 17:01:52 +01:00
parent 13dfaedf06
commit 4b3172912e
2 changed files with 21 additions and 2 deletions

View File

@@ -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;

View File

@@ -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