测试 extjs 应用程序 [英] Testing extjs apps
问题描述
当组件或组件部分(如网格中的组件或组件部分)有预置的 id 时,我如何测试 extjs 应用程序.
我可以为每个组件添加 id,但是如果我错过了一个或多个,并且应用程序又大又复杂怎么办?
ExtJS/Siesta 中是否有一个函数或某个模块允许您在应用程序中定位组件/元素,而无需依赖于每个组件的预定义 id
一>.我已经看到了我与他们之间的相当多的问题.
其次,ExtJS 提供了多种定位组件和元素的方法.不要将两者混为一谈.
对于组件:
- Ext.getCmp(id)
- Ext.ComponentQuery.查询()
- up()
- down()
- nextSibling()
- previousSibling()
- child()
- previousNode()
加上各种find..
方法
对于元素:
更多关于 DOM 查询 http://docs.sencha.com/core/manual/content/domquery.html
How can I test extjs application when there are pregerated ids for components or compoent parts like in a grid.
I can add ids to each component but what if I miss one or more, and the application is big and complex?
Is there a function or some module in ExtJS/Siesta which allows you to locate components/elements in the application without beign dependent on predefined ids for each component
First of all be very careful using IDs on the components. I have seen my fair share of problems with them.
Second, ExtJS provides several ways of targeting Components and Elements. Don't mix the two.
For Components:
- Ext.getCmp(id)
- Ext.ComponentQuery.query()
- up()
- down()
- nextSibling()
- previousSibling()
- child()
- previousNode()
plus various find..
methods
For Elements:
more on DOM Query http://docs.sencha.com/core/manual/content/domquery.html
这篇关于测试 extjs 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!