|
1 | 1 | // make sure you import mocha-config before @angular/core
|
2 |
| -import {assert} from './test-config'; |
3 |
| -import {Component, ElementRef} from '@angular/core'; |
4 |
| -import {createDevice, dumpView} from './test-utils'; |
5 |
| -import {DEVICE} from 'nativescript-angular/platform-providers'; |
6 |
| -import {platformNames} from 'platform'; |
7 |
| -import {nTestBedAfterEach, nTestBedBeforeEach, nTestBedRender} from 'nativescript-angular/testing'; |
| 2 | +import { assert } from "./test-config"; |
| 3 | +import { Component, ElementRef } from "@angular/core"; |
| 4 | +import { dumpView, createDevice } from "./test-utils"; |
| 5 | +import { DEVICE } from "nativescript-angular/platform-providers"; |
| 6 | +import { platformNames } from "platform"; |
| 7 | +import { nTestBedAfterEach, nTestBedBeforeEach, nTestBedRender } from "nativescript-angular/testing"; |
8 | 8 |
|
9 | 9 | @Component({
|
10 | 10 | template: `
|
11 |
| - <StackLayout> |
12 |
| - <ios><Label text="IOS"></Label></ios> |
13 |
| - </StackLayout>` |
| 11 | + <StackLayout> |
| 12 | + <ios><Label text="IOS"></Label></ios> |
| 13 | + </StackLayout>` |
14 | 14 | })
|
15 | 15 | export class IosSpecificComponent {
|
16 |
| - constructor(public elementRef: ElementRef) { |
17 |
| - } |
| 16 | + constructor(public elementRef: ElementRef) { } |
18 | 17 | }
|
19 | 18 |
|
20 | 19 | @Component({
|
21 | 20 | template: `
|
22 |
| - <StackLayout> |
23 |
| - <android><Label text="ANDROID"></Label></android> |
24 |
| - </StackLayout>` |
| 21 | + <StackLayout> |
| 22 | + <android><Label text="ANDROID"></Label></android> |
| 23 | + </StackLayout>` |
25 | 24 | })
|
26 | 25 | export class AndroidSpecificComponent {
|
27 |
| - constructor(public elementRef: ElementRef) { |
28 |
| - } |
| 26 | + constructor(public elementRef: ElementRef) { } |
29 | 27 | }
|
30 | 28 |
|
31 | 29 | @Component({
|
32 | 30 | template: `
|
33 |
| - <StackLayout> |
34 |
| - <Label android:text="ANDROID" ios:text="IOS"></Label> |
35 |
| - </StackLayout>` |
| 31 | + <StackLayout> |
| 32 | + <Label android:text="ANDROID" ios:text="IOS"></Label> |
| 33 | + </StackLayout>` |
36 | 34 | })
|
37 | 35 | export class PlatformSpecificAttributeComponent {
|
38 |
| - constructor(public elementRef: ElementRef) { |
39 |
| - } |
| 36 | + constructor(public elementRef: ElementRef) { } |
40 | 37 | }
|
41 | 38 |
|
42 |
| -// TODO: Something is different in dumpView. I suspect it has to do with the fact that the old |
43 |
| -// test app class rendered directly into a view container and returned the exact component, whereas |
44 |
| -// testbed appears to return a reference to the root component? Needs investigation. |
45 | 39 | xdescribe("Platform filter directives", () => {
|
46 |
| - |
| 40 | + // TODO: Something is different in dumpView. I suspect it has to do with the fact that the old |
| 41 | + // test app class rendered directly into a view container and returned the exact component, whereas |
| 42 | + // testbed appears to return a reference to the root component? Needs investigation. |
47 | 43 | describe("on IOS device", () => {
|
48 | 44 | beforeEach(nTestBedBeforeEach(
|
49 | 45 | [PlatformSpecificAttributeComponent, AndroidSpecificComponent, IosSpecificComponent],
|
|
0 commit comments