Prestashop: Provide useful data attributes into Link Widget hook list for puppeter tests

Created on 13 Feb 2020  路  6Comments  路  Source: PrestaShop/PrestaShop

PR https://github.com/PrestaShop/PrestaShop/pull/17477 has broken some puppeeter tests because they used the hook ID selectors. Modifying the hook list has modified the <li> IDs generated from hook list. Basically if we modify the order of items in hook.xml file, it changes the IDs 馃槃

The puppeeter tests should not rely on such generated IDs which can change often. Instead Link Widget should provide reliable attributes targetable by puppeeter tests. @boubkerbribri and I agreed on a data-hook-name attribute.

We need to add these data-hook-name to <li> items in Link Widget hook list so that QA team can adapt their tests and fix them in a reliable way.

BO Bug Critical Fixed Link widget PR available

Most helpful comment

Critical because it breaks nighthly tests

All 6 comments

Critical because it breaks nighthly tests

After discussion with @boubkerbribri, we need to add

  • data-hook-name on select2 li
  • data-hook-name on div class="card js-grid-panel" id="{{ grid.id }}_grid_panel" (src/PrestaShopBundle/Resources/views/Admin/Common/Grid/grid_panel.html.twig)

Has it been done already ? Is it on the develop branch ?

It's a WIP from my side :)

PR PrestaShop/ps_linklist#88

Thank you @Progi1984 , this was fixed by PrestaShop/ps_linklist#88 :tada:

Was this page helpful?
0 / 5 - 0 ratings