Skip to content

Commit 8ff9d73

Browse files
Vasil ChimevVasil Chimev
authored andcommitted
Add transitions test pages to ui-tests-app
1 parent 5a81a0f commit 8ff9d73

File tree

7 files changed

+95
-0
lines changed

7 files changed

+95
-0
lines changed

CrossPlatformModules.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
<Content Include="apps\ui-tests-app\action-bar\system-icons.xml">
226226
<SubType>Designer</SubType>
227227
</Content>
228+
<Content Include="apps\ui-tests-app\animations\background.xml" />
228229
<Content Include="apps\ui-tests-app\css\decoration-transform-formattedtext.xml" />
229230
<Content Include="apps\ui-tests-app\css\text-decoration.xml" />
230231
<Content Include="apps\ui-tests-app\css\text-transform.xml" />
@@ -253,6 +254,7 @@
253254
<Content Include="apps\ui-tests-app\layouts-percent\wrap.xml">
254255
<SubType>Designer</SubType>
255256
</Content>
257+
<TypeScriptCompile Include="apps\ui-tests-app\animations\background.ts" />
256258
<TypeScriptCompile Include="apps\ui-tests-app\pages\touch-event.ts" />
257259
<Content Include="apps\ui-tests-app\pages\touch-event.xml">
258260
<SubType>Designer</SubType>
@@ -344,6 +346,8 @@
344346
<TypeScriptCompile Include="apps\ui-tests-app\segmented-bar\clean.ts">
345347
<DependentUpon>clean.xml</DependentUpon>
346348
</TypeScriptCompile>
349+
<TypeScriptCompile Include="apps\ui-tests-app\transitions\page1.ts" />
350+
<TypeScriptCompile Include="apps\ui-tests-app\transitions\page0.ts" />
347351
<TypeScriptCompile Include="color\known-colors.d.ts" />
348352
<TypeScriptCompile Include="es6.d.ts" />
349353
<TypeScriptCompile Include="ui\animation\animation.d.ts" />
@@ -1209,6 +1213,8 @@
12091213
<Content Include="apps\ui-tests-app\font\text-view.xml" />
12101214
<Content Include="apps\ui-tests-app\font\label.xml" />
12111215
<Content Include="apps\ui-tests-app\font\button.xml" />
1216+
<Content Include="apps\ui-tests-app\transitions\page1.xml" />
1217+
<Content Include="apps\ui-tests-app\transitions\page0.xml" />
12121218
<Content Include="apps\ui-tests-app\web-view\test.css" />
12131219
<Content Include="apps\ui-tests-app\web-view\test.html" />
12141220
<Content Include="apps\ui-tests-app\web-view\web-view-test.xml" />

apps/ui-tests-app/mainPage.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ examples.set("nordic", "nordic/nordic");
8484
examples.set("gestures", "pages/gestures");
8585
examples.set("touch", "pages/touch-event");
8686
examples.set("handlers", "pages/handlers");
87+
88+
examples.set("animeBG", "animations/background");
89+
examples.set("transitions", "transitions/page0");
90+
8791
//examples.set("listview_binding", "pages/listview_binding");
8892
examples.set("console", "pages/console");
8993
examples.set("i61", "pages/i61");
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import frame = require("ui/frame");
2+
import pages = require("ui/page");
3+
4+
export function onTap(args) {
5+
var navigationEntry = {
6+
moduleName: "transitions/page1",
7+
animated: true,
8+
navigationTransition: {
9+
transition: args.object.tag,
10+
duration: 380,
11+
curve: "easeIn"
12+
}
13+
};
14+
frame.topmost().navigate(navigationEntry);
15+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Page loaded="pageLoaded" backgroundColor="LightGreen" >
2+
<ScrollView>
3+
<StackLayout style.textAlignment="center">
4+
5+
<Label text="iOS" automationText="iOS" />
6+
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
7+
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
8+
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
9+
10+
<Label text="Android" automationText="Android" />
11+
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
12+
13+
<Label text="Cross" automationText="Cross" />
14+
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
15+
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
16+
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
17+
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
18+
19+
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
20+
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
21+
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
22+
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
23+
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
24+
</StackLayout>
25+
</ScrollView>
26+
</Page>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import frame = require("ui/frame");
2+
import pages = require("ui/page");
3+
4+
export function onTap(args) {
5+
var navigationEntry = {
6+
moduleName: "transitions/page0",
7+
animated: true,
8+
navigationTransition: {
9+
transition: args.object.tag,
10+
duration: 380,
11+
curve: "easeIn"
12+
}
13+
};
14+
frame.topmost().navigate(navigationEntry);
15+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Page loaded="pageLoaded" backgroundColor="LightBlue" >
2+
<ScrollView>
3+
<StackLayout style.textAlignment="center">
4+
5+
<Label text="iOS" automationText="iOS" />
6+
<Button text="curl" tap="onTap" tag="curl" automationText="curl" />
7+
<Button text="curlUp" tap="onTap" tag="curlUp" automationText="curlUp" />
8+
<Button text="curlDown" tap="onTap" tag="curlDown" automationText="curlDown" />
9+
10+
<Label text="Android" automationText="Android" />
11+
<Button text="explode" tap="onTap" tag="explode" automationText="explode" />
12+
13+
<Label text="Cross" automationText="Cross" />
14+
<Button text="fade" tap="onTap" tag="fade" automationText="fade" />
15+
<Button text="flip" tap="onTap" tag="flip" automationText="flip"/>
16+
<Button text="flipRight" tap="onTap" tag="flipRight" automationText="flipRight" />
17+
<Button text="flipLeft" tap="onTap" tag="flipLeft" automationText="flipLeft"/>
18+
19+
<Button text="slide" tap="onTap" tag="slide" automationText="slide" />
20+
<Button text="slideLeft" tap="onTap" tag="slideLeft" automationText="slideLeft" />
21+
<Button text="slideRight" tap="onTap" tag="slideRight" automationText="slideRight" />
22+
<Button text="slideTop" tap="onTap" tag="slideTop" automationText="slideTop"/>
23+
<Button text="slideBottom" tap="onTap" tag="slideBottom" automationText="slideBottom"/>
24+
</StackLayout>
25+
</ScrollView>
26+
</Page>

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@
344344
"apps/ui-tests-app/action-bar/clean.ts",
345345
"apps/ui-tests-app/action-bar/color.ts",
346346
"apps/ui-tests-app/action-bar/system-icons.ts",
347+
"apps/ui-tests-app/animations/background.ts",
347348
"apps/ui-tests-app/app.ts",
348349
"apps/ui-tests-app/bindings/basics.ts",
349350
"apps/ui-tests-app/bindings/xmlbasics.ts",
@@ -385,6 +386,8 @@
385386
"apps/ui-tests-app/segmented-bar/all.ts",
386387
"apps/ui-tests-app/segmented-bar/clean.ts",
387388
"apps/ui-tests-app/text-field/text-field.ts",
389+
"apps/ui-tests-app/transitions/page0.ts",
390+
"apps/ui-tests-app/transitions/page1.ts",
388391
"apps/ui-tests-app/web-view/web-view.ts",
389392
"apps/web-view-demo/app.ts",
390393
"apps/web-view-demo/main-page.ts",

0 commit comments

Comments
 (0)