Skip to content

Commit 74a3ed3

Browse files
committed
test: /signupページのGoogleフォーム表示崩れを検出するテストを追加
PR #1740で発生した/signupページのレイアウト崩れを検出するためのテストを追加。 以下の4つのシンプルなテストで、Googleフォームが正しくレンダリングされることを確認: - HTTPステータス200の確認 - iframe要素の存在確認 - GoogleフォームURLの存在確認 - テンプレート変数が処理されていることの確認 これらのテストにより、今後同様の問題が発生した場合にCIで即座に検出可能。
1 parent f76c7a0 commit 74a3ed3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

spec/requests/docs_spec.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,16 @@
2323
expect(response).to redirect_to root_url
2424
expect(response.status).to eq 302
2525
end
26+
27+
# /signup page has Google Form to be rendered.
28+
context 'signup page - Google Form rendering (Critical)' do
29+
before { get doc_path('signup') }
30+
31+
# The iframe is essential - without it, no one can submit applications
32+
it('responds with 200 OK') { expect(response).to have_http_status(:success) }
33+
it('contains Google Forms') { expect(response.body).to include('<iframe') }
34+
it('contains Google Forms URL') { expect(response.body).to include('docs.google.com/forms') }
35+
it('has no raw CONSTANT name') { expect(response.body).not_to include('{{ INACTIVE_THRESHOLD }}') }
36+
end
2637
end
27-
end
38+
end

0 commit comments

Comments
 (0)