-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation and a test for the styles preview page (#1045)
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe "Styles Preview page", type: :system, connect_to_mediaflux: false, js: true do | ||
context "unauthenticated user" do | ||
it "shows the 'Log In' button" do | ||
visit "/styles_preview" | ||
expect(page).to have_content "Log in" | ||
end | ||
end | ||
|
||
context "authenticated user" do | ||
let(:current_user) { FactoryBot.create(:user, uid: "pul123") } | ||
it "shows the Styles Preview message" do | ||
sign_in current_user | ||
visit "/styles_preview" | ||
expect(page).to have_content "This page shows the styles that have been implemented for this site's look and feel." | ||
end | ||
end | ||
end |