GEEKING
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>AppTest</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>wtf.watrbx.robloxipad</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainWindow</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-57.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "57x57",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-57@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-30.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-29@2x-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-40.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-40@2x-1.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-50.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "50x50",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-50@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-72.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "72x72",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-72@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-76.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-76@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 49 KiB |
@@ -0,0 +1,162 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "736h",
|
||||
"filename" : "1242x2208.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "736h",
|
||||
"filename" : "2208x1242.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "landscape",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "667h",
|
||||
"filename" : "750x1334.png",
|
||||
"minimum-system-version" : "8.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "640x960.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"extent" : "full-screen",
|
||||
"idiom" : "iphone",
|
||||
"subtype" : "retina4",
|
||||
"filename" : "640x1136.png",
|
||||
"minimum-system-version" : "7.0",
|
||||
"orientation" : "portrait",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "768x1024.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1024x768.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1536x2048.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "2048x1536.png",
|
||||
"extent" : "full-screen",
|
||||
"minimum-system-version" : "7.0",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "320x480.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "640x960-1.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "640x1136-1.png",
|
||||
"extent" : "full-screen",
|
||||
"subtype" : "retina4",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "768x1004.png",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "768x1024-1.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1024x748.png",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1024x768-1.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1536x2008.png",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "portrait",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "1536x2048-1.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "2048x1496.png",
|
||||
"extent" : "to-status-bar",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"orientation" : "landscape",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "2048x1536-1.png",
|
||||
"extent" : "full-screen",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,499 @@
|
||||
var webTimeout = 4;
|
||||
var loginTimeout = 5;
|
||||
var gameTimeout = 10;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap();
|
||||
}
|
||||
}
|
||||
|
||||
function handleCookieConstraint(wv)
|
||||
{
|
||||
if (wv.staticTexts()["The site is currently offline for maintenance and upgrades. Please check back soon!"].isValid())
|
||||
{
|
||||
wv.secureTextFields()[0].tap();
|
||||
app.keyboard().typeString("rewards");
|
||||
wv.buttons()["O"].tap();
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function verifyWebViewLink(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.links()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function resetVars()
|
||||
{
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
}
|
||||
|
||||
|
||||
//UIALogger.logMessage("Version: " + window.scrollViews()[0].staticTexts()[4].label());
|
||||
|
||||
var versionNumber = window.scrollViews()[0].staticTexts()[4].label();
|
||||
// Start test suite for this version
|
||||
UIALogger.logMessage("##teamcity[testSuiteStarted name='Smoke Test for v" + versionNumber + "']");
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.gametest1.pizzaboxer.fun/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
|
||||
var testName = "Open About Page";
|
||||
startTest(testName);
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
testName = "Close About Page";
|
||||
startTest(testName);
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Login Test */
|
||||
|
||||
// Attempt to login to the game
|
||||
testName = "Login Test";
|
||||
startTest(testName);
|
||||
|
||||
login("mobiletest", "hackproof12");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "Game failed to log in.");
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Catalog Page Test */
|
||||
|
||||
// Open the Catalog page
|
||||
testName = "Open Catalog Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Catalog"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest
|
||||
(testName, "Failed to open Catalog screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Catalog"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Catalog web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
/* End Catalog Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Inventory Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Inventory Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Inventory"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Inventory screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Character Customizer"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Inventory web page.");
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Inventory Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Builders Club Page Test */
|
||||
|
||||
// Open the Builders Club page
|
||||
testName = "Open Builders Club Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Builders Club"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Builders Club screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("UPGRADE"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Builders Club web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Builders Club Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Profile Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Profile Page";
|
||||
startTest(testName);
|
||||
|
||||
// Why is this button named 'Crossroads'?
|
||||
// Good question!
|
||||
window.buttons()["Crossroads"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Profile screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Your Profile"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Profile web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Profile Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Messages Page Test */
|
||||
|
||||
// Open the Messages page
|
||||
testName = "Open Messages Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Messages"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Messages screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Inbox"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Messages web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Messages Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Groups Page Test */
|
||||
|
||||
// Open the Groups page
|
||||
testName = "Open Groups Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Groups"].tap();
|
||||
target.delay(5);
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Groups screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Only Builders Club Members can create a new group. Receive all of the benefits of Builders Club by signing up"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Groups web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Groups Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Game Launching Test */
|
||||
// We verify a game has launched by the presence of the keyboard -
|
||||
// if the launch was successful, we should be able to tap the Chat button,
|
||||
// which opens the keyboard
|
||||
|
||||
testName = "Game Launching";
|
||||
startTest(testName);
|
||||
|
||||
// Launch game - 81501804 is 'Test Place'
|
||||
window.textFields()[2].setValue("81501804");
|
||||
window.buttons()["Place Launch"].tap();
|
||||
|
||||
cnt = 0;
|
||||
while (cnt <= gameTimeout)
|
||||
{
|
||||
// Tap where the Chat button should be
|
||||
window.images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});
|
||||
|
||||
if (app.keyboard().isValid())
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= gameTimeout)
|
||||
failTest(testName, "Game failed to launch - keyboard did not open.")
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
//target.delay(25);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
//Type a verification message
|
||||
target.delay(1);
|
||||
target.frontMostApp().keyboard().typeString("The test is over.\n");
|
||||
target.delay(5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UIALogger.logMessage("##teamcity[testSuiteFinished name='Smoke Test for v" + versionNumber + "']");
|
||||
@@ -0,0 +1,499 @@
|
||||
var webTimeout = 4;
|
||||
var loginTimeout = 5;
|
||||
var gameTimeout = 10;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap();
|
||||
}
|
||||
}
|
||||
|
||||
function handleCookieConstraint(wv)
|
||||
{
|
||||
if (wv.staticTexts()["The site is currently offline for maintenance and upgrades. Please check back soon!"].isValid())
|
||||
{
|
||||
wv.secureTextFields()[0].tap();
|
||||
app.keyboard().typeString("rewards");
|
||||
wv.buttons()["O"].tap();
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function verifyWebViewLink(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.links()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function resetVars()
|
||||
{
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
}
|
||||
|
||||
|
||||
//UIALogger.logMessage("Version: " + window.scrollViews()[0].staticTexts()[4].label());
|
||||
|
||||
var versionNumber = window.scrollViews()[0].staticTexts()[4].label();
|
||||
// Start test suite for this version
|
||||
UIALogger.logMessage("##teamcity[testSuiteStarted name='Smoke Test for v" + versionNumber + "']");
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.gametest2.pizzaboxer.fun/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
|
||||
var testName = "Open About Page";
|
||||
startTest(testName);
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
testName = "Close About Page";
|
||||
startTest(testName);
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Login Test */
|
||||
|
||||
// Attempt to login to the game
|
||||
testName = "Login Test";
|
||||
startTest(testName);
|
||||
|
||||
login("mobiletest", "hackproof12");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "Game failed to log in.");
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Catalog Page Test */
|
||||
|
||||
// Open the Catalog page
|
||||
testName = "Open Catalog Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Catalog"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest
|
||||
(testName, "Failed to open Catalog screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Catalog"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Catalog web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
/* End Catalog Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Inventory Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Inventory Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Inventory"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Inventory screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Character Customizer"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Inventory web page.");
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Inventory Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Builders Club Page Test */
|
||||
|
||||
// Open the Builders Club page
|
||||
testName = "Open Builders Club Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Builders Club"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Builders Club screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("UPGRADE"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Builders Club web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Builders Club Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Profile Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Profile Page";
|
||||
startTest(testName);
|
||||
|
||||
// Why is this button named 'Crossroads'?
|
||||
// Good question!
|
||||
window.buttons()["Crossroads"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Profile screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Your Profile"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Profile web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Profile Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Messages Page Test */
|
||||
|
||||
// Open the Messages page
|
||||
testName = "Open Messages Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Messages"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Messages screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Inbox"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Messages web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Messages Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Groups Page Test */
|
||||
|
||||
// Open the Groups page
|
||||
testName = "Open Groups Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Groups"].tap();
|
||||
target.delay(5);
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Groups screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Only Builders Club Members can create a new group. Receive all of the benefits of Builders Club by signing up"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Groups web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Groups Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Game Launching Test */
|
||||
// We verify a game has launched by the presence of the keyboard -
|
||||
// if the launch was successful, we should be able to tap the Chat button,
|
||||
// which opens the keyboard
|
||||
|
||||
testName = "Game Launching";
|
||||
startTest(testName);
|
||||
|
||||
// Launch game - 70353322 is 'Test Place'
|
||||
window.textFields()[2].setValue("70353322");
|
||||
window.buttons()["Place Launch"].tap();
|
||||
|
||||
cnt = 0;
|
||||
while (cnt <= gameTimeout)
|
||||
{
|
||||
// Tap where the Chat button should be
|
||||
window.images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});
|
||||
|
||||
if (app.keyboard().isValid())
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= gameTimeout)
|
||||
failTest(testName, "Game failed to launch - keyboard did not open.")
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
//target.delay(25);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
//Type a verification message
|
||||
target.delay(1);
|
||||
target.frontMostApp().keyboard().typeString("The test is over.\n");
|
||||
target.delay(5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UIALogger.logMessage("##teamcity[testSuiteFinished name='Smoke Test for v" + versionNumber + "']");
|
||||
@@ -0,0 +1,501 @@
|
||||
var webTimeout = 4;
|
||||
var loginTimeout = 5;
|
||||
var gameTimeout = 10;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap();
|
||||
}
|
||||
}
|
||||
|
||||
function handleCookieConstraint(wv)
|
||||
{
|
||||
if (wv.staticTexts()["The site is currently offline for maintenance and upgrades. Please check back soon!"].isValid())
|
||||
{
|
||||
wv.secureTextFields()[0].tap();
|
||||
app.keyboard().typeString("rewards");
|
||||
wv.buttons()["O"].tap();
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function verifyWebViewLink(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.links()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function resetVars()
|
||||
{
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
}
|
||||
|
||||
|
||||
//UIALogger.logMessage("Version: " + window.scrollViews()[0].staticTexts()[4].label());
|
||||
|
||||
var versionNumber = window.scrollViews()[0].staticTexts()[4].label();
|
||||
// Start test suite for this version
|
||||
UIALogger.logMessage("##teamcity[testSuiteStarted name='Smoke Test for v" + versionNumber + "']");
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.watrbx.wtf/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
|
||||
var testName = "Open About Page";
|
||||
startTest(testName);
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
testName = "Close About Page";
|
||||
startTest(testName);
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Login Test */
|
||||
|
||||
// Attempt to login to the game
|
||||
testName = "Login Test";
|
||||
startTest(testName);
|
||||
|
||||
login("usertest01", "hackproof");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "Game failed to log in.");
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Catalog Page Test */
|
||||
|
||||
// Open the Catalog page
|
||||
testName = "Open Catalog Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Catalog"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest
|
||||
(testName, "Failed to open Catalog screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Catalog"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Catalog web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
/* End Catalog Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Inventory Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Inventory Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Inventory"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Inventory screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Character Customizer"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Inventory web page.");
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Inventory Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Builders Club Page Test */
|
||||
|
||||
// Open the Builders Club page
|
||||
testName = "Open Builders Club Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Builders Club"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Builders Club screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("UPGRADE"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Builders Club web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Builders Club Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Profile Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Profile Page";
|
||||
startTest(testName);
|
||||
|
||||
// Why is this button named 'Crossroads'?
|
||||
// Good question!
|
||||
window.buttons()["Crossroads"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Profile screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Your Profile"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Profile web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Profile Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Messages Page Test */
|
||||
|
||||
// Open the Messages page
|
||||
testName = "Open Messages Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Messages"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Messages screen.");
|
||||
|
||||
//target.logElementTree();
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Inbox"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Messages web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Messages Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Groups Page Test */
|
||||
|
||||
// Open the Groups page
|
||||
testName = "Open Groups Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Groups"].tap();
|
||||
target.delay(5);
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Groups screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Join a Group"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Groups web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Groups Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Game Launching Test */
|
||||
// We verify a game has launched by the presence of the keyboard -
|
||||
// if the launch was successful, we should be able to tap the Chat button,
|
||||
// which opens the keyboard
|
||||
|
||||
testName = "Game Launching";
|
||||
startTest(testName);
|
||||
|
||||
// Launch game - 122235601 is 'Test Place #1'
|
||||
window.textFields()[2].setValue("122235601");
|
||||
window.buttons()["Place Launch"].tap();
|
||||
|
||||
cnt = 0;
|
||||
while (cnt <= gameTimeout)
|
||||
{
|
||||
// Tap where the Chat button should be
|
||||
window.images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});
|
||||
|
||||
if (app.keyboard().isValid())
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= gameTimeout)
|
||||
failTest(testName, "Game failed to launch - keyboard did not open.")
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
//target.delay(25);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
//Type a verification message
|
||||
target.delay(1);
|
||||
target.frontMostApp().keyboard().typeString("The test is over.\n");
|
||||
target.delay(5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UIALogger.logMessage("##teamcity[testSuiteFinished name='Smoke Test for v" + versionNumber + "']");
|
||||
@@ -0,0 +1,504 @@
|
||||
var webTimeout = 4;
|
||||
var loginTimeout = 5;
|
||||
var gameTimeout = 10;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap();
|
||||
}
|
||||
}
|
||||
|
||||
function handleCookieConstraint(wv)
|
||||
{
|
||||
if (wv.staticTexts()["The site is currently offline for maintenance and upgrades. Please check back soon!"].isValid())
|
||||
{
|
||||
wv.secureTextFields()[0].tap();
|
||||
app.keyboard().typeString("rewards");
|
||||
wv.buttons()["O"].tap();
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function verifyWebViewLink(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.links()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function resetVars()
|
||||
{
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//UIALogger.logMessage("Version: " + window.scrollViews()[0].staticTexts()[4].label());
|
||||
|
||||
var versionNumber = window.scrollViews()[0].staticTexts()[4].label();
|
||||
// Start test suite for this version
|
||||
UIALogger.logMessage("##teamcity[testSuiteStarted name='Smoke Test for v" + versionNumber + "']");
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.sitetest1.pizzaboxer.fun/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
|
||||
var testName = "Open About Page";
|
||||
startTest(testName);
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
testName = "Close About Page";
|
||||
startTest(testName);
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Login Test */
|
||||
|
||||
// Attempt to login to the game
|
||||
testName = "Login Test";
|
||||
startTest(testName);
|
||||
|
||||
login("mobiletest", "hackproof12");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "Game failed to log in.");
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Catalog Page Test */
|
||||
|
||||
// Open the Catalog page
|
||||
testName = "Open Catalog Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Catalog"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest
|
||||
(testName, "Failed to open Catalog screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Catalog"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Catalog web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
/* End Catalog Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Inventory Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Inventory Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Inventory"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Inventory screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Character Customizer"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Inventory web page.");
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Inventory Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Builders Club Page Test */
|
||||
|
||||
// Open the Builders Club page
|
||||
testName = "Open Builders Club Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Builders Club"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Builders Club screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("UPGRADE"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Builders Club web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Builders Club Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Profile Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Profile Page";
|
||||
startTest(testName);
|
||||
|
||||
// Why is this button named 'Crossroads'?
|
||||
// Good question!
|
||||
window.buttons()["Crossroads"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Profile screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Your Profile"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Profile web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Profile Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Messages Page Test */
|
||||
|
||||
// Open the Messages page
|
||||
testName = "Open Messages Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Messages"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Messages screen.");
|
||||
|
||||
target.logElementTree();
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Inbox"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Messages web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Messages Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Groups Page Test */
|
||||
|
||||
// Open the Groups page
|
||||
testName = "Open Groups Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Groups"].tap();
|
||||
target.delay(5);
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Groups screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Only Builders Club Members can create a new group. Receive all of the benefits of Builders Club by signing up"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Groups web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Groups Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Game Launching Test */
|
||||
// We verify a game has launched by the presence of the keyboard -
|
||||
// if the launch was successful, we should be able to tap the Chat button,
|
||||
// which opens the keyboard
|
||||
|
||||
testName = "Game Launching";
|
||||
startTest(testName);
|
||||
|
||||
// Launch game - 162747816 is 'mobiletest Place'
|
||||
window.textFields()[2].setValue("162747816");
|
||||
window.buttons()["Place Launch"].tap();
|
||||
|
||||
cnt = 0;
|
||||
while (cnt <= gameTimeout)
|
||||
{
|
||||
// Tap where the Chat button should be
|
||||
window.images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});
|
||||
|
||||
if (app.keyboard().isValid())
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= gameTimeout)
|
||||
failTest(testName, "Game failed to launch - keyboard did not open.")
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
//target.delay(25);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
//Type a verification message
|
||||
target.delay(1);
|
||||
target.frontMostApp().keyboard().typeString("The test is over.\n");
|
||||
target.delay(5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UIALogger.logMessage("##teamcity[testSuiteFinished name='Smoke Test for v" + versionNumber + "']");
|
||||
@@ -0,0 +1,499 @@
|
||||
var webTimeout = 4;
|
||||
var loginTimeout = 5;
|
||||
var gameTimeout = 10;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap();
|
||||
}
|
||||
}
|
||||
|
||||
function handleCookieConstraint(wv)
|
||||
{
|
||||
if (wv.staticTexts()["The site is currently offline for maintenance and upgrades. Please check back soon!"].isValid())
|
||||
{
|
||||
wv.secureTextFields()[0].tap();
|
||||
app.keyboard().typeString("rewards");
|
||||
wv.buttons()["O"].tap();
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function verifyWebViewLink(textToVerify)
|
||||
{
|
||||
var wv = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
handleCookieConstraint(wv);
|
||||
|
||||
if (wv.links()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function resetVars()
|
||||
{
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
}
|
||||
|
||||
|
||||
//UIALogger.logMessage("Version: " + window.scrollViews()[0].staticTexts()[4].label());
|
||||
|
||||
var versionNumber = window.scrollViews()[0].staticTexts()[4].label();
|
||||
// Start test suite for this version
|
||||
UIALogger.logMessage("##teamcity[testSuiteStarted name='Smoke Test for v" + versionNumber + "']");
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.sitetest2.pizzaboxer.fun/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
|
||||
var testName = "Open About Page";
|
||||
startTest(testName);
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
testName = "Close About Page";
|
||||
startTest(testName);
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Login Test */
|
||||
|
||||
// Attempt to login to the game
|
||||
testName = "Login Test";
|
||||
startTest(testName);
|
||||
|
||||
login("mobiletest", "hackproof12");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest(testName);
|
||||
else
|
||||
failTest(testName, "Game failed to log in.");
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
/*****************************************/
|
||||
/* Begin Catalog Page Test */
|
||||
|
||||
// Open the Catalog page
|
||||
testName = "Open Catalog Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Catalog"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest
|
||||
(testName, "Failed to open Catalog screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewLink("Catalog"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Catalog web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
/* End Catalog Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Inventory Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Inventory Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Inventory"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Inventory screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Character Customizer"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Inventory web page.");
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Inventory Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Builders Club Page Test */
|
||||
|
||||
// Open the Builders Club page
|
||||
testName = "Open Builders Club Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Builders Club"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Builders Club screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("UPGRADE"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Builders Club web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Builders Club Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Profile Page Test */
|
||||
|
||||
// Open the Inventory page
|
||||
testName = "Open Profile Page";
|
||||
startTest(testName);
|
||||
|
||||
// Why is this button named 'Crossroads'?
|
||||
// Good question!
|
||||
window.buttons()["Crossroads"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Profile screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Your Profile"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Profile web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Profile Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Messages Page Test */
|
||||
|
||||
// Open the Messages page
|
||||
testName = "Open Messages Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Messages"].tap();
|
||||
target.delay(5);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Messages screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Inbox"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Messages web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Messages Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Groups Page Test */
|
||||
|
||||
// Open the Groups page
|
||||
testName = "Open Groups Page";
|
||||
startTest(testName);
|
||||
|
||||
window.buttons()["Groups"].tap();
|
||||
target.delay(5);
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
if (!app.toolbar().buttons()["gridNavigation"].isValid())
|
||||
failTest(testName, "Failed to open Groups screen.");
|
||||
|
||||
var cnt = 0;
|
||||
while (cnt <= webTimeout)
|
||||
{
|
||||
if (verifyWebViewStaticText("Only Builders Club Members can create a new group. Receive all of the benefits of Builders Club by signing up"))
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= webTimeout)
|
||||
failTest(testName, "Failed to load Groups web page.");
|
||||
|
||||
|
||||
// Return to grid screen
|
||||
app.toolbar().buttons()["gridNavigation"].tap();
|
||||
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
|
||||
/* End Groups Page Test */
|
||||
/*****************************************/
|
||||
/* Begin Game Launching Test */
|
||||
// We verify a game has launched by the presence of the keyboard -
|
||||
// if the launch was successful, we should be able to tap the Chat button,
|
||||
// which opens the keyboard
|
||||
|
||||
testName = "Game Launching";
|
||||
startTest(testName);
|
||||
|
||||
// Launch game - 92786801 is 'mobiletest's Place
|
||||
window.textFields()[2].setValue("92786801");
|
||||
window.buttons()["Place Launch"].tap();
|
||||
|
||||
cnt = 0;
|
||||
while (cnt <= gameTimeout)
|
||||
{
|
||||
// Tap where the Chat button should be
|
||||
window.images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});
|
||||
|
||||
if (app.keyboard().isValid())
|
||||
{
|
||||
passTest(testName);
|
||||
break;
|
||||
}
|
||||
else
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (cnt >= gameTimeout)
|
||||
failTest(testName, "Game failed to launch - keyboard did not open.")
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
//target.delay(25);
|
||||
|
||||
target = UIATarget.localTarget();
|
||||
app = target.frontMostApp();
|
||||
window = app.mainWindow();
|
||||
webView = window.scrollViews()[0].webViews()[0];
|
||||
innerWindow = window.scrollViews();
|
||||
|
||||
|
||||
//Type a verification message
|
||||
target.delay(1);
|
||||
target.frontMostApp().keyboard().typeString("The test is over.\n");
|
||||
target.delay(5);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UIALogger.logMessage("##teamcity[testSuiteFinished name='Smoke Test for v" + versionNumber + "']");
|
||||
@@ -0,0 +1,322 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPad on GT2 (CI build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButtoniPad.tap(); //works for iPad
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
target.delay(5);
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
//target.frontMostApp().mainWindow().buttons()["Profile"].tap();// normal
|
||||
|
||||
target.frontMostApp().mainWindow().buttons()["Crossroads"].tap();//workaround for iPad only
|
||||
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Your Profile"].isValid())
|
||||
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//////-inserted
|
||||
|
||||
// Open Featured Games
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].elements()[2].tap();
|
||||
target.frontMostApp().mainWindow().popover().tableViews()["Empty list"].cells()["Featured"].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Select place "Test Place #1"
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Test Place #1"].images()[0].tap(); //ipad on gt2
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Launch game
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Play"].tap();
|
||||
|
||||
|
||||
//Waiting 15 sec for game to launch
|
||||
target.delay(15);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,331 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPad on GT1 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://www.gametest1.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButtoniPad.tap(); //works for iPad
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
target.delay(1);
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
//target.frontMostApp().mainWindow().buttons()["Profile"].tap();// normal
|
||||
|
||||
target.frontMostApp().mainWindow().buttons()["Crossroads"].tap();//workaround for iPad only
|
||||
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Your Profile"].isValid())
|
||||
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launch Test Place #1 via textbox launcher (internal build only)
|
||||
|
||||
target.frontMostApp().mainWindow().textFields()[2].setValue("81501804"); //select Test Place #1 on GT1
|
||||
target.frontMostApp().mainWindow().buttons()["Place Launch"].tap(); //launch game
|
||||
|
||||
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,330 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPad on GT2 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://www.gametest2.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButtoniPad.tap(); //works for iPad
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
target.delay(1);
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
//target.frontMostApp().mainWindow().buttons()["Profile"].tap();// normal
|
||||
|
||||
target.frontMostApp().mainWindow().buttons()["Crossroads"].tap();//workaround for iPad only
|
||||
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Your Profile"].isValid())
|
||||
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launch Test Place #1 via textbox launcher (internal build only)
|
||||
|
||||
target.frontMostApp().mainWindow().textFields()[2].setValue("70383209"); //select Test Place #1 on GT2
|
||||
target.frontMostApp().mainWindow().buttons()["Place Launch"].tap(); //launch game
|
||||
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,331 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPad on Production (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://www.watrbx.wtf/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButtoniPad.tap(); //works for iPad
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
target.delay(5);
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("usertest01","hackproof");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
//target.frontMostApp().mainWindow().buttons()["Profile"].tap();// normal
|
||||
|
||||
target.frontMostApp().mainWindow().buttons()["Crossroads"].tap();//workaround for iPad only
|
||||
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Your Profile"].isValid())
|
||||
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Top Rated"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launch Test Place #1 via textbox launcher (internal build only)
|
||||
|
||||
target.frontMostApp().mainWindow().textFields()[2].setValue("122235601"); //select Test Place #1 on Prod
|
||||
target.frontMostApp().mainWindow().buttons()["Place Launch"].tap(); //launch game
|
||||
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,300 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPhone/iPod Touch on GT2 (CI build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButton.tap(); //works for ipod
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Profile"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["My status:"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Featured Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Show all games ("See more")
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()[0].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Launch "Sound Replication" place
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["\nSound Replication Test\n"].tap();
|
||||
|
||||
//Waiting 15 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.23, y:0.06}}); //open chat (works!)
|
||||
target.delay(1);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,318 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPhone/iPod Touch on GT1 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().scrollViews()[0].pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://m.gametest1.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButton.tap(); //works for ipod
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Profile"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["My status:"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launching game via ID field
|
||||
target.frontMostApp().mainWindow().textFields()[3].setValue("81501804"); //select Test Place #1 on GT1
|
||||
target.frontMostApp().keyboard().typeString("\n"); //hit Enter on a keyboard to launch game
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.23, y:0.06}}); //open chat (works!)
|
||||
target.delay(10);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,319 @@
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPhone/iPod Touch on GT2 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().scrollViews()[0].pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://m.gametest2.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButton.tap(); //works for ipod
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Profile"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["My status:"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Featured Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launching game via ID field
|
||||
target.frontMostApp().mainWindow().textFields()[3].setValue("70383209"); //select Test Place #1 on GT2
|
||||
target.frontMostApp().keyboard().typeString("\n"); //hit Enter on a keyboard to launch game
|
||||
|
||||
|
||||
//Waiting 25 sec for game to launch
|
||||
target.delay(25);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.23, y:0.06}}); //open chat (works!)
|
||||
target.delay(1);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,320 @@
|
||||
|
||||
//Script for testing basic Roblox iOS App fuctionality on iPhone/iPod Touch on Prod (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().scrollViews()[0].pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
var webTimeout = 20;
|
||||
var loginTimeout = 15;
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://m.watrbx.wtf/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
|
||||
//Go to About Screen:
|
||||
var testName = "About Screen test"
|
||||
UIALogger.logStart(testName);
|
||||
aboutButton.tap(); //works for ipod
|
||||
|
||||
|
||||
//Verifying that 'About' screen is working
|
||||
var barname = target.frontMostApp().navigationBar().name();
|
||||
|
||||
if (barname == "About")
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//returning to the main screen
|
||||
var testName = "Back to main screen";
|
||||
UIALogger.logStart(testName);
|
||||
target.frontMostApp().navigationBar().leftButton().tap();
|
||||
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("usertest01","hackproof");
|
||||
|
||||
target.delay(loginTimeout);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//=====
|
||||
|
||||
//Go to Catalog page
|
||||
var testName = "Go to Catalog Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Catalog"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Inventory page
|
||||
var testName = "Go to Inventory Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Inventory"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to BC page
|
||||
var testName = "Go to Builders Club Page";
|
||||
target.frontMostApp().mainWindow().buttons()[5].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Profile page
|
||||
var testName = "Go to Profile Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Profile"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["My status:"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
|
||||
//Go to Messages page
|
||||
var testName = "Go to Messages Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Messages"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().toolbar().buttons()["gridNavigation"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(webTimeout);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Featured Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Go back to the Main Page
|
||||
var testName = "Go to Main Page";
|
||||
target.frontMostApp().toolbar().buttons()["gridNavigation"].tap();
|
||||
//Validate
|
||||
if (target.frontMostApp().mainWindow().buttons()["Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Launching game via ID field
|
||||
target.frontMostApp().mainWindow().textFields()[3].setValue("122235601"); //select Test Place #1 on GT1
|
||||
target.frontMostApp().keyboard().typeString("\n"); //hit Enter on a keyboard to launch game
|
||||
|
||||
//Waiting 35 sec for game to launch
|
||||
target.delay(35);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.25, y:0.03}}); //open chat (works!)
|
||||
target.delay(1);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
//Script for testing game launching on iPad on GT1 (inernal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://www.gametest1.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(5);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//////-inserted
|
||||
|
||||
// Open Featured Games
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].elements()[2].tap();
|
||||
target.frontMostApp().mainWindow().popover().tableViews()["Empty list"].cells()["Featured"].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Select place "Test Place #1"
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Test Place #1"].images()[0].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Launch game
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Play"].tap();
|
||||
|
||||
|
||||
//Waiting 15 sec for game to launch
|
||||
target.delay(15);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,143 @@
|
||||
//Script for testing game launching on iPad on GT2 (inernal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4] //for iPad
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
//Select test environment
|
||||
|
||||
wheel.selectValue("http://www.gametest2.pizzaboxer.fun/"); //selecting test environment
|
||||
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
|
||||
//Validate
|
||||
target.delay(5);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Popular"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//////-inserted
|
||||
|
||||
// Open Featured Games
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].elements()[2].tap();
|
||||
target.frontMostApp().mainWindow().popover().tableViews()["Empty list"].cells()["Featured"].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Select place "Test Place #1"
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Test Place #1"].images()[0].tap();
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//Launch game
|
||||
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["Play"].tap();
|
||||
|
||||
|
||||
//Waiting 15 sec for game to launch
|
||||
target.delay(15);
|
||||
|
||||
|
||||
//Verifying that game is running (Keyboard pops up after pressing chat button)
|
||||
|
||||
var testName = "Game launched";
|
||||
|
||||
target.frontMostApp().mainWindow().images()[0].images()[0].tapWithOptions({tapOffset:{x:0.12, y:0.03}});//Press Chat button, keyboard should pop up
|
||||
|
||||
|
||||
//Verify that keyboard pops up, so the game is running
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,127 @@
|
||||
//iPod game launching and verification on GT1 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().scrollViews()[0].pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Select test environment
|
||||
wheel.selectValue("http://m.gametest1.pizzaboxer.fun/"); //selecting test environment
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(3);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Featured Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Show all games ("See more")
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()[0].tap();
|
||||
|
||||
target.delay(1);
|
||||
|
||||
//Launch "Test Place #1"
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["\nTest Place #1\n"].tap();
|
||||
|
||||
//Waiting 10 sec for game to launch
|
||||
target.delay(15);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.23, y:0.06}}); //open chat (works!)
|
||||
target.delay(1);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,127 @@
|
||||
//iPod game launching and verification on GT2 (internal build)
|
||||
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
|
||||
var app = target.frontMostApp();
|
||||
|
||||
var window = app.mainWindow();
|
||||
|
||||
//Initial screen elements
|
||||
|
||||
|
||||
var wheel = target.frontMostApp().mainWindow().scrollViews()[0].pickers()[0].wheels()[0]; //picker wheel
|
||||
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
|
||||
var aboutButton = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[3];
|
||||
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
|
||||
|
||||
//-=FUNCTIONS=-
|
||||
|
||||
|
||||
//Login Function
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-=TESTING SCRIPT=-
|
||||
|
||||
|
||||
//Create elements log:
|
||||
target.logElementTree();
|
||||
|
||||
|
||||
//Select test environment
|
||||
wheel.selectValue("http://m.gametest2.pizzaboxer.fun/"); //selecting test environment
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value()); //log current selected environment
|
||||
|
||||
|
||||
|
||||
//Normal login attempt
|
||||
|
||||
//Start logging
|
||||
var testName = "Normal login test";
|
||||
login ("mobiletest","hackproof12");
|
||||
|
||||
target.delay(5);
|
||||
|
||||
//if login screen is still active
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
|
||||
{
|
||||
UIALogger.logFail(testName); //then test failed
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logPass(testName); //otherwise test passed (app switched to another screen)
|
||||
}
|
||||
|
||||
//====
|
||||
|
||||
//Go to Games page
|
||||
var testName = "Go to Games Page";
|
||||
target.frontMostApp().mainWindow().buttons()["Games"].tap();
|
||||
//Validate
|
||||
target.delay(3);
|
||||
if (target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].staticTexts()["Featured Games"].isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Show all games ("See more")
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()[0].tap();
|
||||
|
||||
target.delay(1);
|
||||
|
||||
//Launch "Sound Replication" place
|
||||
target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0].links()["\nSound Replication Test\n"].tap();
|
||||
|
||||
//Waiting 10 sec for game to launch
|
||||
target.delay(15);
|
||||
|
||||
//Verifying that game is running (keyboard pops up after pressing chat button)
|
||||
var testName = "Game launched";
|
||||
target.frontMostApp().mainWindow().images()[0].images()[1].tapWithOptions({tapOffset:{x:0.23, y:0.06}}); //open chat (works!)
|
||||
target.delay(1);
|
||||
|
||||
//Check if keyboard is active
|
||||
if (target.frontMostApp().keyboard().isValid())
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIALogger.logFail(testName);
|
||||
}
|
||||
|
||||
//Type something
|
||||
|
||||
|
||||
target.delay(1);
|
||||
|
||||
target.frontMostApp().keyboard().typeString("Test is over\n");
|
||||
|
||||
target.delay(5);
|
||||
@@ -0,0 +1,113 @@
|
||||
var webTimeout = 2;
|
||||
var loginTimeout = 15;
|
||||
|
||||
var target = UIATarget.localTarget();
|
||||
var webView = target.frontMostApp().mainWindow().scrollViews()[0].webViews()[0];
|
||||
var app = target.frontMostApp();
|
||||
var window = app.mainWindow();
|
||||
var innerWindow = window.scrollViews();
|
||||
|
||||
//Initial screen elements
|
||||
var wheel = target.frontMostApp().mainWindow().pickers()[0].wheels()[0]; //picker wheel
|
||||
var loginButton = target.frontMostApp().mainWindow().scrollViews()[0].staticTexts()["Login"];
|
||||
var aboutButtoniPad = target.frontMostApp().mainWindow().scrollViews()[0].buttons()[4]; //for iPad
|
||||
var nameField = target.frontMostApp().mainWindow().scrollViews()[0].textFields()[0];
|
||||
var passwordField = target.frontMostApp().mainWindow().scrollViews()[0].secureTextFields()[0];
|
||||
|
||||
function login(username, password)
|
||||
{
|
||||
if (loginButton.isValid())
|
||||
{
|
||||
UIALogger.logMessage("Setting username as '" + username + "'");
|
||||
innerWindow[0].textFields()[0].setValue(username);
|
||||
UIALogger.logMessage("Setting password as '" + password + "'");
|
||||
innerWindow[0].secureTextFields()[0].setValue(password);
|
||||
loginButton.tap()
|
||||
}
|
||||
}
|
||||
|
||||
function verifyWebViewStaticText(webView, textToVerify)
|
||||
{
|
||||
if (webView.staticTexts()[textToVerify].isValid())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function startTest(testName)
|
||||
{
|
||||
UIALogger.logStart(testName);
|
||||
UIALogger.logMessage("##teamcity[testStarted name='" + testName + "']");
|
||||
}
|
||||
|
||||
function failTest(testName, message, details)
|
||||
{
|
||||
if (!testName)
|
||||
{
|
||||
UIALogger.logMessage("ERROR: Test name not provided!");
|
||||
return;
|
||||
}
|
||||
if (!details)
|
||||
details = "No additional details provided.";
|
||||
if (!message)
|
||||
message = testName + "failed for unspecified reason.";
|
||||
|
||||
UIALogger.logFail(testName);
|
||||
UIALogger.logMessage("##teamcity[testFailed name='" + testName + "' message='" + message + "' details='" + details +"']");
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
function passTest(testName)
|
||||
{
|
||||
UIALogger.logPass(testName);
|
||||
UIALogger.logMessage("##teamcity[testFinished name='" + testName + "']");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Select the test environment (GT1)
|
||||
wheel.selectValue("http://www.gametest1.pizzaboxer.fun/");
|
||||
UIALogger.logMessage("Test Environment: " + wheel.value());
|
||||
|
||||
startTest("Open About Page");
|
||||
aboutButtoniPad.tap();
|
||||
var navBar = app.navigationBar();
|
||||
|
||||
if (navBar.name() == "About")
|
||||
passTest("Open About Page");
|
||||
else
|
||||
failTest("About Page", "About Page failed to open.");
|
||||
|
||||
// Close About page
|
||||
startTest("Close About Page");
|
||||
navBar.buttons()["Close"].tap()
|
||||
target.delay(1);
|
||||
|
||||
if (window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest("Close About Page");
|
||||
else
|
||||
failTest("Close About Page", "About Page failed to close.");
|
||||
|
||||
|
||||
|
||||
// Attempt to login to the game
|
||||
startTest("Login Test");
|
||||
|
||||
login("mobiletest", "hackproof12");
|
||||
target.delay(loginTimeout);
|
||||
|
||||
if (!window.scrollViews()[0].staticTexts()["Login"].isValid())
|
||||
passTest("Login Test");
|
||||
else
|
||||
failTest("Login Test", "Game failed to log in.");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>BaseTest</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>wtf.watrbx.robloxipad</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainWindow</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="j9k-Zd-Qzd">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1280" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Launch View Controller-->
|
||||
<scene sceneID="HOS-tt-w20">
|
||||
<objects>
|
||||
<viewController id="j9k-Zd-Qzd" customClass="LaunchViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Pmp-0Z-jHt">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="oRW-gl-5eV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
</view>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="loadingImageView" destination="oRW-gl-5eV" id="f28-F3-8tz"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hdu-SU-bMp" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-149" y="-247"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// LoadingGameController.h
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 11/19/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RobloxPageViewController.h"
|
||||
|
||||
@interface LaunchViewController : RobloxPageViewController
|
||||
{
|
||||
}
|
||||
|
||||
@property (retain, nonatomic) IBOutlet UIImageView *loadingImageView;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// LoadingGameController.m
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 11/19/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "LaunchViewController.h"
|
||||
#import "PlaceLauncher.h"
|
||||
#import "ObjectiveCUtilities.h"
|
||||
#include "v8datamodel/DataModel.h"
|
||||
|
||||
@interface LaunchViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation LaunchViewController
|
||||
|
||||
@synthesize loadingImageView;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id) initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
NSString* loadingImage = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RbxLoadingImage"];
|
||||
[loadingImageView setImage:[UIImage imageNamed:loadingImage]];
|
||||
}
|
||||
|
||||
-(void) gameLoaded
|
||||
{
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
[[PlaceLauncher sharedInstance] presentGameViewController];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void) startGame
|
||||
{
|
||||
NSNumber *placeId = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"RbxPlaceId"];
|
||||
|
||||
[[PlaceLauncher sharedInstance] startGame:[placeId intValue] controller:self request:JOIN_GAME_REQUEST_PLACEID presentGameAutomatically:YES];
|
||||
|
||||
shared_ptr<RBX::Game> currentGame = [[PlaceLauncher sharedInstance] getCurrentGame];
|
||||
|
||||
if(currentGame->getDataModel()->getIsGameLoaded())
|
||||
[self gameLoaded];
|
||||
else
|
||||
currentGame->getDataModel()->gameLoadedSignal.connect(boostFuncFromSelector(@selector(gameLoaded),self));
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self startGame];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
@end
|
||||
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,168 @@
|
||||
//
|
||||
// CookieUnitTest.m
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ashish Jain on 10/27/15.
|
||||
// Copyright © 2015 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#include <sstream>
|
||||
#include "util/Http.h"
|
||||
#include "util/HttpPlatformImpl.h"
|
||||
#include "util/FileSystem.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
DYNAMIC_LOGGROUP(HttpTrace)
|
||||
|
||||
@interface CookieUnitTest : XCTestCase
|
||||
|
||||
typedef void(^AnalyzeBrowserTrackerBlock)(int);
|
||||
|
||||
@property (nonatomic, strong) __block NSString *initialBtId;
|
||||
@property (nonatomic, copy) AnalyzeBrowserTrackerBlock analyzeBrowserTrackerBlock;
|
||||
@property (nonatomic, strong) NSString *RBXEventTrackerV2Value;
|
||||
|
||||
@property (nonatomic, strong) NSMutableDictionary *oreoDictionary;
|
||||
|
||||
@end
|
||||
|
||||
@implementation CookieUnitTest
|
||||
|
||||
CURL *curl;
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
NSLog(@"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
|
||||
NSLog(@"");
|
||||
NSLog(@"%@ SetUp", self.name);
|
||||
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
[super tearDown];
|
||||
|
||||
NSLog(@"");
|
||||
NSLog(@"%@ TearDown", self.name);
|
||||
NSLog(@"==========================================================");
|
||||
}
|
||||
|
||||
- (void) testBrowserTrackerCookieName {
|
||||
NSLog(@"testBrowserTrackerCookieName");
|
||||
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"testBrowserTrackerCookieName"];
|
||||
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.watrbx.wtf"]];
|
||||
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
||||
NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
|
||||
BOOL found = NO;
|
||||
|
||||
for (NSHTTPCookie *cookie in cookies) {
|
||||
if ([cookie.name isEqualToString:@"RBXEventTrackerV2"]) {
|
||||
found = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (YES == found) {
|
||||
XCTAssert(YES, @"BrowserTracker cookie name is still RBXEventTrackerV2");
|
||||
} else {
|
||||
XCTAssertFalse(@"BrowserTracker cookie name is not RBXEventTrackerV2");
|
||||
}
|
||||
|
||||
[expectation fulfill];
|
||||
|
||||
});
|
||||
}] resume];
|
||||
|
||||
[self waitForExpectationsWithTimeout:5.0 handler:^(NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Timeout error: %@", error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void) testAnalyzeBrowserTracker {
|
||||
NSLog(@"testAnalyzeBrowserTracker");
|
||||
|
||||
CookieUnitTest __weak *weakSelf = self;
|
||||
XCTestExpectation __block *expectation = [self expectationWithDescription:@"testAnalyzeBrowserTracker"];
|
||||
|
||||
// Setting the analyzeBrowserTrackerBlock property needs to be set on 'weakSelf' otherwise the call
|
||||
// to XCTAssertFalse throws an error about a possible retain cycle
|
||||
weakSelf.analyzeBrowserTrackerBlock = ^(int iteration) {
|
||||
if (iteration < 5) {
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.watrbx.wtf"]];
|
||||
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
|
||||
NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies];
|
||||
if (cookies.count == 0) {
|
||||
XCTAssertFalse(@"No cookies returned");
|
||||
} else {
|
||||
for (NSHTTPCookie *cookie in cookies) {
|
||||
if ([cookie.name isEqualToString:@"RBXEventTrackerV2"]) {
|
||||
if (nil == weakSelf.initialBtId) {
|
||||
NSLog(@"Initial Request Headers: %@", request.allHTTPHeaderFields);
|
||||
// If the initial cookie is nil then we should populate it with whatever value we get back from the server
|
||||
weakSelf.initialBtId = cookie.value;
|
||||
break;
|
||||
} else {
|
||||
if (![weakSelf.initialBtId isEqualToString:cookie.value]) {
|
||||
NSString *failureMessage = [NSString stringWithFormat:@"BrowserTracker value changed from %@ to %@.\nRequest Headers: %@", weakSelf.initialBtId, cookie.value, request.allHTTPHeaderFields];
|
||||
NSLog(@"Iteration %d - Failed", iteration);
|
||||
XCTAssertFalse(failureMessage);
|
||||
[expectation fulfill];
|
||||
|
||||
// Nil out the expectation otherwise, due to the recursive nature of this method multiple "fulfill" messages will
|
||||
// get sent to the same expectation which will result in a crash. So as soon as we fulfill the result, we nil out
|
||||
// the expectation.
|
||||
expectation = nil;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int iter = iteration + 1;
|
||||
if (iter == 1) {
|
||||
NSLog(@"Iteration %d - BtId initialized", iter);
|
||||
} else {
|
||||
NSLog(@"Iteration %d - Passed", iter);
|
||||
}
|
||||
|
||||
// Recursively call the browser tracker block with the updated iteration value
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
self.analyzeBrowserTrackerBlock(iter);
|
||||
});
|
||||
}
|
||||
|
||||
}] resume];
|
||||
}
|
||||
else
|
||||
{
|
||||
XCTAssertTrue(@"Browser Tracker remained consistently the same");
|
||||
[expectation fulfill];
|
||||
|
||||
// Nil out the expectation otherwise, due to the recursive nature of this method multiple "fulfill" messages will
|
||||
// get sent to the same expectation which will result in a crash. So as soon as we fulfill the result, we nil out
|
||||
// the expectation.
|
||||
expectation = nil;
|
||||
}
|
||||
};
|
||||
|
||||
// Initiate the test with a call to the completion handler initialized to iteration 0
|
||||
self.analyzeBrowserTrackerBlock(0);
|
||||
|
||||
// This is the amount of time to wait for the asynchronous operations to complete before timing out the testcase
|
||||
[self waitForExpectationsWithTimeout:60 handler:^(NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Timeout error: %@", error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// ROBLOXTests.m
|
||||
// ROBLOXTests
|
||||
//
|
||||
// Created by Ashish Jain on 10/27/15.
|
||||
// Copyright © 2015 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface ROBLOXTests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation ROBLOXTests
|
||||
|
||||
- (void)setUp {
|
||||
[super setUp];
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
NSLog(@"setup");
|
||||
}
|
||||
|
||||
- (void)tearDown {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
[super tearDown];
|
||||
|
||||
NSLog(@"tearDown");
|
||||
}
|
||||
|
||||
- (void)testExample {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
|
||||
NSLog(@"testExample");
|
||||
}
|
||||
|
||||
- (void)testPerformanceExample {
|
||||
|
||||
NSLog(@"testPerformanceExample");
|
||||
|
||||
// This is an example of a performance test case.
|
||||
[self measureBlock:^{
|
||||
// Put the code you want to measure the time of here.
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 10/9/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#define HAS_SHOWN_KEY "HasShownBefore"
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
{
|
||||
UIBackgroundTaskIdentifier bgTask;
|
||||
BOOL leavingGame;
|
||||
}
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
@property (assign) UIBackgroundTaskIdentifier bgTask;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,156 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// RobloxMobile
|
||||
//
|
||||
// Created by Ben Tkacheff on 10/9/13.
|
||||
// Copyright (c) 2013 ROBLOX. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import "PlaceLauncher.h"
|
||||
#import "UserInfo.h"
|
||||
#import "RobloxInfo.h"
|
||||
#import "RobloxMemoryManager.h"
|
||||
#import "UpgradeCheckHelper.h"
|
||||
#import "CrashReporter.h"
|
||||
#import "SessionReporter.h"
|
||||
#import "KeychainItemWrapper.h"
|
||||
#import "LoginManager.h"
|
||||
#import "ABTestManager.h"
|
||||
#import "RobloxNotifications.h"
|
||||
|
||||
#include "v8datamodel/GuiBuilder.h"
|
||||
#include "util/standardout.h"
|
||||
#include "util/http.h"
|
||||
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
@synthesize bgTask;
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
leavingGame = NO;
|
||||
|
||||
[LoginManager sharedInstance];
|
||||
|
||||
//we need to call this on start up, so save a browser tracker
|
||||
//NSString* browserTracker = [RobloxData initializeBrowserTracker];
|
||||
//[[NSUserDefaults standardUserDefaults] setObject:browserTracker forKey:BROWSER_TRACKER_KEY];
|
||||
//[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// this makes sure everyone is on the right minimum version of the app
|
||||
[UpgradeCheckHelper checkForUpdate:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
|
||||
|
||||
// Register the preference defaults early.
|
||||
NSString * defaultKeys[2] = { @"warnings_preference", @"wifionly_preference" };
|
||||
NSNumber * defaultValues[2] = { [NSNumber numberWithBool:YES], [NSNumber numberWithBool:NO] };
|
||||
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjects:(id *)defaultValues forKeys:(id *)defaultKeys count:2];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
|
||||
|
||||
[CrashReporter sharedInstance];
|
||||
[[SessionReporter sharedInstance] reportSessionFor:APPLICATION_FRESH_START];
|
||||
|
||||
KeychainItemWrapper *keychainItem = [[KeychainItemWrapper alloc] initWithIdentifier:[[[NSBundle mainBundle] bundleIdentifier] stringByAppendingString:@"RobloxLogin"] accessGroup:nil];
|
||||
if (keychainItem)
|
||||
{
|
||||
NSString *password = [keychainItem objectForKey:(__bridge id)kSecValueData];
|
||||
NSString* username = [keychainItem objectForKey:(__bridge id)kSecAttrAccount];
|
||||
|
||||
[UserInfo CurrentPlayer].username = username;
|
||||
[UserInfo CurrentPlayer].password = password;
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(gotDidLeaveGameNotification:) name:RBX_NOTIFY_GAME_DID_LEAVE object:nil ];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(gotStartLeaveGameNotification:) name:RBX_NOTIFY_GAME_START_LEAVING object:nil ];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@HAS_SHOWN_KEY];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
|
||||
[[LoginManager sharedInstance] setRememberPassword:true];
|
||||
|
||||
[[ABTestManager sharedInstance] fetchExperimentsForBrowserTracker];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(void) gotDidLeaveGameNotification:(NSNotification *)aNotification
|
||||
{
|
||||
leavingGame = NO;
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:NO];
|
||||
}
|
||||
|
||||
-(void) gotStartLeaveGameNotification:(NSNotification *)aNotification
|
||||
{
|
||||
leavingGame = YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
|
||||
[[PlaceLauncher sharedInstance] disableViewBecauseGoingToBackground];
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"tryBackground" forKey:@"RobloxAppState"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
|
||||
[[PlaceLauncher sharedInstance] leaveGame];
|
||||
|
||||
[[SessionReporter sharedInstance] reportSessionFor:APPLICATION_BACKGROUND];
|
||||
|
||||
[[LoginManager sharedInstance] processBackground];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"RobloxAppState"];
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"RobloxGameState"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
|
||||
{
|
||||
|
||||
[[PlaceLauncher sharedInstance] clearCachedContent];
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// this makes sure everyone is on the right minimum version of the app
|
||||
[UpgradeCheckHelper checkForUpdate:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"tryForeground" forKey:@"RobloxAppState"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
|
||||
RobloxWebUtility * robloxWebUtility = [RobloxWebUtility sharedInstance];
|
||||
if (![robloxWebUtility bAppSettingsInitialized])
|
||||
{
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW,0), ^{
|
||||
[robloxWebUtility updateAllClientSettingsWithCompletion:nil];
|
||||
});
|
||||
}
|
||||
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
|
||||
[[PlaceLauncher sharedInstance] enableViewBecauseGoingToForeground];
|
||||
|
||||
[[SessionReporter sharedInstance] reportSessionFor:APPLICATION_ACTIVE];
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"inApp" forKey:@"RobloxAppState"];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
|
||||
{
|
||||
return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? UIInterfaceOrientationMaskAll : UIInterfaceOrientationMaskLandscape;
|
||||
}
|
||||
|
||||
@end
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 166 KiB |
|
After Width: | Height: | Size: 652 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 18 KiB |