FEATURE: update bootstrap mode notice to add invite and wizard links (#17822)

* FEATURE: update bootstrap mode notice to add invite and wizard links

* Updates per feedback on PR

* Fix the wizard link not showing

* Remove unneeded function

* Remove router service injection
This commit is contained in:
Arpit Jalan
2022-08-10 00:13:42 +05:30
committed by GitHub
parent d57bea4de3
commit 10a1b6b0a9
11 changed files with 141 additions and 41 deletions

View File

@ -114,13 +114,13 @@ RSpec.describe TranslationOverride do
end
it 'sanitizes values before upsert' do
xss = "<a href='%{url}' data-auto-route='true'>setup wizard</a> <script>alert('TEST');</script>"
xss = "<a target='blank' href='%{path}'>Click here</a> <script>alert('TEST');</script>"
TranslationOverride.upsert!('en', 'js.wizard_required', xss)
TranslationOverride.upsert!('en', 'js.themes.error_caused_by', xss)
ovr = TranslationOverride.where(locale: 'en', translation_key: 'js.wizard_required').first
ovr = TranslationOverride.where(locale: 'en', translation_key: 'js.themes.error_caused_by').first
expect(ovr).to be_present
expect(ovr.value).to eq("<a href=\"%{url}\" data-auto-route=\"true\">setup wizard</a> alert('TEST');")
expect(ovr.value).to eq("<a href=\"%{path}\">Click here</a> alert('TEST');")
end
it "stores js for a message format key" do