mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
tests(ui-tests-app): update examples (#7387)
* refactor(ui-tests-app): tabmore example * fix(ui-tests-app): web-view query example * fix(ui-tests-app): misspelled img src path * feat(image-source): add set rotationAngle for iOS Compatibility with Android.
This commit is contained in:
@ -1,3 +0,0 @@
|
|||||||
TabView{
|
|
||||||
font-size:10;
|
|
||||||
}
|
|
3
e2e/ui-tests-app/app/tab-view/tab-view-more-page.css
Normal file
3
e2e/ui-tests-app/app/tab-view/tab-view-more-page.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TabView {
|
||||||
|
font-size: 10;
|
||||||
|
}
|
@ -1,39 +1,39 @@
|
|||||||
<Page>
|
<Page>
|
||||||
<TabView fontSize="10">
|
<TabView>
|
||||||
<TabView.items>
|
<TabView.items>
|
||||||
|
|
||||||
<TabViewItem title="Tab 1">
|
<TabViewItem title="Tab 1">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 1" fontSize="10"/>
|
<Label text="Label 1" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
|
||||||
<TabViewItem title="Tab 2">
|
<TabViewItem title="Tab 2">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 2" fontSize="10"/>
|
<Label text="Label 2" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
|
||||||
<TabViewItem title="Tab 3">
|
<TabViewItem title="Tab 3">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 3" fontSize="10"/>
|
<Label text="Label 3" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
|
||||||
<TabViewItem title="Tab 4">
|
<TabViewItem title="Tab 4">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 4" fontSize="10"/>
|
<Label text="Label 4" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
|
||||||
<TabViewItem title="Tab 5">
|
<TabViewItem title="Tab 5">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 5" fontSize="10"/>
|
<Label text="Label 5" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
<TabViewItem title="Tab 6">
|
<TabViewItem title="Tab 6">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<Label text="Label 6" fontSize="10"/>
|
<Label text="Label 6" />
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ export function webViewLoaded(args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const relUrl = "~/web-view/query.html" + "?foo=bar&urlType=relative";
|
const relUrl = "~/web-view/query.html" + "?foo=bar&urlType=relative";
|
||||||
const absoluteUrl = `${fs.knownFolders.currentApp().path}/ui-tests-app/web-view/query.html` + "?foo=bar&urlType=absolute";
|
const absoluteUrl = `${fs.knownFolders.currentApp().path}/web-view/query.html` + "?foo=bar&urlType=absolute";
|
||||||
const fileUrl = `file:///${fs.knownFolders.currentApp().path}/ui-tests-app/web-view/query.html` + "?foo=bar&urlType=filePrefix";
|
const fileUrl = `file:///${fs.knownFolders.currentApp().path}/web-view/query.html` + "?foo=bar&urlType=filePrefix";
|
||||||
const htmlString = `<html>
|
const htmlString = `<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Test Page</title>
|
<title>Test Page</title>
|
||||||
@ -35,4 +35,4 @@ export function loadString() {
|
|||||||
function setSrc(src) {
|
function setSrc(src) {
|
||||||
console.log("Setting src to: " + src);
|
console.log("Setting src to: " + src);
|
||||||
webView.src = src;
|
webView.src = src;
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<Page>
|
<Page>
|
||||||
<StackLayout orientation="vertical">
|
<StackLayout orientation="vertical">
|
||||||
|
|
||||||
<!-- WebView: local and string -->
|
<!-- WebView: local and string -->
|
||||||
<WebView src="~/web-view/test.html" height="50" />
|
<WebView src="~/web-view/test.html" height="50" />
|
||||||
<WebView src="<html><body><img src='~/resources/images/test2.png'></img></body></html>" height="75" />
|
<WebView src="<html><body><img src='resources/images/test2.png'></img></body></html>" height="75" />
|
||||||
|
|
||||||
<!-- Resources: png and jpg -->
|
<!-- Resources: png and jpg -->
|
||||||
<WrapLayout>
|
<WrapLayout>
|
||||||
<Image src="res://icon" stretch="none" />
|
<Image src="res://icon" stretch="none" />
|
||||||
<Image src="res://testlogo" stretch="none" />
|
<Image src="res://testlogo" stretch="none" />
|
||||||
</WrapLayout>
|
</WrapLayout>
|
||||||
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</Page>
|
</Page>
|
||||||
|
@ -180,6 +180,10 @@ export class ImageSource implements ImageSourceDefinition {
|
|||||||
get rotationAngle(): number {
|
get rotationAngle(): number {
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set rotationAngle(_value: number) {
|
||||||
|
// compatibility with Android
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFileName(path: string): string {
|
function getFileName(path: string): string {
|
||||||
|
Reference in New Issue
Block a user