File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ describe('ProtractorHarnessEnvironment', () => {
52
52
expect ( await subHarnessHost . text ( { exclude : 'h2' } ) ) . toBe ( 'ProtractorTestBedOther' ) ;
53
53
expect ( await subHarnessHost . text ( { exclude : 'li' } ) ) . toBe ( 'List of test tools' ) ;
54
54
} ) ;
55
+
56
+ it ( 'should be able to retrieve the ElementFinder from a ProtractorElement' , async ( ) => {
57
+ const element = ProtractorHarnessEnvironment . getNativeElement ( await harness . host ( ) ) ;
58
+ expect ( await element . getTagName ( ) ) . toBe ( 'test-main' ) ;
59
+ } ) ;
55
60
} ) ;
56
61
57
62
describe ( 'shadow DOM interaction' , ( ) => {
@@ -73,13 +78,6 @@ describe('ProtractorHarnessEnvironment', () => {
73
78
. getHarness ( MainComponentHarness ) ;
74
79
expect ( await ( await harness . deepShadow ( ) ) . text ( ) ) . toBe ( 'Shadow 2' ) ;
75
80
} ) ;
76
-
77
- it ( 'should be able to retrieve the ElementFinder from a ProtractorElement' , async ( ) => {
78
- const harness = await ProtractorHarnessEnvironment . loader ( { queryFn : piercingQueryFn } )
79
- . getHarness ( MainComponentHarness ) ;
80
- const element = ProtractorHarnessEnvironment . getNativeElement ( await harness . host ( ) ) ;
81
- expect ( await element . getTagName ( ) ) . toBe ( 'test-main' ) ;
82
- } ) ;
83
81
} ) ;
84
82
} ) ;
85
83
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ describe('TestbedHarnessEnvironment', () => {
78
78
fakeAsync ( async ( ) => {
79
79
expect ( await harness . getTaskStateResult ( ) ) . toBe ( 'result' ) ;
80
80
} ) ) ;
81
+
82
+ it ( 'should be able to retrieve the native DOM element from a UnitTestElement' , async ( ) => {
83
+ const element = TestbedHarnessEnvironment . getNativeElement ( await harness . host ( ) ) ;
84
+ expect ( element . id ) . toContain ( 'root' ) ;
85
+ } ) ;
81
86
} ) ;
82
87
83
88
describe ( 'change detection behavior' , ( ) => {
@@ -150,13 +155,6 @@ describe('TestbedHarnessEnvironment', () => {
150
155
) ;
151
156
expect ( await ( await harness . deepShadow ( ) ) . text ( ) ) . toBe ( 'Shadow 2' ) ;
152
157
} ) ;
153
-
154
- it ( 'should be able to retrieve the native DOM element from a UnitTestElement' , async ( ) => {
155
- const harness = await TestbedHarnessEnvironment
156
- . harnessForFixture ( fixture , MainComponentHarness ) ;
157
- const element = TestbedHarnessEnvironment . getNativeElement ( await harness . host ( ) ) ;
158
- expect ( element . id ) . toContain ( 'root' ) ;
159
- } ) ;
160
158
} ) ;
161
159
}
162
160
} ) ;
You can’t perform that action at this time.
0 commit comments