Canonical way to e2e test angular UI grid

蹲街弑〆低调 提交于 2019-12-31 06:49:46

问题


The Story:

Recently, our UI switched from custom tables to Angular UI grid as it got stabilized and feature-rich.

The main Angular UI grid page claims to have "e2e testing integration", but we are having the hard time making this work.

From what we understand, what they meant under "e2e testing integration" is the two helper files: gridTestUtils and gridObjectTestUtils.

There are multiple problems with that:

  • these two helper files are not a part of the angular-ui-grid module itself and are not available as a separate library which means we need to basically copy the current contents of both files and create them locally manually
  • it looks like all the helper functions require a grid ID to be known beforehand, but our grids have auto-generated (by angular-ui-grid itself actually) ids and we locate the grids using other locators

On the other hand, the provided in these helper files methods like resizeHeaderCell(), shiftClickHeaderCell() are really handy and may save a lot of time when it comes to testing.

The Question:

What is the canonical way to test angular UI grids and has anyone had any luck e2e-test-integrating with the library via the above-mentioned helper functions?


回答1:


You don't need to copy the current contents of these files and create them locally manually. You can install ui-grid repository via npm: npm install angular-ui/ui-grid.



来源:https://stackoverflow.com/questions/34502815/canonical-way-to-e2e-test-angular-ui-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!