refactor(ujs): turbo use an id for turbo_stream.update id
not a class
This commit is contained in:
parent
b0aa777315
commit
7a9c5e8d19
4 changed files with 6 additions and 6 deletions
|
@ -3,11 +3,11 @@ import { show, hide } from '@utils';
|
|||
export function showFusion() {
|
||||
show(document.querySelector('.fusion'));
|
||||
hide(document.querySelector('.new-account'));
|
||||
hide(document.querySelector('.new-account-password-confirmation'));
|
||||
hide(document.querySelector('#new-account-password-confirmation'));
|
||||
}
|
||||
|
||||
export function showNewAccount() {
|
||||
hide(document.querySelector('.fusion'));
|
||||
show(document.querySelector('.new-account'));
|
||||
hide(document.querySelector('.new-account-password-confirmation'));
|
||||
hide(document.querySelector('#new-account-password-confirmation'));
|
||||
}
|
||||
|
|
|
@ -43,4 +43,4 @@
|
|||
= submit_tag t('.button_use_this_email'), class: 'button primary'
|
||||
|
||||
|
||||
.new-account-password-confirmation.hidden
|
||||
#new-account-password-confirmation.hidden
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
= turbo_stream.update '.new-account-password-confirmation', partial: 'password_confirmation', locals: { email: @email, merge_token: @merge_token }
|
||||
= turbo_stream.update 'new-account-password-confirmation', partial: 'password_confirmation', locals: { email: @email, merge_token: @merge_token }
|
||||
= turbo_stream.hide_all '.fusion'
|
||||
= turbo_stream.hide_all '.new-account'
|
||||
= turbo_stream.show_all '.new-account-password-confirmation'
|
||||
= turbo_stream.show 'new-account-password-confirmation'
|
||||
|
|
|
@ -83,7 +83,7 @@ describe 'France Connect Particulier Connexion' do
|
|||
|
||||
expect(page).to have_css('#password-for-another-account', visible: true)
|
||||
|
||||
within '.new-account-password-confirmation' do
|
||||
within '#new-account-password-confirmation' do
|
||||
fill_in 'password', with: 'my-s3cure-p4ssword'
|
||||
click_on 'Fusionner les comptes'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue