Commit a3efd54
authored
Allow test-helpers to accept DOM Elements
One of the issues I ran into I didn't have access to the selector strings but instead the actual DOM element. This is usually the case in addons like [fractal-page-object](https://github.com/bendemboski/fractal-page-object).
With this change we can seamlessly use both. Ember test-helpers function with both a string selector or a DOM Element. Here is a working example:
```js
class Foo extends PageObject {
form = selector('[data-test-selector=my-form]', class extends PageObject {
calendar = selector('ember-power-calendar', class extends PageObject {
selectDate(date) {
return calendarSelect(this.element, date);
}
});
});
}
```1 parent 89055f7 commit a3efd54
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
0 commit comments