|
|
|
@@ -604,7 +604,7 @@ export function test_parse_ShouldParseCustomComponentWithoutXmlInListViewTemplat
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parse_ShouldParseNestedListViewInListViewTemplate() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd"><ListView items="{{ items }}" itemLoading="{{ itemLoading }}"><ListView.itemTemplate><ListView items="{{ subItems }}" /></ListView.itemTemplate></ListView></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd"><ListView items="{{ items }}" itemLoading="{{ itemLoading }}"><ListView.itemTemplate><ListView items="{{ subItems }}" /></ListView.itemTemplate></ListView></Page>');
|
|
|
|
|
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var ctrl;
|
|
|
|
@@ -632,7 +632,7 @@ export function test_parse_ShouldParseNestedListViewInListViewTemplate() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parse_ShouldEvaluateEventBindingExpressionInListViewTemplate() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd"><ListView items="{{ items }}" itemLoading="{{ itemLoading }}"><ListView.itemTemplate><SegmentedBar items="{{ $parents[\'ListView\'].items }}" selectedIndexChanged="{{ $parents[\'ListView\'].changed }}" /></ListView.itemTemplate></ListView></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd"><ListView items="{{ items }}" itemLoading="{{ itemLoading }}"><ListView.itemTemplate><SegmentedBar items="{{ $parents[\'ListView\'].items }}" selectedIndexChanged="{{ $parents[\'ListView\'].changed }}" /></ListView.itemTemplate></ListView></Page>');
|
|
|
|
|
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var ctrl: segmentedBar.SegmentedBar;
|
|
|
|
@@ -670,7 +670,7 @@ export function test_parse_ShouldEvaluateEventBindingExpressionInListViewTemplat
|
|
|
|
|
|
|
|
|
|
export function test_parse_NestedRepeaters() {
|
|
|
|
|
var pageXML =
|
|
|
|
|
"<Page xmlns='http://www.nativescript.org/tns.xsd'>" +
|
|
|
|
|
"<Page xmlns='http://schemas.nativescript.org/tns.xsd'>" +
|
|
|
|
|
" <TabView>" +
|
|
|
|
|
" <TabView.items>" +
|
|
|
|
|
" <TabViewItem title='List'>" +
|
|
|
|
@@ -722,7 +722,7 @@ export function test_parse_NestedRepeaters() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parseSpansDirectlyOnLabel() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Label id="testLabel"><Span text="We are" fontSize="10"/><Span text="Awesome" fontAttributes="Bold"/></Label></StackLayout></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Label id="testLabel"><Span text="We are" fontSize="10"/><Span text="Awesome" fontAttributes="Bold"/></Label></StackLayout></Page>');
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var page = <Page>views[0];
|
|
|
|
|
var testLabel = <Label>page.getViewById("testLabel");
|
|
|
|
@@ -739,7 +739,7 @@ export function test_parseSpansDirectlyOnLabel() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parseSpansDirectlyOnButton() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><Span text="We are" fontSize="10"/><Span text="Awesome" fontAttributes="Bold"/></Button></StackLayout></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><Span text="We are" fontSize="10"/><Span text="Awesome" fontAttributes="Bold"/></Button></StackLayout></Page>');
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var page = <Page>views[0];
|
|
|
|
|
var testButton = <Button>page.getViewById("testButton");
|
|
|
|
@@ -756,7 +756,7 @@ export function test_parseSpansDirectlyOnButton() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parseFormattedStringWithoutFormattedText() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><FormattedString><FormattedString.spans><Span text="author"/><Span text=" num_comments"/></FormattedString.spans></FormattedString></Button></StackLayout></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><FormattedString><FormattedString.spans><Span text="author"/><Span text=" num_comments"/></FormattedString.spans></FormattedString></Button></StackLayout></Page>');
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var page = <Page>views[0];
|
|
|
|
|
var testButton = <Button>page.getViewById("testButton");
|
|
|
|
@@ -773,7 +773,7 @@ export function test_parseFormattedStringWithoutFormattedText() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parseFormattedStringFullSyntax() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><Button.formattedText><FormattedString><FormattedString.spans><Span text="author"/><Span text=" num_comments"/></FormattedString.spans></FormattedString></Button.formattedText></Button></StackLayout></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><Button.formattedText><FormattedString><FormattedString.spans><Span text="author"/><Span text=" num_comments"/></FormattedString.spans></FormattedString></Button.formattedText></Button></StackLayout></Page>');
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var page = <Page>views[0];
|
|
|
|
|
var testButton = <Button>page.getViewById("testButton");
|
|
|
|
@@ -790,7 +790,7 @@ export function test_parseFormattedStringFullSyntax() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function test_parseSpansDirectlyToFormattedString() {
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://www.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><FormattedString><Span text="author"/><Span text=" num_comments"/></FormattedString></Button></StackLayout></Page>');
|
|
|
|
|
var p = <Page>builder.parse('<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatedTo="pageNavigated"><StackLayout><Button id="testButton"><FormattedString><Span text="author"/><Span text=" num_comments"/></FormattedString></Button></StackLayout></Page>');
|
|
|
|
|
function testAction(views: Array<viewModule.View>) {
|
|
|
|
|
var page = <Page>views[0];
|
|
|
|
|
var testButton = <Button>page.getViewById("testButton");
|
|
|
|
|