callflow
open /billing/callc/logout
type login_username admin
type login_psw admin1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/devices/callflow/2
verifyTextPresent User: Test User #1
open /billing/devices/callflow_edit/2?cft=before_call
verifyTextPresent User: Test User #1
verifyElementPresent //a[@href='/billing/devices/device_edit/2']
clickAndWait commit
verifyTextPresent Call Flow updated
select cf_action label=Forward
verifyTextPresent User: Test User #1
verifyElementPresent //a[@href='/billing/devices/device_edit/2']
clickAndWait commit
select device_id label=FAX/102 - Test FAX device
click cf_data3_4
type cf_data4 123
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
click cf_data_6
type ext_number 3245678
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Call Flow updated
verifyValue cf_data4 123
select cf_action label=VoiceMail
clickAndWait commit
verifyTextPresent Call Flow updated
select cf_action label=Fax detect
clickAndWait commit
select device_id label=FAX/102 - Test FAX device
clickAndWait check_img
verifyValue device_id 3
verifyTextPresent Call Flow updated
open /billing/devices/callflow_edit/2?cft=busy
select cf_action label=Forward
clickAndWait commit
select device_id label=IAX2/1002 -
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Call Flow updated
open /billing/devices/show_devices/2
clickAndWait destroy_link_3
assertConfirmation Are you sure?
verifyTextPresent Can not delete this device
clickAndWait destroy_link_4
assertConfirmation Are you sure?
waitForTextPresent Device has forwarded calls - we cannot delete it
open /billing/callc/logout
type login_username reseller
type login_psw reseller1
clickAndWait commit
verifyTextPresent Succesfully logged in
open /billing/devices/user_devices
open /billing/devices/callflow/6
verifyElementPresent //a[@href='/billing/devices/user_device_edit/6']
open /billing/devices/callflow_edit/6?cft=before_call
verifyElementPresent //a[@href='/billing/devices/user_device_edit/6']
select cf_action label=Forward
clickAndWait commit
click cf_data3_2
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Please select device
open /billing/devices/callflow/7
open /billing/devices/callflow_edit/7?cft=before_call
select cf_action label=Forward
clickAndWait commit
click cf_data_6
type ext_number 4514513123
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Call Flow updated
open /billing/devices/callflow/7
verifyText before_call Forward 4514513123
open /billing/devices/callflow_edit/7?cft=before_call
type ext_number 105
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Device Call Flow external number cannot match extension
verifyValue ext_number 4514513123
click cf_data_5
select device_id label=IAX2/104 - Test Device for Reseller
clickAndWait //input[@name='commit' and @value='Change' and @type='submit' and @onclick="if (window.hiddenCommit) { window.hiddenCommit.setAttribute('value', this.value); }else { hiddenCommit = this.cloneNode(false);hiddenCommit.setAttribute('type', 'hidden');this.form.appendChild(hiddenCommit); }this.setAttribute('originalValue', this.value);this.disabled = true;this.value='Processing..';result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue');this.disabled = false; }return result;"]
verifyTextPresent Call Flow updated
verifySelectedLabel device_id IAX2/104 - Test Device for Reseller
open billing/devices/callflow_edit/2?cf=1&cft=before_call
verifyTextPresent Don't be so smart...
open /billing/callc/logout
type login_username 101
type login_psw 1011
clickAndWait commit
open /billing/devices/callflow_edit/6?cf=7&cft=before_call
verifyTextPresent Don't be so smart...
open /billing/callc/logout
type login_username accountant
type login_psw accountant1
clickAndWait commit
open /billing/devices/callflow_edit/6?cf=7&cft=before_call
verifyTextNotPresent Don't be so smart...