规范的方法来测试端到端角度UI电网 [英] Canonical way to e2e test angular UI grid

查看:97
本文介绍了规范的方法来测试端到端角度UI电网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的故事:

近日,我们从UI自定义表切换到角UI电网的,因为它得到了稳定,功能丰富。

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

主要角UI电网页声称拥有端到端测试一体化,但我们目前的困难时期做这项工作。

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

据我们了解,他们的意思是端到端测试一体化下是两个帮手文件 gridTestUtils 和的 gridObjectTestUtils

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

有多个问题与:


  • 这两个辅助文件不是角UI网模块本身的一部分,并不能作为一个独立的库,这意味着我们需要基本复制这两个文件的电流的内容,并在本地手工创建它们

  • 它看起来像所有的辅助功能要求将事先知道一个网格ID,但我们的网格的自动生成(按角UI网其实本身)的IDS我们找到使用其他定位器网格

  • 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

在另一方面,在这些辅助程序文件的方法,如 resizeHeaderCell提供() shiftClickHeaderCell()是真方便,当谈到测试可以节省大量的时间。

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.

问题:

什么是测试角度UI电网的正规途径,并且人有任何运气E2E测试 - 通过整合上述辅助函数的图书馆吗?

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?

推荐答案

您不必复制这些文件的当前内容,并在本地手动创建它们。您可以通过安装NPM UI格库: NPM安装角UI / UI网

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.

这篇关于规范的方法来测试端到端角度UI电网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆