This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): add componentSanityCheck helper for simple component sanity
- simply runs the component through the instantiation and destroy lifecycle phases. - allows easy basic testing of component init/destroy for components that do not do much or have no behavioral spec yet. - when running on sauce this will become more valuable. - add sanity checks for some missing components.
- Loading branch information
1 parent
f829bd8
commit 2b308d8
Showing
5 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {componentSanityCheck} from "../../util"; | ||
|
||
export function main() { | ||
componentSanityCheck('Checkbox', 'md-checkbox', `<md-checkbox checked="true"></md-checkbox>`); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {componentSanityCheck} from "../../util"; | ||
|
||
export function main() { | ||
let template = `<md-input-container><input md-input type="text"></md-input-container>`; | ||
componentSanityCheck('Input Container', 'md-input-container', template); | ||
componentSanityCheck('Input', 'input[md-input]', template); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import {componentSanityCheck} from "../../util"; | ||
|
||
export function main() { | ||
let template = ` | ||
<md-list> | ||
<md-list-item class="md-2-line"> | ||
<img/> | ||
<div class="md-list-item-text"> | ||
<h3>Title</h3> | ||
<p>Secondary text</p> | ||
</div> | ||
</md-list-item> | ||
</md-list> | ||
`; | ||
componentSanityCheck('List', 'md-list', template); | ||
componentSanityCheck('List Item', 'md-list-item', template); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import {componentSanityCheck} from "../../util"; | ||
|
||
export function main() { | ||
componentSanityCheck('Switch', 'md-switch', `<md-switch checked="true"></md-switch>`); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters