fix(administrateur): tags persistence when non interacting with tags combobox
This commit is contained in:
parent
126819939b
commit
c112018ec3
2 changed files with 23 additions and 1 deletions
|
@ -58,4 +58,25 @@ describe 'Administrateurs can edit procedures', js: true do
|
|||
expect(page).to have_selector('.fr-breadcrumb li', text: 'Ma petite démarche')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when we associate tags' do
|
||||
scenario 'the administrator can edit and persist the tags' do
|
||||
procedure.update!(tags: ['social'])
|
||||
|
||||
visit edit_admin_procedure_path(procedure)
|
||||
select_combobox('procedure_tags_combo', 'planete', 'planete', check: false)
|
||||
click_on 'Enregistrer'
|
||||
|
||||
expect(procedure.reload.tags).to eq(['social', 'planete'])
|
||||
end
|
||||
|
||||
scenario 'the tags are persisted when non interacting with the tags combobox' do
|
||||
procedure.update!(tags: ['social'])
|
||||
|
||||
visit edit_admin_procedure_path(procedure)
|
||||
click_on 'Enregistrer'
|
||||
|
||||
expect(procedure.reload.tags).to eq(['social'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue