简体   繁体   中英

Canonical way to e2e test angular UI grid

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM