mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +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>
|
||||
<TabView fontSize="10">
|
||||
<TabView>
|
||||
<TabView.items>
|
||||
|
||||
<TabViewItem title="Tab 1">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 1" fontSize="10"/>
|
||||
<Label text="Label 1" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem title="Tab 2">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 2" fontSize="10"/>
|
||||
<Label text="Label 2" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem title="Tab 3">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 3" fontSize="10"/>
|
||||
<Label text="Label 3" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem title="Tab 4">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 4" fontSize="10"/>
|
||||
<Label text="Label 4" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem title="Tab 5">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 5" fontSize="10"/>
|
||||
<Label text="Label 5" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem title="Tab 6">
|
||||
<TabViewItem.view>
|
||||
<Label text="Label 6" fontSize="10"/>
|
||||
<Label text="Label 6" />
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
||||
|
@ -7,8 +7,8 @@ export function webViewLoaded(args) {
|
||||
}
|
||||
|
||||
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 fileUrl = `file:///${fs.knownFolders.currentApp().path}/ui-tests-app/web-view/query.html` + "?foo=bar&urlType=filePrefix";
|
||||
const absoluteUrl = `${fs.knownFolders.currentApp().path}/web-view/query.html` + "?foo=bar&urlType=absolute";
|
||||
const fileUrl = `file:///${fs.knownFolders.currentApp().path}/web-view/query.html` + "?foo=bar&urlType=filePrefix";
|
||||
const htmlString = `<html>
|
||||
<head>
|
||||
<title>Test Page</title>
|
||||
@ -35,4 +35,4 @@ export function loadString() {
|
||||
function setSrc(src) {
|
||||
console.log("Setting src to: " + src);
|
||||
webView.src = src;
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<Page>
|
||||
<StackLayout orientation="vertical">
|
||||
|
||||
|
||||
<!-- WebView: local and string -->
|
||||
<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 -->
|
||||
<WrapLayout>
|
||||
<Image src="res://icon" stretch="none" />
|
||||
<Image src="res://testlogo" stretch="none" />
|
||||
</WrapLayout>
|
||||
|
||||
|
||||
</StackLayout>
|
||||
</Page>
|
||||
|
@ -180,6 +180,10 @@ export class ImageSource implements ImageSourceDefinition {
|
||||
get rotationAngle(): number {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
set rotationAngle(_value: number) {
|
||||
// compatibility with Android
|
||||
}
|
||||
}
|
||||
|
||||
function getFileName(path: string): string {
|
||||
|
Reference in New Issue
Block a user