mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 17:12:11 +08:00
**Previously**, the OmniAuth confirmation page (`/auth/:provider`) was a basic, unstyled page with just a title and button in the corner. **In this update**, redesigned the page with a centered card layout, purple gradient background matching the wizard branding, Discourse logo, improved copy showing the site name, and proper BEM-structured CSS using shared brand color variables. **BEFORE:** | Dark | Light | | ----- | ----- | | <img width="1400" height="1400" alt="omniauth_confirm_BEFORE_dark" src="https://github.com/user-attachments/assets/129233a7-be50-4b61-b7dc-412c7562ad07" /> | <img width="1400" height="1400" alt="omniauth_confirm_BEFORE_light" src="https://github.com/user-attachments/assets/d9c1ecd0-ab19-4d31-9ef6-48477bacd132" /> | **AFTER:** | Dark | Light | | ----- | ----- | | <img width="1400" height="1400" alt="omniauth_final_dark" src="https://github.com/user-attachments/assets/bef7793a-9c02-42a1-8e48-994793b32252" /> | <img width="1400" height="1400" alt="omniauth_final_light" src="https://github.com/user-attachments/assets/e76dfa8c-5ec5-4676-95a5-a1f9f2b9723c" /> |
45 lines
1.7 KiB
Ruby
45 lines
1.7 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "OmniAuth Confirm Page" do
|
|
let(:omniauth_confirm_page) { PageObjects::Pages::OmniauthConfirm.new }
|
|
|
|
before { SiteSetting.title = "My Awesome Community" }
|
|
|
|
context "with Google OAuth" do
|
|
before do
|
|
SiteSetting.enable_google_oauth2_logins = true
|
|
SiteSetting.google_oauth2_client_id = "fake_client_id"
|
|
SiteSetting.google_oauth2_client_secret = "fake_secret"
|
|
end
|
|
|
|
it "displays the styled confirmation page with correct content" do
|
|
omniauth_confirm_page.visit_provider("google_oauth2")
|
|
|
|
expect(omniauth_confirm_page).to have_logo
|
|
expect(omniauth_confirm_page).to have_card
|
|
expect(omniauth_confirm_page).to have_title_for_provider("Google")
|
|
expect(omniauth_confirm_page).to have_provider_info("Google")
|
|
expect(omniauth_confirm_page).to have_continue_button
|
|
expect(omniauth_confirm_page).to have_site_name_in_footer("My Awesome Community")
|
|
end
|
|
end
|
|
|
|
context "with Discourse ID" do
|
|
before do
|
|
SiteSetting.discourse_id_client_id = SecureRandom.hex
|
|
SiteSetting.discourse_id_client_secret = SecureRandom.hex
|
|
SiteSetting.enable_discourse_id = true
|
|
end
|
|
|
|
it "displays the styled confirmation page with correct content" do
|
|
omniauth_confirm_page.visit_provider("discourse_id")
|
|
|
|
expect(omniauth_confirm_page).to have_logo
|
|
expect(omniauth_confirm_page).to have_card
|
|
expect(omniauth_confirm_page).to have_title_for_provider("Discourse ID")
|
|
expect(omniauth_confirm_page).to have_provider_info("Discourse ID")
|
|
expect(omniauth_confirm_page).to have_continue_button
|
|
expect(omniauth_confirm_page).to have_site_name_in_footer("My Awesome Community")
|
|
end
|
|
end
|
|
end
|