mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Fix: ui-test-app base path
This commit is contained in:
@ -12,6 +12,8 @@ trace.setCategories(trace.categories.Test);
|
|||||||
|
|
||||||
var list: string[] = ["pages", "layouts", "modal-view"];
|
var list: string[] = ["pages", "layouts", "modal-view"];
|
||||||
|
|
||||||
|
// basePath is auto-changed when building multiple apps
|
||||||
|
var basePath = "";
|
||||||
export function createPage() {
|
export function createPage() {
|
||||||
var txtInput = new text.TextView();
|
var txtInput = new text.TextView();
|
||||||
var btn = new button.Button();
|
var btn = new button.Button();
|
||||||
@ -21,7 +23,7 @@ export function createPage() {
|
|||||||
while (i < list.length) {
|
while (i < list.length) {
|
||||||
filePath = fs.path.join(__dirname, list[i], txtInput.text);
|
filePath = fs.path.join(__dirname, list[i], txtInput.text);
|
||||||
if ((fs.File.exists(filePath + ".xml") || (fs.File.exists(filePath + ".js")))) {
|
if ((fs.File.exists(filePath + ".xml") || (fs.File.exists(filePath + ".js")))) {
|
||||||
fileName = list[i] + "/" + txtInput.text;
|
fileName = basePath + list[i] + "/" + txtInput.text;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
Reference in New Issue
Block a user