Skip to content

Instantly share code, notes, and snippets.

@darkwing
Created October 30, 2014 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkwing/dbb5adf5618ccdf51b27 to your computer and use it in GitHub Desktop.
Save darkwing/dbb5adf5618ccdf51b27 to your computer and use it in GitHub Desktop.
// Returns a Page Object Model which will contain helper methods and
// required properties for individual tests
define(['base/_config', 'base/_utils'], function(config, utils) {
function POM(remote, url, props) {
this.remote = remote;
this.url = url;
for(var prop in props) {
this.prototype[prop] = props[prop];
}
return this;
}
// Shortcut method to help with login
POM.prototype.login = function(username, pass) {
};
// Shortcut method to log out
POM.prototype.logout = function() {
return utils.completePersonaLogout();
};
// Goes back to the page's URL
POM.prototype.goTo = function(url) {
};
// Tests for a given property within the page
POM.prototype.checkWindowPropertyExists = function(prop) {
return utils.checkWindowPropertyExists(prop);
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment