mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
simple check to ensure changing username change works
This commit is contained in:
parent
d7c80ed41e
commit
f79bc7f1d8
1 changed files with 31 additions and 0 deletions
31
tests/frontend/specs/change_user_name.js
Normal file
31
tests/frontend/specs/change_user_name.js
Normal 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();
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue