diff --git a/lib/pagy/extras/materialize.rb b/lib/pagy/extras/materialize.rb index 60d6cd01a..7f9224d0d 100644 --- a/lib/pagy/extras/materialize.rb +++ b/lib/pagy/extras/materialize.rb @@ -46,18 +46,18 @@ def pagy_materialize_combo_nav_js(pagy, deprecated_id=nil, pagy_id: nil, link_ex link = pagy_link_proc(pagy, link_extra: link_extra) p_page = pagy.page p_pages = pagy.pages - style = ' style="vertical-align: middle;"' - input = %() + style = ' style="vertical-align: middle"' + input = %() - %(
) + pagy_materialize_prev_html pagy, link, style + }
  • #{ + pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages + }
  • #{ + pagy_materialize_next_html pagy, link, style + }) end private diff --git a/test/e2e/public/normalize-styles.css b/test/e2e/public/normalize-styles.css index c5ac36ea8..9b74717c1 100644 --- a/test/e2e/public/normalize-styles.css +++ b/test/e2e/public/normalize-styles.css @@ -36,14 +36,6 @@ ul li, margin-right: .3em; } -/* normalize materialize combo specific */ -.pagy-materialize-combo-nav-js .pagy-compact-chip { - height: auto !important; - background: none !important; - border-radius: 0 !important; - display: inline-flex !important; -} - /* normalize missing chevron icons (materialize and semantic) */ li i.material-icons, .item i.chevron { diff --git a/test/pagy/extras/materialize_test.rb.yml b/test/pagy/extras/materialize_test.rb.yml index 8fc56ab94..8d2f2bd13 100644 --- a/test/pagy/extras/materialize_test.rb.yml +++ b/test/pagy/extras/materialize_test.rb.yml @@ -1,4 +1,57 @@ --- +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0001_renders first page 1: '' +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0001_renders first page 2: '' +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0002_renders intermediate page 1: '' +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0002_renders intermediate page 2: '' +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0003_renders last page 1: '' +pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0003_renders last page 2: '' pagy/extras/materialize::#pagy_materialize_nav#test_0002_renders intermediate page 1: -pagy/extras/materialize::#pagy_materialize_combo_nav_js#test_0001_renders first page 1: '