mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Pages for ui-tests
This commit is contained in:
@ -211,6 +211,10 @@
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\listview_binding.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\modal-view\login-page.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\modal-view\modal-view.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\text-field.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\text-view.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\label.ts" />
|
||||
<TypeScriptCompile Include="apps\ui-tests-app\pages\text\button.ts" />
|
||||
<TypeScriptCompile Include="es-collections.d.ts" />
|
||||
<TypeScriptCompile Include="es6-promise.d.ts" />
|
||||
<TypeScriptCompile Include="file-system\file-name-resolver.d.ts" />
|
||||
@ -660,6 +664,10 @@
|
||||
<Content Include="apps\template-tab-navigation\app.css" />
|
||||
<Content Include="apps\ui-tests-app\modal-view\login-page.xml" />
|
||||
<Content Include="apps\ui-tests-app\modal-view\modal-view.xml" />
|
||||
<Content Include="apps\ui-tests-app\pages\text\text-field.xml" />
|
||||
<Content Include="apps\ui-tests-app\pages\text\text-view.xml" />
|
||||
<Content Include="apps\ui-tests-app\pages\text\label.xml" />
|
||||
<Content Include="apps\ui-tests-app\pages\text\button.xml" />
|
||||
<Content Include="ui\layouts\stack-layout\package.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@ -1608,7 +1616,7 @@
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
<UserProperties ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" />
|
||||
<UserProperties ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2linear-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
16
apps/ui-tests-app/pages/text/button.ts
Normal file
16
apps/ui-tests-app/pages/text/button.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import stack = require("ui/layouts/stack-layout");
|
||||
import style = require("ui/styling/style");
|
||||
import view = require("ui/core/view");
|
||||
export function resetStyles(args) {
|
||||
var stackLayout = <stack.StackLayout>args.object.parent;
|
||||
view.eachDescendant(stackLayout, function (v: view.View) {
|
||||
v.style._resetValue(style.fontFamilyProperty);
|
||||
v.style._resetValue(style.fontSizeProperty);
|
||||
v.style._resetValue(style.fontStyleProperty);
|
||||
v.style._resetValue(style.fontWeightProperty);
|
||||
v.style._resetValue(style.fontProperty);
|
||||
v.style._resetValue(style.colorProperty);
|
||||
v.style._resetValue(style.textAlignmentProperty);
|
||||
return true;
|
||||
});
|
||||
}
|
25
apps/ui-tests-app/pages/text/button.xml
Normal file
25
apps/ui-tests-app/pages/text/button.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
|
||||
<Button text="no align" />
|
||||
<Button text="left" style="text-align: left" />
|
||||
<Button text="center" style="text-align: center" />
|
||||
<Button text="right" style="text-align: right" />
|
||||
|
||||
<WrapLayout>
|
||||
<Button text="normal" />
|
||||
<Button text="color" style="color: green"/>
|
||||
<Button text="size" style="font-size: 32" />
|
||||
<Button text="italic" style="font-style: italic" />
|
||||
<Button text="bold" style="font-weight: bold"/>
|
||||
<Button text="bold-italic" style="font-weight: bold; font-style: italic"/>
|
||||
<Button text="serif" style="font-family: serif"/>
|
||||
<Button text="sans-serif" style="font-family: sans-serif"/>
|
||||
<Button text="monospace" style="font-family: monospace"/>
|
||||
<Button text="Times New Roman" style="font-family: Times New Roman"/>
|
||||
<Button text="invalid font" style="font-family: InvalidFont"/>
|
||||
<Button text="all in one" style="font-family: serif; font-weight: bold; font-style: italic; font-size: 32; color: green" />
|
||||
</WrapLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
16
apps/ui-tests-app/pages/text/label.ts
Normal file
16
apps/ui-tests-app/pages/text/label.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import stack = require("ui/layouts/stack-layout");
|
||||
import style = require("ui/styling/style");
|
||||
import view = require("ui/core/view");
|
||||
export function resetStyles(args) {
|
||||
var stackLayout = <stack.StackLayout>args.object.parent;
|
||||
view.eachDescendant(stackLayout, function (v: view.View) {
|
||||
v.style._resetValue(style.fontFamilyProperty);
|
||||
v.style._resetValue(style.fontSizeProperty);
|
||||
v.style._resetValue(style.fontStyleProperty);
|
||||
v.style._resetValue(style.fontWeightProperty);
|
||||
v.style._resetValue(style.fontProperty);
|
||||
v.style._resetValue(style.colorProperty);
|
||||
v.style._resetValue(style.textAlignmentProperty);
|
||||
return true;
|
||||
});
|
||||
}
|
25
apps/ui-tests-app/pages/text/label.xml
Normal file
25
apps/ui-tests-app/pages/text/label.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
|
||||
<Label text="no align" />
|
||||
<Label text="left" style="text-align: left" />
|
||||
<Label text="center" style="text-align: center" />
|
||||
<Label text="right" style="text-align: right" />
|
||||
|
||||
<WrapLayout>
|
||||
<Label text="normal" />
|
||||
<Label text="color" style="color: green"/>
|
||||
<Label text="size" style="font-size: 32" />
|
||||
<Label text="italic" style="font-style: italic" />
|
||||
<Label text="bold" style="font-weight: bold"/>
|
||||
<Label text="bold-italic" style="font-weight: bold; font-style: italic"/>
|
||||
<Label text="serif" style="font-family: serif"/>
|
||||
<Label text="sans-serif" style="font-family: sans-serif"/>
|
||||
<Label text="monospace" style="font-family: monospace"/>
|
||||
<Label text="Times New Roman" style="font-family: Times New Roman"/>
|
||||
<Label text="invalid font" style="font-family: InvalidFont"/>
|
||||
<Label text="all in one" style="font-family: serif; font-weight: bold; font-style: italic; font-size: 32; color: green" />
|
||||
</WrapLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
16
apps/ui-tests-app/pages/text/text-field.ts
Normal file
16
apps/ui-tests-app/pages/text/text-field.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import stack = require("ui/layouts/stack-layout");
|
||||
import style = require("ui/styling/style");
|
||||
import view = require("ui/core/view");
|
||||
export function resetStyles(args) {
|
||||
var stackLayout = <stack.StackLayout>args.object.parent;
|
||||
view.eachDescendant(stackLayout, function (v: view.View) {
|
||||
v.style._resetValue(style.fontFamilyProperty);
|
||||
v.style._resetValue(style.fontSizeProperty);
|
||||
v.style._resetValue(style.fontStyleProperty);
|
||||
v.style._resetValue(style.fontWeightProperty);
|
||||
v.style._resetValue(style.fontProperty);
|
||||
v.style._resetValue(style.colorProperty);
|
||||
v.style._resetValue(style.textAlignmentProperty);
|
||||
return true;
|
||||
});
|
||||
}
|
25
apps/ui-tests-app/pages/text/text-field.xml
Normal file
25
apps/ui-tests-app/pages/text/text-field.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
|
||||
<TextField text="no align" />
|
||||
<TextField text="left" style="text-align: left" />
|
||||
<TextField text="center" style="text-align: center" />
|
||||
<TextField text="right" style="text-align: right" />
|
||||
|
||||
<WrapLayout>
|
||||
<TextField text="normal" />
|
||||
<TextField text="color" style="color: green"/>
|
||||
<TextField text="size" style="font-size: 32" />
|
||||
<TextField text="italic" style="font-style: italic" />
|
||||
<TextField text="bold" style="font-weight: bold"/>
|
||||
<TextField text="bold-italic" style="font-weight: bold; font-style: italic"/>
|
||||
<TextField text="serif" style="font-family: serif"/>
|
||||
<TextField text="sans-serif" style="font-family: sans-serif"/>
|
||||
<TextField text="monospace" style="font-family: monospace"/>
|
||||
<TextField text="Times New Roman" style="font-family: Times New Roman"/>
|
||||
<TextField text="invalid font" style="font-family: InvalidFont"/>
|
||||
<TextField text="all in one" style="font-family: serif; font-weight: bold; font-style: italic; font-size: 32; color: green" />
|
||||
</WrapLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
16
apps/ui-tests-app/pages/text/text-view.ts
Normal file
16
apps/ui-tests-app/pages/text/text-view.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import stack = require("ui/layouts/stack-layout");
|
||||
import style = require("ui/styling/style");
|
||||
import view = require("ui/core/view");
|
||||
export function resetStyles(args) {
|
||||
var stackLayout = <stack.StackLayout>args.object.parent;
|
||||
view.eachDescendant(stackLayout, function (v: view.View) {
|
||||
v.style._resetValue(style.fontFamilyProperty);
|
||||
v.style._resetValue(style.fontSizeProperty);
|
||||
v.style._resetValue(style.fontStyleProperty);
|
||||
v.style._resetValue(style.fontWeightProperty);
|
||||
v.style._resetValue(style.fontProperty);
|
||||
v.style._resetValue(style.colorProperty);
|
||||
v.style._resetValue(style.textAlignmentProperty);
|
||||
return true;
|
||||
});
|
||||
}
|
25
apps/ui-tests-app/pages/text/text-view.xml
Normal file
25
apps/ui-tests-app/pages/text/text-view.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
|
||||
<TextView text="no align" />
|
||||
<TextView text="left" style="text-align: left" />
|
||||
<TextView text="center" style="text-align: center" />
|
||||
<TextView text="right" style="text-align: right" />
|
||||
|
||||
<WrapLayout>
|
||||
<TextView text="normal" />
|
||||
<TextView text="color" style="color: green"/>
|
||||
<TextView text="size" style="font-size: 32" />
|
||||
<TextView text="italic" style="font-style: italic" />
|
||||
<TextView text="bold" style="font-weight: bold"/>
|
||||
<TextView text="bold-italic" style="font-weight: bold; font-style: italic"/>
|
||||
<TextView text="serif" style="font-family: serif"/>
|
||||
<TextView text="sans-serif" style="font-family: sans-serif"/>
|
||||
<TextView text="monospace" style="font-family: monospace"/>
|
||||
<TextView text="Times New Roman" style="font-family: Times New Roman"/>
|
||||
<TextView text="invalid font" style="font-family: InvalidFont"/>
|
||||
<TextView text="all in one" style="font-family: serif; font-weight: bold; font-style: italic; font-size: 32; color: green" />
|
||||
</WrapLayout>
|
||||
</StackLayout>
|
||||
</Page>
|
Reference in New Issue
Block a user