Created
January 16, 2014 20:37
-
-
Save qdot/8462977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
marionette('First Time Use >', function() { | |
var assert = require('assert'); | |
var FTU = 'app://communications.gaiamobile.org'; | |
var client = marionette.client(); | |
var clickThruPanel = function(panel_id, button_id) { | |
if (panel_id == '#wifi') { | |
// The wifi panel will bring up a screen to show it is scanning for | |
// networks. Not waiting for this to clear will blow test timing and cause | |
// things to fail. | |
client.helper.waitForElementToDisappear('#loading-overlay'); | |
} | |
// waitForElement is used to make sure animations and page changes have | |
// finished. | |
client.helper.waitForElement(panel_id); | |
if (button_id) { | |
var button = client.helper.waitForElement(button_id); | |
button.click(); | |
} | |
}; | |
test.skip('FTU comes up on profile generation', function() { | |
client.apps.switchToApp(FTU); | |
}); | |
test('FTU click thru', function() { | |
client.apps.switchToApp(FTU); | |
clickThruPanel('#languages', '#forward'); | |
clickThruPanel('#wifi', '#forward'); | |
clickThruPanel('#date_and_time', '#forward'); | |
clickThruPanel('#geolocation', '#forward'); | |
clickThruPanel('#import_contacts', '#forward'); | |
clickThruPanel('#welcome_browser', '#forward'); | |
clickThruPanel('#browser_privacy', '#forward'); | |
clickThruPanel('#finish-screen', '#skip-tutorial-button'); | |
}); | |
test.skip('FTU Wifi Scanning Tests', function() { | |
client.apps.switchToApp(FTU); | |
clickThruPanel('#languages', '#forward'); | |
clickThruPanel('#wifi', '#forward'); | |
clickThruPanel('#date_and_time', '#back'); | |
clickThruPanel('#wifi', undefined); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment