fix(spec): add- between position and label
This commit is contained in:
parent
1cd552c79f
commit
9edf0f5450
1 changed files with 3 additions and 3 deletions
|
@ -261,7 +261,7 @@ describe 'As an administrateur I can edit types de champ', js: true do
|
||||||
page.find(initial_first_coordinate_selector).click
|
page.find(initial_first_coordinate_selector).click
|
||||||
expect(page).to have_selector("#{initial_first_coordinate_selector} option", count: 3)
|
expect(page).to have_selector("#{initial_first_coordinate_selector} option", count: 3)
|
||||||
expect(page.find(initial_first_coordinate_selector).find("option[selected]").value.to_s).to eq(initial_first_coordinate.stable_id.to_s)
|
expect(page.find(initial_first_coordinate_selector).find("option[selected]").value.to_s).to eq(initial_first_coordinate.stable_id.to_s)
|
||||||
expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['1 first_tdc', '2 middle_tdc', '3 last_tdc'])
|
expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['1 - first_tdc', '2 - middle_tdc', '3 - last_tdc'])
|
||||||
|
|
||||||
# renaming a tdc renames it's option
|
# renaming a tdc renames it's option
|
||||||
within "##{dom_id(initial_first_coordinate, :type_de_champ_editor)}" do
|
within "##{dom_id(initial_first_coordinate, :type_de_champ_editor)}" do
|
||||||
|
@ -272,7 +272,7 @@ describe 'As an administrateur I can edit types de champ', js: true do
|
||||||
expect(page).to have_text('Formulaire enregistré')
|
expect(page).to have_text('Formulaire enregistré')
|
||||||
page.find(initial_first_coordinate_selector).click
|
page.find(initial_first_coordinate_selector).click
|
||||||
expect(page).to have_css("#{initial_first_coordinate_selector} option", count: 3)
|
expect(page).to have_css("#{initial_first_coordinate_selector} option", count: 3)
|
||||||
expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['1 renamed', '2 middle_tdc', '3 last_tdc'])
|
expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['1 - renamed', '2 - middle_tdc', '3 - last_tdc'])
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'when select is changed, it move the coordinates' do
|
scenario 'when select is changed, it move the coordinates' do
|
||||||
|
@ -323,7 +323,7 @@ describe 'As an administrateur I can edit types de champ', js: true do
|
||||||
expect(page).to have_selector("#{first_child_coordinate_selector} option", count: 2)
|
expect(page).to have_selector("#{first_child_coordinate_selector} option", count: 2)
|
||||||
|
|
||||||
opts = page.find(first_child_coordinate_selector).all("option").map(&:text)
|
opts = page.find(first_child_coordinate_selector).all("option").map(&:text)
|
||||||
expect(opts).to match_array(children_coordinates.map { "#{_1.position + 1} #{_1.libelle}" })
|
expect(opts).to match_array(children_coordinates.map { "#{_1.position + 1} - #{_1.libelle}" })
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'when first child select is changed, move champ in repetition' do
|
scenario 'when first child select is changed, move champ in repetition' do
|
||||||
|
|
Loading…
Add table
Reference in a new issue