simple check to ensure changing username change works

pull/1097/merge
johnyma22 2012-10-09 16:04:11 +01:00
parent d7c80ed41e
commit f79bc7f1d8
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
describe("change username value", function(){
//create a new pad before each test run
beforeEach(function(cb){
helper.newPad(cb);
this.timeout(5000);
});
it("makes sure changing username works", function(done) {
var inner$ = helper.padInner$;
var chrome$ = helper.padChrome$;
//click on the settings button to make settings visible
var $userButton = chrome$(".buttonicon-showusers");
$userButton.click();
var $usernameInput = chrome$("#myusernameedit");
$usernameInput.click();
$usernameInput.sendkeys('{selectall}');
$usernameInput.sendkeys('{del}');
$usernameInput.sendkeys('John McLear');
$usernameInput.sendkeys('{enter}');
var correctUsernameValue = $usernameInput.val() === "John McLear";
//check if the username has been changed to John McLear
expect(correctUsernameValue).to.be(true);
done();
});
});