Merge pull request #10840 from tchak/fix-pagination-links
fix some playwright specs
This commit is contained in:
commit
b1c0b4de20
6 changed files with 8 additions and 7 deletions
|
@ -1,2 +1,2 @@
|
||||||
%li
|
%li
|
||||||
= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, remote: remote, class: 'fr-pagination__link fr-pagination__link--first', 'aria-disabled': true, title: 'Première page', role: 'link'
|
= link_to_unless current_page.first?, t('views.pagination.first').html_safe, url, remote: remote, class: 'fr-pagination__link fr-pagination__link--first', title: 'Première page', role: 'link'
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
%li
|
%li
|
||||||
= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, rel: 'next', remote: remote, class: 'fr-pagination__link fr-pagination__link--last', 'aria-disabled': true, title: "Dernière page", role: 'link'
|
= link_to_unless current_page.last?, t('views.pagination.last').html_safe, url, rel: 'next', remote: remote, class: 'fr-pagination__link fr-pagination__link--last', title: "Dernière page", role: 'link'
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
%li
|
%li
|
||||||
= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, rel: 'next', remote: remote, class: 'fr-pagination__link fr-pagination__link--next fr-pagination__link--lg-label', 'aria-disabled': true, role: 'link'
|
= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, rel: 'next', remote: remote, class: 'fr-pagination__link fr-pagination__link--next fr-pagination__link--lg-label', role: 'link'
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
%li
|
%li
|
||||||
= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, rel: 'prev', remote: remote, class: 'fr-pagination__link fr-pagination__link--prev fr-pagination__link--lg-label', 'aria-disabled': true, role: 'link'
|
= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, rel: 'prev', remote: remote, class: 'fr-pagination__link fr-pagination__link--prev fr-pagination__link--lg-label', role: 'link'
|
||||||
|
|
|
@ -43,7 +43,7 @@ describe "procedure filters" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "should add be able to add created_at column", chrome: true do
|
scenario "should add be able to add created_at column", js: true do
|
||||||
add_column("Créé le")
|
add_column("Créé le")
|
||||||
within ".dossiers-table" do
|
within ".dossiers-table" do
|
||||||
expect(page).to have_link("Créé le")
|
expect(page).to have_link("Créé le")
|
||||||
|
@ -51,7 +51,7 @@ describe "procedure filters" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "should add be able to add and remove custom type_de_champ column", chrome: true do
|
scenario "should add be able to add and remove custom type_de_champ column", js: true do
|
||||||
add_column(type_de_champ.libelle)
|
add_column(type_de_champ.libelle)
|
||||||
within ".dossiers-table" do
|
within ".dossiers-table" do
|
||||||
expect(page).to have_link(type_de_champ.libelle)
|
expect(page).to have_link(type_de_champ.libelle)
|
||||||
|
@ -229,6 +229,7 @@ describe "procedure filters" do
|
||||||
|
|
||||||
def add_column(column_name)
|
def add_column(column_name)
|
||||||
click_on 'Personnaliser'
|
click_on 'Personnaliser'
|
||||||
|
scroll_to(find('input[aria-label="Colonne à afficher"]'), align: :center)
|
||||||
select_combobox('Colonne à afficher', column_name)
|
select_combobox('Colonne à afficher', column_name)
|
||||||
click_button "Enregistrer"
|
click_button "Enregistrer"
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,7 +58,7 @@ describe 'user access to the list of their dossiers', js: true do
|
||||||
context 'when there is more than one page' do
|
context 'when there is more than one page' do
|
||||||
let(:dossiers_per_page) { 2 }
|
let(:dossiers_per_page) { 2 }
|
||||||
|
|
||||||
scenario 'the user can navigate through the other pages', chrome: true do
|
scenario 'the user can navigate through the other pages' do
|
||||||
expect(page).not_to have_link(dossier_en_instruction.procedure.libelle)
|
expect(page).not_to have_link(dossier_en_instruction.procedure.libelle)
|
||||||
page.click_link("Suivant")
|
page.click_link("Suivant")
|
||||||
page.click_link("Suivant")
|
page.click_link("Suivant")
|
||||||
|
|
Loading…
Add table
Reference in a new issue