mirror of https://github.com/zulip/zulip.git
06-settings.js: Disable flaky test.
This commit disables the password change tests. These tests are affected by the race condition due to which a user's session can be flushed after a change in password. This happens because in Django 1.7+ session hash is changed whenever password is changed. Till we can find a better solution to this problem these tests cannot be enabled.
This commit is contained in:
parent
391e54f568
commit
063268246e
|
@ -4,7 +4,9 @@ var OUTGOING_WEBHOOK_BOT_TYPE = '3';
|
|||
|
||||
common.start_and_log_in();
|
||||
|
||||
var form_sel = 'form[action^="/json/settings"]';
|
||||
// Password change form test commented out due to Django logging out the user.
|
||||
|
||||
// var form_sel = 'form[action^="/json/settings"]';
|
||||
var regex_zuliprc = /^data:application\/octet-stream;charset=utf-8,\[api\]\nemail=.+\nkey=.+\nsite=.+\n$/;
|
||||
var regex_flaskbotrc = /^data:application\/octet-stream;charset=utf-8,\[.\]\nemail=.+\nkey=.+\nsite=.+\n$/;
|
||||
|
||||
|
@ -29,10 +31,12 @@ casper.then(function () {
|
|||
|
||||
casper.test.assertNotVisible("#pw_change_controls");
|
||||
|
||||
casper.click(".change_password_button");
|
||||
// casper.click(".change_password_button");
|
||||
casper.click('#api_key_button');
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
casper.then(function () {
|
||||
casper.waitUntilVisible("#pw_change_controls", function () {
|
||||
casper.waitForResource("zxcvbn.js", function () {
|
||||
|
@ -60,10 +64,11 @@ casper.then(function () {
|
|||
casper.click('#api_key_button');
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
casper.then(function () {
|
||||
casper.waitUntilVisible('#get_api_key_password', function () {
|
||||
casper.fill('form[action^="/json/fetch_api_key"]', {password:'qwertyuiop'});
|
||||
casper.fill('form[action^="/json/fetch_api_key"]', {password:test_credentials.default_user.password});
|
||||
casper.click('button[name="view_api_key"]');
|
||||
});
|
||||
});
|
||||
|
@ -72,6 +77,7 @@ casper.then(function () {
|
|||
casper.waitUntilVisible('#show_api_key_box', function () {
|
||||
casper.test.assertMatch(casper.fetchText('#api_key_value'), /[a-zA-Z0-9]{32}/, "Looks like an API key");
|
||||
|
||||
/*
|
||||
// Change it all back so the next test can still log in
|
||||
casper.fill(form_sel, {
|
||||
full_name: "Iago",
|
||||
|
@ -80,6 +86,7 @@ casper.then(function () {
|
|||
confirm_password: test_credentials.default_user.password,
|
||||
});
|
||||
casper.click('button[name="change_settings"]');
|
||||
*/
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -100,9 +107,9 @@ casper.then(function () {
|
|||
});
|
||||
|
||||
casper.then(function () {
|
||||
casper.waitUntilVisible('#account-settings-status', function () {
|
||||
casper.click('[data-section="your-bots"]');
|
||||
});
|
||||
// casper.waitUntilVisible('#account-settings-status', function () {
|
||||
casper.click('[data-section="your-bots"]');
|
||||
// });
|
||||
});
|
||||
|
||||
casper.then(function create_bot() {
|
||||
|
|
Loading…
Reference in New Issue