Apply ES6 object shorthand rule to functional tests code

Change-Id: I89b6063ae5b4765eda5c7f069cac0a7ecefa7c45
This commit is contained in:
Julia Aranovich 2016-04-19 14:00:58 +03:00
parent b75f9be106
commit e065cb8925
44 changed files with 314 additions and 317 deletions

View File

@ -1,6 +1,4 @@
---
rules:
object-shorthand: 0
env:
node: true
globals:

View File

@ -19,7 +19,7 @@ import assert from 'intern/chai!assert';
import Command from 'intern/dojo/node!leadfoot/Command';
_.defaults(Command.prototype, {
clickLinkByText: function(text) {
clickLinkByText(text) {
return new this.constructor(this, function() {
return this.parent
.findByLinkText(text)
@ -27,7 +27,7 @@ _.defaults(Command.prototype, {
.end();
});
},
clickByCssSelector: function(cssSelector) {
clickByCssSelector(cssSelector) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -35,7 +35,7 @@ _.defaults(Command.prototype, {
.end();
});
},
waitForCssSelector: function(cssSelector, timeout) {
waitForCssSelector(cssSelector, timeout) {
return new this.constructor(this, function() {
var currentTimeout;
return this.parent
@ -55,7 +55,7 @@ _.defaults(Command.prototype, {
});
});
},
waitForElementDeletion: function(cssSelector, timeout) {
waitForElementDeletion(cssSelector, timeout) {
return new this.constructor(this, function() {
var currentTimeout;
return this.parent
@ -74,7 +74,7 @@ _.defaults(Command.prototype, {
});
});
},
setInputValue: function(cssSelector, value) {
setInputValue(cssSelector, value) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -86,7 +86,7 @@ _.defaults(Command.prototype, {
// Drag-n-drop helpers
// Taken from not yet accepted pull request to leadfoot from
// https://github.com/theintern/leadfoot/pull/16
dragFrom: function(element, x, y) {
dragFrom(element, x, y) {
if (typeof element === 'number') {
y = x;
x = element;
@ -100,7 +100,7 @@ _.defaults(Command.prototype, {
};
});
},
dragTo: function(element, x, y) {
dragTo(element, x, y) {
if (typeof element === 'number') {
y = x;
x = element;
@ -174,19 +174,19 @@ _.defaults(Command.prototype, {
if (!dataTransfer) {
dataTransfer = {
data: options.dragData || {},
setData: function(eventName, val) {
setData(eventName, val) {
if (typeof val === 'string') {
this.data[eventName] = val;
}
},
getData: function(eventName) {
getData(eventName) {
return this.data[eventName];
},
clearData: function() {
clearData() {
this.data = {};
return true;
},
setDragImage: function() {}
setDragImage() {}
};
}
@ -271,7 +271,7 @@ _.defaults(Command.prototype, {
});
},
// assertion helpers
assertElementsExist: function(cssSelector, amount, message) {
assertElementsExist(cssSelector, amount, message) {
return new this.constructor(this, function() {
return this.parent
.findAllByCssSelector(cssSelector)
@ -287,17 +287,17 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementExists: function(cssSelector, message) {
assertElementExists(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent.assertElementsExist(cssSelector, 1, message);
});
},
assertElementNotExists: function(cssSelector, message) {
assertElementNotExists(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent.assertElementsExist(cssSelector, 0, message);
});
},
assertElementAppears: function(cssSelector, timeout, message) {
assertElementAppears(cssSelector, timeout, message) {
return new this.constructor(this, function() {
return this.parent
.waitForCssSelector(cssSelector, timeout)
@ -305,7 +305,7 @@ _.defaults(Command.prototype, {
.assertElementExists(cssSelector, message);
});
},
assertElementsAppear: function(cssSelector, timeout, message) {
assertElementsAppear(cssSelector, timeout, message) {
return new this.constructor(this, function() {
return this.parent
.waitForCssSelector(cssSelector, timeout)
@ -313,7 +313,7 @@ _.defaults(Command.prototype, {
.assertElementsExist(cssSelector, message);
});
},
assertElementDisappears: function(cssSelector, timeout, message) {
assertElementDisappears(cssSelector, timeout, message) {
return new this.constructor(this, function() {
return this.parent
.waitForElementDeletion(cssSelector, timeout)
@ -321,7 +321,7 @@ _.defaults(Command.prototype, {
.assertElementNotExists(cssSelector, message);
});
},
assertElementEnabled: function(cssSelector, message) {
assertElementEnabled(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -330,7 +330,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementDisabled: function(cssSelector, message) {
assertElementDisabled(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -339,7 +339,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementDisplayed: function(cssSelector, message) {
assertElementDisplayed(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -348,7 +348,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementNotDisplayed: function(cssSelector, message) {
assertElementNotDisplayed(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -357,7 +357,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementTextEquals: function(cssSelector, expectedText, message) {
assertElementTextEquals(cssSelector, expectedText, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -366,7 +366,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementContainsText: function(cssSelector, text, message) {
assertElementContainsText(cssSelector, text, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -375,7 +375,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementMatchesRegExp: function(cssSelector, regExp, message) {
assertElementMatchesRegExp(cssSelector, regExp, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -384,7 +384,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementNotContainsText: function(cssSelector, text, message) {
assertElementNotContainsText(cssSelector, text, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -393,7 +393,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementPropertyEquals: function(cssSelector, attribute, expectedText, message) {
assertElementPropertyEquals(cssSelector, attribute, expectedText, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -402,7 +402,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementPropertyNotEquals: function(cssSelector, attribute, textToCheck, message) {
assertElementPropertyNotEquals(cssSelector, attribute, textToCheck, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -411,7 +411,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementPropertyContains: function(cssSelector, attribute, text, message) {
assertElementPropertyContains(cssSelector, attribute, text, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -420,7 +420,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementSelected: function(cssSelector, message) {
assertElementSelected(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -429,7 +429,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertElementNotSelected: function(cssSelector, message) {
assertElementNotSelected(cssSelector, message) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)
@ -438,7 +438,7 @@ _.defaults(Command.prototype, {
.end();
});
},
assertIsIntegerContentPositive: function(cssSelector, attributeName) {
assertIsIntegerContentPositive(cssSelector, attributeName) {
return new this.constructor(this, function() {
return this.parent
.findByCssSelector(cssSelector)

View File

@ -26,7 +26,7 @@ EquipmentLib.prototype = {
constructor: EquipmentLib,
nodeSelector: 'div.node',
checkNodesSegmentation: function(nodeView, nodesQuantity, provisioningFlag) {
checkNodesSegmentation(nodeView, nodesQuantity, provisioningFlag) {
// Input array: Nodes quantity by groups.
// [Total, Pending Addition (Provisioning), Discover, Error, Offline]
var nodeSel = this.nodeSelector;
@ -55,7 +55,7 @@ EquipmentLib.prototype = {
.assertElementsExist(nodeSel + tempSelector + 'offline', nodesQuantity[4],
'"Offline" nodes are observed in "' + nodeView + '"" view');
},
renameNode: function(nodeSelector, newName) {
renameNode(nodeSelector, newName) {
var nodeNameSelector = 'div.name p';
var inputSelector = 'input.node-name-input';
return this.remote
@ -73,7 +73,7 @@ EquipmentLib.prototype = {
.assertElementTextEquals(nodeNameSelector, newName, 'Node name is changed successfully')
.end();
},
checkSearchPageSwitching: function(pageName, nodeName) {
checkSearchPageSwitching(pageName, nodeName) {
var self = this;
return this.remote
.then(function() {
@ -89,7 +89,7 @@ EquipmentLib.prototype = {
.assertElementContainsText(this.nodeSelector + ' div.name p', nodeName,
'Search result is correct after switching to "' + pageName + '"" page');
},
checkSortingPageSwitching: function(pageName, nodesQuantity) {
checkSortingPageSwitching(pageName, nodesQuantity) {
// Input array: Nodes quantity by groups.
// [Total, Pending Addition, Discover]
var self = this;
@ -119,7 +119,7 @@ EquipmentLib.prototype = {
nodesQuantity[2], 'Default quantity of "Discovered" nodes is observed after' +
'switching to "' + pageName + '"" page');
},
checkDefaultSorting: function(sortDirection, nodesQuantity) {
checkDefaultSorting(sortDirection, nodesQuantity) {
// Input array: Nodes quantity by groups.
// [Total, Pending Addition, Discover, Error, Offline]
var groupSelector = 'div.nodes-group:nth-child(';
@ -161,7 +161,7 @@ EquipmentLib.prototype = {
.assertElementsExist(groupSelector + sortOrder[3] + ') div.node.offline',
nodesQuantity[4], 'Default quantity of "Offline" nodes is observed');
},
uncheckNodeRoles: function() {
uncheckNodeRoles() {
var selectedRolesSelector = '.role-panel .role-block .role i.glyphicon-selected-role';
return this.remote
.findAllByCssSelector(selectedRolesSelector)

View File

@ -23,7 +23,7 @@ function GenericLib(remote) {
GenericLib.prototype = {
constructor: GenericLib,
gotoPage: function(pageName) {
gotoPage(pageName) {
var pageSelector = {Environments: 'clusters-page', Equipment: 'equipment-page',
Releases: 'releases-page', Plugins: 'plugins-page', Support: 'support-page'};
var pageTitle = {Environments: /My OpenStack Environments/i, Equipment: /Equipment/i,

View File

@ -29,7 +29,7 @@ NetworksLib.prototype = {
btnVerifySelector: 'button.verify-networks-btn',
defaultPlaceholder: '127.0.0.1',
gotoNodeNetworkSubTab: function(groupName) {
gotoNodeNetworkSubTab(groupName) {
var networkSubtabSelector = 'div[id="network-subtabs"]';
return this.remote
.assertElementAppears(networkSubtabSelector, 1000, 'Network subtab list exists')
@ -41,7 +41,7 @@ NetworksLib.prototype = {
.assertElementContainsText('li.active', groupName, '"' + groupName + '" link is opened')
.end();
},
checkNetworkInitialState: function(networkName) {
checkNetworkInitialState(networkName) {
var chain = this.remote;
var self = this;
var mainDiv = 'div.' + networkName.toLowerCase() + ' ';
@ -174,7 +174,7 @@ NetworksLib.prototype = {
}
return chain;
},
checkNetrworkSettingsSegment: function(neutronType) {
checkNetrworkSettingsSegment(neutronType) {
var chain = this.remote;
// Check Neutron L2 subtab
chain = chain.clickByCssSelector('.subtab-link-neutron_l2')
@ -270,7 +270,7 @@ NetworksLib.prototype = {
.assertElementEnabled('input[name="ntp_list"]', '"NTP server list" textfield enabled');
return chain;
},
checkNetrworkVerificationSegment: function() {
checkNetrworkVerificationSegment() {
var connectSelector = 'div.connect-';
var verifyNodeSelector = 'div.verification-node-';
var descriptionConnectivityCheck = RegExp(
@ -308,7 +308,7 @@ NetworksLib.prototype = {
.assertElementExists(this.btnCancelSelector, '"Cancel Changes" button is disabled')
.assertElementExists(this.btnSaveSelector, '"Save Settings" button is disabled');
},
checkNetrworkIpRanges: function(networkName, correctIpRange, newIpRange) {
checkNetrworkIpRanges(networkName, correctIpRange, newIpRange) {
var self = this;
var netSelector = 'div.' + networkName.toLowerCase() + ' ';
var ipStartSelector = netSelector + 'div.ip_ranges input[name*="range-start"]';
@ -354,7 +354,7 @@ NetworksLib.prototype = {
return self.checkIpRanges(networkName);
});
},
checkIncorrectValueInput: function(inputSelector, value, errorSelector, errorMessage) {
checkIncorrectValueInput(inputSelector, value, errorSelector, errorMessage) {
var self = this;
return this.remote
.assertElementEnabled(inputSelector, '"' + inputSelector + '" is enabled')
@ -367,7 +367,7 @@ NetworksLib.prototype = {
return self.checkMultirackVerification();
});
},
checkMultirackVerification: function() {
checkMultirackVerification() {
var self = this;
return this.remote
.assertElementDisabled(this.btnSaveSelector, '"Save Settings" button is disabled')
@ -379,21 +379,21 @@ NetworksLib.prototype = {
return self.gotoNodeNetworkSubTab('default');
});
},
saveSettings: function() {
saveSettings() {
return this.remote
.assertElementEnabled(this.btnSaveSelector, '"Save Settings" button is enabled')
.clickByCssSelector(this.btnSaveSelector)
.assertElementDisabled(this.btnSaveSelector, '"Save Settings" button is disabled')
.assertElementNotExists('div.has-error', 'Settings saved successfully');
},
cancelChanges: function() {
cancelChanges() {
return this.remote
.assertElementEnabled(this.btnCancelSelector, '"Cancel Changes" button is enabled')
.clickByCssSelector(this.btnCancelSelector)
.assertElementDisabled(this.btnCancelSelector, '"Cancel Changes" button is disabled')
.assertElementNotExists('div.has-error', 'Settings canceled successfully');
},
createNetworkGroup: function(groupName) {
createNetworkGroup(groupName) {
var self = this;
return this.remote
.assertElementEnabled('button.add-nodegroup-btn',
@ -428,7 +428,7 @@ NetworksLib.prototype = {
throw new Error('Unexpected error via network group creation: ' + error);
});
},
deleteNetworkGroup: function(groupName) {
deleteNetworkGroup(groupName) {
var self = this;
return this.remote
.then(function() {
@ -457,7 +457,7 @@ NetworksLib.prototype = {
throw new Error('Unexpected error via network group deletion: ' + error);
});
},
checkNeutronL3ForBaremetal: function() {
checkNeutronL3ForBaremetal() {
return this.remote
.assertElementNotExists('div.baremetal div.has-error', 'No Baremetal errors are observed')
.assertElementExists('a[class$="neutron_l3"]', '"Neutron L3" link is existed')
@ -469,7 +469,7 @@ NetworksLib.prototype = {
.assertElementEnabled('input[name="baremetal_gateway"]',
'"Ironic gateway " textfield is enabled');
},
checkBaremetalIntersection: function(networkName, intersectionValues) {
checkBaremetalIntersection(networkName, intersectionValues) {
// Input array: Values to raise baremetal intersection: [Baremetal CIDR, Baremetal Start IP,
// Baremetal End IP, Ironic Start IP, Ironic End IP, Ironic Gateway]
var self = this;
@ -512,7 +512,7 @@ NetworksLib.prototype = {
return self.cancelChanges();
});
},
checkDefaultNetGroup: function() {
checkDefaultNetGroup() {
return this.remote
.assertElementContainsText('ul.node_network_groups', 'default',
'"default" network group is shown and name is correct')
@ -521,7 +521,7 @@ NetworksLib.prototype = {
.assertElementTextEquals('ul.node_network_groups li[role="presentation"]', 'default',
'"default" network group is on top');
},
checkGateways: function(groupName, neutronType) {
checkGateways(groupName, neutronType) {
var chain = this.remote;
chain = chain.assertElementDisabled('div.storage input[name="gateway"]',
'Storage "Gateway" field exists and disabled for "' + groupName + '" network group')
@ -533,7 +533,7 @@ NetworksLib.prototype = {
}
return chain;
},
checkVLANs: function(groupName, neutronType) {
checkVLANs(groupName, neutronType) {
var chain = this.remote;
chain = chain.assertElementPropertyEquals('div.storage div.vlan_start input[type="text"]',
'value', '102', 'Storage "Use VLAN tagging" textfield has default value for "' +
@ -551,7 +551,7 @@ NetworksLib.prototype = {
.assertElementNotExists('div.has-error', 'No errors are observed');
return chain;
},
checkCidrOption: function(networkName) {
checkCidrOption(networkName) {
var self = this;
var netSelector = 'div.' + networkName.toLowerCase() + ' ';
var cidrSelector = netSelector + 'div.cidr input[type="checkbox"]';
@ -577,7 +577,7 @@ NetworksLib.prototype = {
.assertElementNotExists(netSelector + 'div.has-error',
'No ' + networkName + ' errors are observed');
},
selectCidrWay: function(networkName, cidrStatus, cidrSelector, ipStartSelector, ipEndSelector) {
selectCidrWay(networkName, cidrStatus, cidrSelector, ipStartSelector, ipEndSelector) {
var chain = this.remote;
chain = chain.clickByCssSelector(cidrSelector)
.assertElementEnabled(cidrSelector,
@ -599,7 +599,7 @@ NetworksLib.prototype = {
}
return chain;
},
addNewIpRange: function(networkName, newIpRange) {
addNewIpRange(networkName, newIpRange) {
// Works only with last range!
// Input array "newIpRange": [Start IP, End IP]
var self = this;
@ -638,7 +638,7 @@ NetworksLib.prototype = {
'No ' + networkName + ' errors are observed');
return chain;
},
deleteIpRange: function(networkName, rangeRow) {
deleteIpRange(networkName, rangeRow) {
var self = this;
var netSelector = 'div.' + networkName.toLowerCase() + ' ';
var rowRangeSelector = netSelector + 'div.range-row';
@ -659,13 +659,13 @@ NetworksLib.prototype = {
.assertElementNotExists(netSelector + 'div.has-error',
'No ' + networkName + ' errors are observed');
},
checkIpRange: function(addremoveRangeSelector, rowRangeSelector, numRanges) {
checkIpRange(addremoveRangeSelector, rowRangeSelector, numRanges) {
return this.remote
.clickByCssSelector(addremoveRangeSelector)
.sleep(500)
.assertElementsExist(rowRangeSelector, numRanges, 'Correct number of IP ranges exists');
},
checkIpRanges: function(networkName) {
checkIpRanges(networkName) {
var self = this;
var netSelector = 'div.' + networkName.toLowerCase() + ' ';
var cidrSelector = netSelector + 'div.cidr input[type="text"]';
@ -748,7 +748,7 @@ NetworksLib.prototype = {
return self.cancelChanges();
});
},
checkNerworksIntersection: function(networkNameToEdit, networkName, editValues) {
checkNerworksIntersection(networkNameToEdit, networkName, editValues) {
// Input array "editValues": [CIDR, Start IP, End IP]
var self = this;
var netSelector1 = 'div.' + networkNameToEdit.toLowerCase() + ' ';

View File

@ -23,7 +23,7 @@ function SettingsLib(remote) {
SettingsLib.prototype = {
constructor: SettingsLib,
gotoOpenStackSettings: function(settingsSegmentName) {
gotoOpenStackSettings(settingsSegmentName) {
var segmentName = (settingsSegmentName.toLowerCase()).replace(' ', '_') + ' ';
var listSelector = 'ul.nav-pills.nav-stacked ';
var segmentSelector = 'a.subtab-link-' + segmentName;
@ -42,7 +42,7 @@ SettingsLib.prototype = {
.assertElementMatchesRegExp(activeSelector + segmentSelector, segmentDescription,
settingsSegmentName + ' settings segment link name is correct');
},
checkGeneralSegment: function() {
checkGeneralSegment() {
var accessSelector = 'div.setting-section-access';
var repositoriesSelector = 'div.setting-section-repo_setup';
var kernelSelector = 'div.setting-section-kernel_params';
@ -92,7 +92,7 @@ SettingsLib.prototype = {
.assertElementEnabled('textarea[name="packages"]', '"Initial packages" textarea enabled')
.end();
},
checkSecuritySegment: function() {
checkSecuritySegment() {
var publicTlsSelector = 'div.setting-section-public_ssl';
var servicesName = 'TLS for OpenStack public endpoints';
var horizonName = 'HTTPS for Horizon';
@ -125,7 +125,7 @@ SettingsLib.prototype = {
.end()
.end();
},
checkComputeSegment: function() {
checkComputeSegment() {
var commonSelector = 'div.setting-section-common';
var kvmSelector = 'input[value="kvm"]';
var qemuSelector = 'input[value="qemu"]';
@ -149,7 +149,7 @@ SettingsLib.prototype = {
'"Resume guests state on host boot" checkbox is selected')
.end();
},
checkStorageSegment: function() {
checkStorageSegment() {
var commonSelector = 'div.setting-section-common';
var storageSelector = 'div.setting-section-storage';
var lvmSelector = 'input[name="volumes_lvm"]';
@ -200,7 +200,7 @@ SettingsLib.prototype = {
'"Ceph object replication factor" textfield is enabled')
.end();
},
checkLoggingSegment: function() {
checkLoggingSegment() {
var commonSelector = 'div.setting-section-common';
var syslogSelector = 'div.setting-section-syslog';
var puppetSelector = 'input[name="puppet_debug"]';
@ -233,7 +233,7 @@ SettingsLib.prototype = {
.assertElementSelected(tcpSelector, '"TCP" radiobutton is selected')
.end();
},
checkOpenStackServicesSegment: function() {
checkOpenStackServicesSegment() {
var componentsSelector = 'div.setting-section-additional_components';
var saharaSelector = 'input[name="sahara"]';
var ceilometerSelector = 'input[name="ceilometer"]';
@ -257,7 +257,7 @@ SettingsLib.prototype = {
.assertElementNotSelected(ironicSelector, '"Install Ironic" checkbox is not selected')
.end();
},
checkOtherSegment: function() {
checkOtherSegment() {
var vpnSelector = 'div.setting-section-VPNaaS';
var zabbixSelector = 'div.setting-section-zabbix_monitoring';
var loggingSelector = 'div.setting-section-logging';

View File

@ -27,7 +27,7 @@ registerSuite(function() {
return {
name: 'Settings Tab Segment',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
settingsLib = new SettingsLib(this.remote);
@ -44,7 +44,7 @@ registerSuite(function() {
return clusterPage.goToTab('Settings');
});
},
'Check "General" segment': function() {
'Check "General" segment'() {
var pageTitleSelector = 'div.title';
var segmentSelector = 'li.active a.subtab-link-general';
return this.remote
@ -60,7 +60,7 @@ registerSuite(function() {
.assertElementDisabled('button.btn-revert-changes', '"Cancel Changes" button is disabled')
.assertElementDisabled('button.btn-apply-changes', '"Save Settings" button is disabled');
},
'Check "Security" segment': function() {
'Check "Security" segment'() {
var segmentName = 'Security';
return this.remote
.then(function() {
@ -70,7 +70,7 @@ registerSuite(function() {
return settingsLib.checkSecuritySegment();
});
},
'Check "Compute" segment': function() {
'Check "Compute" segment'() {
var segmentName = 'Compute';
return this.remote
.then(function() {
@ -80,7 +80,7 @@ registerSuite(function() {
return settingsLib.checkComputeSegment();
});
},
'Check "Storage" segment': function() {
'Check "Storage" segment'() {
var segmentName = 'Storage';
return this.remote
.then(function() {
@ -90,7 +90,7 @@ registerSuite(function() {
return settingsLib.checkStorageSegment();
});
},
'Check "Logging" segment': function() {
'Check "Logging" segment'() {
var segmentName = 'Logging';
return this.remote
.then(function() {
@ -100,7 +100,7 @@ registerSuite(function() {
return settingsLib.checkLoggingSegment();
});
},
'Check "OpenStack Services" segment': function() {
'Check "OpenStack Services" segment'() {
var segmentName = 'OpenStack Services';
return this.remote
.then(function() {
@ -110,7 +110,7 @@ registerSuite(function() {
return settingsLib.checkOpenStackServicesSegment();
});
},
'Check "Other" segment': function() {
'Check "Other" segment'() {
var segmentName = 'Other';
return this.remote
.then(function() {
@ -120,7 +120,7 @@ registerSuite(function() {
return settingsLib.checkOtherSegment();
});
},
'User returns to the selected segment on "Settings" tab': function() {
'User returns to the selected segment on "Settings" tab'() {
return this.remote
.then(function() {
return clusterPage.goToTab('Nodes');
@ -139,7 +139,7 @@ registerSuite(function() {
return settingsLib.checkOtherSegment();
});
},
'No "Node network group" item via sorting/filtering for unallocated nodes': function() {
'No "Node network group" item via sorting/filtering for unallocated nodes'() {
var itemName = 'Node network group';
var itemRegExp = RegExp('[\\s\\S]*[^(' + itemName + ')][\\s\\S]*', 'i');
var btnSortSelector = 'button.btn-sorters:enabled';
@ -177,7 +177,7 @@ registerSuite(function() {
.assertElementMatchesRegExp(popContentSelector, itemRegExp, 'No "' + itemName +
'" item label via filtering for unallocated nodes');
},
'Check node roles edition': function() {
'Check node roles edition'() {
var nodeSelector = 'div.node ';
var btnEditSelector = 'button.btn-edit-roles';
var btnApplySelector = 'button.btn-apply';

View File

@ -51,7 +51,7 @@ registerSuite(function() {
return {
name: 'Nodes across environment',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('VLAN Cluster');
@ -75,7 +75,7 @@ registerSuite(function() {
return common.addNodesToCluster(nodesCompute, ['Compute']);
});
},
'Node settings pop-up contains environment and node network group names': function() {
'Node settings pop-up contains environment and node network group names'() {
var summarySelector = 'div.node-summary ';
var descriptionClusterNode = RegExp(
'Environment.*' + clusterName + '[\\s\\S]*' +
@ -144,7 +144,7 @@ registerSuite(function() {
return modal.close();
});
},
'Standard and Compact Node view support': function() {
'Standard and Compact Node view support'() {
var preSelector = 'input[name="view_mode"][value="';
var compactSelector = preSelector + 'compact"]';
var standardSelector = preSelector + 'standard"]';
@ -166,7 +166,7 @@ registerSuite(function() {
return equipmentLib.checkNodesSegmentation('standard', inputArray, false);
});
},
'Quick Search support for "Equipment" page': function() {
'Quick Search support for "Equipment" page'() {
var nodeNameSelector = clusterSelector + ' div.name p';
var btnClearSelector = 'button.btn-clear-search';
var txtSearchSelector = 'input[name="search"]';
@ -220,7 +220,7 @@ registerSuite(function() {
.assertElementTextEquals(nodeNameSelector, computeName,
'Compute node is searched correctly');
},
'Quick Search results saved after refreshing of page': function() {
'Quick Search results saved after refreshing of page'() {
return this.remote
.then(function() {
return command.refresh();
@ -229,7 +229,7 @@ registerSuite(function() {
return equipmentLib.checkSearchPageSwitching('Equipment', computeName);
});
},
'Quick Search results saved after switching to other page': function() {
'Quick Search results saved after switching to other page'() {
return this.remote
.then(function() {
return equipmentLib.checkSearchPageSwitching('Environments', computeName);
@ -245,7 +245,7 @@ registerSuite(function() {
})
.clickByCssSelector('button.btn-clear-search');
},
'Labels support for "Equipment" page': function() {
'Labels support for "Equipment" page'() {
var labelName = 'BOOST_LABEL';
var labelValue = '1.5';
var btnLabelsSelector = 'button.btn-labels';
@ -284,7 +284,7 @@ registerSuite(function() {
.clickByCssSelector(btnApplySelector)
.assertElementDisappears(labelSelector, 2000, '"Controller" node label dissappears');
},
'Sorting support for "Equipment" page': function() {
'Sorting support for "Equipment" page'() {
return this.remote
.assertElementsExist('button.btn-sorters', '"Sort Nodes" button is exists')
.clickByCssSelector('button.btn-sorters')
@ -297,7 +297,7 @@ registerSuite(function() {
return equipmentLib.checkDefaultSorting('up', inputArray);
});
},
'Filtering support for "Equipment" page': function() {
'Filtering support for "Equipment" page'() {
var filterSelector = 'div.filter-by-status';
return this.remote
.assertElementsExist('button.btn-filters', '"Filter Nodes" button is exists')
@ -318,7 +318,7 @@ registerSuite(function() {
return equipmentLib.checkSortingPageSwitching('Equipment', filterArray);
});
},
'Sorting and Filtering results saved after refreshing of page': function() {
'Sorting and Filtering results saved after refreshing of page'() {
return this.remote
.then(function() {
return command.refresh();
@ -327,7 +327,7 @@ registerSuite(function() {
return equipmentLib.checkSortingPageSwitching('Equipment', filterArray);
});
},
'Sorting and Filtering results saved after switching to other page': function() {
'Sorting and Filtering results saved after switching to other page'() {
return this.remote
.then(function() {
return equipmentLib.checkSortingPageSwitching('Environments', filterArray);
@ -343,7 +343,7 @@ registerSuite(function() {
})
.clickByCssSelector('button.btn-reset-filters');
},
'Node groups segmentation on "Equipment" page': function() {
'Node groups segmentation on "Equipment" page'() {
return this.remote
.then(function() {
return genericLib.gotoPage('Environments');
@ -365,7 +365,7 @@ registerSuite(function() {
return equipmentLib.checkNodesSegmentation('standard', inputArray, true);
});
},
'"Offline" node deletion from "Equipment" page': function() {
'"Offline" node deletion from "Equipment" page'() {
var offlineSelector = nodeSelector + '.offline';
return this.remote
.assertElementsExist(offlineSelector, '"Offline" node is observed')

View File

@ -40,7 +40,7 @@ registerSuite(function() {
return {
name: 'GUI support for Ironic',
setup: function() {
setup() {
// Create cluster with additional service "Ironic"
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
@ -58,11 +58,11 @@ registerSuite(function() {
return common.createCluster(
clusterName,
{
'Storage Backends': function() {
'Storage Backends'() {
return this.remote
.clickByCssSelector('input[value$="block:ceph"]');
},
'Additional Services': function() {
'Additional Services'() {
return this.remote
.clickByCssSelector('input[value$="ironic"]');
}
@ -70,7 +70,7 @@ registerSuite(function() {
);
});
},
'Check Ironic item on Settings tab': function() {
'Check Ironic item on Settings tab'() {
var ironicSelector = 'input[name=ironic]:enabled:checked';
return this.remote
// Check Ironic item on Settings tab
@ -89,7 +89,7 @@ registerSuite(function() {
return networksLib.checkNetworkInitialState(networkName);
});
},
'Baremetal Network "IP Ranges" correct changing': function() {
'Baremetal Network "IP Ranges" correct changing'() {
var correctIpRange = ['192.168.3.15', '192.168.3.100'];
return this.remote
// Change network settings
@ -100,7 +100,7 @@ registerSuite(function() {
return networksLib.saveSettings();
});
},
'Baremetal Network "IP Ranges" adding and deleting additional fields': function() {
'Baremetal Network "IP Ranges" adding and deleting additional fields'() {
var correctIpRange = ['192.168.3.1', '192.168.3.50'];
var newIpRange = ['192.168.3.55', '192.168.3.70'];
return this.remote
@ -122,7 +122,7 @@ registerSuite(function() {
return networksLib.saveSettings();
});
},
'Baremetal and other networks intersections': function() {
'Baremetal and other networks intersections'() {
this.timeout = 45000;
// [Baremetal CIDR, Baremetal Start IP, Baremetal End IP, Ironic Start IP,
// Ironic End IP, Ironic Gateway]
@ -143,7 +143,7 @@ registerSuite(function() {
return networksLib.checkBaremetalIntersection('public', publicValues);
});
},
'Baremetal Network "Use VLAN tagging" option works': function() {
'Baremetal Network "Use VLAN tagging" option works'() {
var chboxVlanSelector = baremetalSelector + 'div.vlan_start input[type="checkbox"]';
var vlanTag = '104';
return this.remote
@ -171,7 +171,7 @@ registerSuite(function() {
return networksLib.saveSettings();
});
},
'Baremetal Network "Use VLAN tagging" option validation': function() {
'Baremetal Network "Use VLAN tagging" option validation'() {
var btnSaveSelector = 'button.apply-btn';
var vlanTag = ['0', '10000', '4095', '', '1', '4094'];
var errorMessage = 'Invalid VLAN ID';
@ -207,7 +207,7 @@ registerSuite(function() {
return networksLib.checkNetworkInitialState(networkName);
});
},
'Baremetal Network "CIDR" field validation': function() {
'Baremetal Network "CIDR" field validation'() {
var cidrErrorSelector = baremetalSelector + 'div.cidr div.has-error span[class^="help"]';
var l3Selector = 'a[class$="neutron_l3"] ';
var cidrPart1 = '192.168.3.0/';
@ -256,7 +256,7 @@ registerSuite(function() {
return networksLib.checkNetworkInitialState(networkName);
});
},
'Baremetal Network "Use the whole CIDR" option works': function() {
'Baremetal Network "Use the whole CIDR" option works'() {
return this.remote
.then(function() {
return networksLib.checkCidrOption(networkName);
@ -265,7 +265,7 @@ registerSuite(function() {
return networksLib.saveSettings();
});
},
'Combinations ironic role with other roles validation': function() {
'Combinations ironic role with other roles validation'() {
var nodesAmount = 1;
var addNodeButtonSelector = '.btn-add-nodes';
var applyButtonSelector = 'button.btn-apply';
@ -321,7 +321,7 @@ registerSuite(function() {
return equipmentLib.uncheckNodeRoles();
});
},
'Disabling ironic service': function() {
'Disabling ironic service'() {
var addNodeButtonSelector = '.btn-add-nodes';
return this.remote
.then(function() {

View File

@ -30,7 +30,7 @@ registerSuite(function() {
return {
name: 'Neutron tunneling segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
networksLib = new NetworksLib(this.remote);
@ -44,7 +44,7 @@ registerSuite(function() {
return common.createCluster(
clusterName,
{
'Networking Setup': function() {
'Networking Setup'() {
return this.remote
.clickByCssSelector('input[value*="neutron"][value$=":vlan"]')
.clickByCssSelector('input[value*="neutron"][value$=":tun"]');
@ -62,7 +62,7 @@ registerSuite(function() {
return clusterPage.goToTab('Networks');
});
},
'The same VLAN for different node network groups': function() {
'The same VLAN for different node network groups'() {
return this.remote
.then(function() {
return networksLib.createNetworkGroup('Network_Group_1');
@ -86,7 +86,7 @@ registerSuite(function() {
return networksLib.checkVLANs('default', 'VLAN');
});
},
'Gateways appear for two or more node network groups': function() {
'Gateways appear for two or more node network groups'() {
return this.remote
.then(function() {
return networksLib.gotoNodeNetworkSubTab('Network_Group_2');
@ -147,7 +147,7 @@ registerSuite(function() {
return {
name: 'Neutron VLAN segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
command = new Command(this.remote);
modal = new ModalWindow(this.remote);
@ -173,7 +173,7 @@ registerSuite(function() {
return clusterPage.goToTab('Networks');
});
},
'Can not create node network group with the name of already existing group': function() {
'Can not create node network group with the name of already existing group'() {
var errorHelpSelector = 'div.has-error.node-group-name span.help-block';
return this.remote
.then(function() {
@ -199,7 +199,7 @@ registerSuite(function() {
return modal.close();
});
},
'Node network group deletion': function() {
'Node network group deletion'() {
return this.remote
.then(function() {
return networksLib.gotoNodeNetworkSubTab('default');
@ -213,7 +213,7 @@ registerSuite(function() {
return networksLib.deleteNetworkGroup('Network_Group_1');
});
},
'Default network group the first in a list': function() {
'Default network group the first in a list'() {
this.timeout = 60000;
return this.remote
.then(function() {
@ -247,7 +247,7 @@ registerSuite(function() {
return networksLib.checkDefaultNetGroup();
});
},
'Deletion of several node network groups one after another': function() {
'Deletion of several node network groups one after another'() {
this.timeout = 60000;
var explanationSelector = '.network-group-name .explanation';
return this.remote
@ -285,7 +285,7 @@ registerSuite(function() {
.assertElementNotContainsText(networkGroupsSelector, 'test',
'Deletion of several node network groups one after another is successfull');
},
'Can not create node network group without saving changes': function() {
'Can not create node network group without saving changes'() {
var errorTextSelector = 'div.text-error';
var ipRangeStart = '172.16.0.25';
return this.remote
@ -312,7 +312,7 @@ registerSuite(function() {
return networksLib.cancelChanges();
});
},
'Switching between node network groups without saved changes': function() {
'Switching between node network groups without saved changes'() {
var modalSelector = 'div.modal-dialog';
var group1Name = 'Network_Group_1';
var group2Name = 'Network_Group_2';
@ -361,7 +361,7 @@ registerSuite(function() {
return networksLib.cancelChanges();
});
},
'The same VLAN for different node network groups': function() {
'The same VLAN for different node network groups'() {
return this.remote
.then(function() {
return networksLib.gotoNodeNetworkSubTab('Network_Group_1');
@ -385,7 +385,7 @@ registerSuite(function() {
return networksLib.checkVLANs('default', 'TUN');
});
},
'Gateways appear for two or more node network groups': function() {
'Gateways appear for two or more node network groups'() {
return this.remote
.then(function() {
return networksLib.gotoNodeNetworkSubTab('Network_Group_2');
@ -420,7 +420,7 @@ registerSuite(function() {
.assertElementEnabled(gatewaySelector,
'Public "Gateway" field exists and enabled for "default" network group');
},
'Validation between default and non-default groups': function() {
'Validation between default and non-default groups'() {
var networkAlertSelector = 'div.network-alert';
var cidrValue = '192.168.12.0/24';
var ipRangeStart = '192.168.12.2';
@ -467,7 +467,7 @@ registerSuite(function() {
return networksLib.cancelChanges();
});
},
'Validation Floating IP range with non-default group with other CIDR': function() {
'Validation Floating IP range with non-default group with other CIDR'() {
var endIpSelector = ipRangesSelector + 'input[name*="range-end"] ';
var cidrArray = ['172.16.5.0/24', '172.16.6.0/24', '172.16.7.0/24'];
var ipRangeStart = ['172.16.5.2', '172.16.5.130'];
@ -506,7 +506,7 @@ registerSuite(function() {
return networksLib.saveSettings();
});
},
'Renaming of Default and non-default network groups': function() {
'Renaming of Default and non-default network groups'() {
var errorRenameSelector = '.has-error.node-group-renaming ';
return this.remote
// Can rename "default" node network group
@ -550,7 +550,7 @@ registerSuite(function() {
.assertElementTextEquals(nameSelector, 'Network_Group_3',
'New network group name "link" is shown');
},
'Correct bahaviour of long name for node network group': function() {
'Correct bahaviour of long name for node network group'() {
var oldName = 'Network_Group_3';
var newName = 'fgbhsjdkgbhsdjkbhsdjkbhfjkbhfbjhgjbhsfjgbhsfjgbhsg';
var activeSelector = networkGroupsSelector + ' li.active';
@ -580,7 +580,7 @@ registerSuite(function() {
.assertElementPropertyEquals(activeSelector, 'offsetWidth', '163',
'Renamed node network group has correct width');
},
'User can add and rename new node network group after deployment': function() {
'User can add and rename new node network group after deployment'() {
this.timeout = 60000;
var progressSelector = '.dashboard-block .progress';
var newName = 'Network_Group_2';

View File

@ -27,7 +27,7 @@ registerSuite(function() {
return {
name: 'Neutron VLAN segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
networksLib = new NetworksLib(this.remote);
@ -50,7 +50,7 @@ registerSuite(function() {
return clusterPage.goToTab('Networks');
});
},
'Storage Network "IP Ranges" testing': function() {
'Storage Network "IP Ranges" testing'() {
this.timeout = 45000;
var networkName = 'Storage';
var correctIpRange = ['192.168.1.5', '192.168.1.10'];
@ -63,7 +63,7 @@ registerSuite(function() {
return networksLib.checkNetrworkIpRanges(networkName, correctIpRange, newIpRange);
});
},
'Management Network "IP Ranges" testing': function() {
'Management Network "IP Ranges" testing'() {
this.timeout = 45000;
var networkName = 'Management';
var correctIpRange = ['192.168.0.55', '192.168.0.100'];
@ -76,7 +76,7 @@ registerSuite(function() {
return networksLib.checkNetrworkIpRanges(networkName, correctIpRange, newIpRange);
});
},
'Check intersections between all networks': function() {
'Check intersections between all networks'() {
this.timeout = 45000;
return this.remote
// Storage and Management
@ -116,7 +116,7 @@ registerSuite(function() {
return {
name: 'Neutron tunneling segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
networksLib = new NetworksLib(this.remote);
@ -130,7 +130,7 @@ registerSuite(function() {
return common.createCluster(
clusterName,
{
'Networking Setup': function() {
'Networking Setup'() {
return this.remote
.clickByCssSelector('input[value*="neutron"][value$=":vlan"]')
.clickByCssSelector('input[value*="neutron"][value$=":tun"]');
@ -148,7 +148,7 @@ registerSuite(function() {
return clusterPage.goToTab('Networks');
});
},
'Storage Network "IP Ranges" testing': function() {
'Storage Network "IP Ranges" testing'() {
this.timeout = 45000;
var networkName = 'Storage';
var correctIpRange = ['192.168.1.5', '192.168.1.10'];
@ -161,7 +161,7 @@ registerSuite(function() {
return networksLib.checkNetrworkIpRanges(networkName, correctIpRange, newIpRange);
});
},
'Management Network "IP Ranges" testing': function() {
'Management Network "IP Ranges" testing'() {
this.timeout = 45000;
var networkName = 'Management';
var correctIpRange = ['192.168.0.55', '192.168.0.100'];
@ -174,7 +174,7 @@ registerSuite(function() {
return networksLib.checkNetrworkIpRanges(networkName, correctIpRange, newIpRange);
});
},
'Private Network "IP Ranges" testing': function() {
'Private Network "IP Ranges" testing'() {
this.timeout = 45000;
var networkName = 'Private';
var correctIpRange = ['192.168.2.190', '192.168.2.200'];
@ -187,7 +187,7 @@ registerSuite(function() {
return networksLib.checkNetrworkIpRanges(networkName, correctIpRange, newIpRange);
});
},
'Check intersections between all networks': function() {
'Check intersections between all networks'() {
this.timeout = 60000;
return this.remote
// Storage and Management

View File

@ -27,7 +27,7 @@ registerSuite(function() {
return {
name: 'Neutron VLAN segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
networksLib = new NetworksLib(this.remote);
@ -50,7 +50,7 @@ registerSuite(function() {
return clusterPage.goToTab('Settings');
});
},
'Check no network settings on "Settings" tab': function() {
'Check no network settings on "Settings" tab'() {
return this.remote
.assertElementExists('div.settings-tab div.general', '"Settings" tab is not empty')
.assertElementNotExists('div.network-tab div.network-tab-content',
@ -59,7 +59,7 @@ registerSuite(function() {
.assertElementDisabled('button.btn-revert-changes', 'Cancel Changes button is disabled')
.assertElementDisabled('button.btn-apply-changes', 'Save Settings button is disabled');
},
'User returns to the selected segment on "Networks" tab': function() {
'User returns to the selected segment on "Networks" tab'() {
return this.remote
.then(function() {
return clusterPage.goToTab('Networks');
@ -89,7 +89,7 @@ registerSuite(function() {
.assertElementTextEquals('h3.networks', 'Neutron L2 Configuration',
'"Neutron L2" subtab is opened');
},
'Check "Node Network Groups" segment on "Networks" tab': function() {
'Check "Node Network Groups" segment on "Networks" tab'() {
return this.remote
.then(function() {
return networksLib.checkNetworkInitialState('Public');
@ -101,19 +101,19 @@ registerSuite(function() {
return networksLib.checkNetworkInitialState('Management');
});
},
'Check "Settings" segment on "Networks" tab': function() {
'Check "Settings" segment on "Networks" tab'() {
return this.remote
.then(function() {
return networksLib.checkNetrworkSettingsSegment('VLAN');
});
},
'Check "Network Verification" segment on "Networks" tab': function() {
'Check "Network Verification" segment on "Networks" tab'() {
return this.remote
.then(function() {
return networksLib.checkNetrworkVerificationSegment();
});
},
'Success network verification exists only on "Network Verification" segment': function() {
'Success network verification exists only on "Network Verification" segment'() {
return this.remote
.clickByCssSelector('.subtab-link-network_verification')
.assertElementEnabled('.verify-networks-btn', '"Verify Networks" is enabled')
@ -146,7 +146,7 @@ registerSuite(function() {
.assertElementContainsText('div.alert-success', 'Your network is configured correctly',
'True msg observed');
},
'Failed network verification presents on each subtab on "Networks" tab': function() {
'Failed network verification presents on each subtab on "Networks" tab'() {
var gatewayValue = '172.16.0.2';
return this.remote
.then(function() {
@ -205,7 +205,7 @@ registerSuite(function() {
return {
name: 'Neutron tunneling segmentation',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('Tunneling Cluster');
@ -219,7 +219,7 @@ registerSuite(function() {
return common.createCluster(
clusterName,
{
'Networking Setup': function() {
'Networking Setup'() {
return this.remote
.clickByCssSelector('input[value*="neutron"][value$=":vlan"]')
.clickByCssSelector('input[value*="neutron"][value$=":tun"]');
@ -231,7 +231,7 @@ registerSuite(function() {
return clusterPage.goToTab('Networks');
});
},
'Check "Node Network Groups" segment on "Networks" tab': function() {
'Check "Node Network Groups" segment on "Networks" tab'() {
return this.remote
.assertElementExists('a[class*="network"][class*="active"]', '"Networks" tab is opened')
.assertElementExists('div.network-tab div.network-tab-content',
@ -253,13 +253,13 @@ registerSuite(function() {
return networksLib.checkNetworkInitialState('Private');
});
},
'Check "Settings" segment on "Networks" tab': function() {
'Check "Settings" segment on "Networks" tab'() {
return this.remote
.then(function() {
return networksLib.checkNetrworkSettingsSegment('Tunnel');
});
},
'Check "Network Verification" segment on "Networks" tab': function() {
'Check "Network Verification" segment on "Networks" tab'() {
return this.remote
.then(function() {
return networksLib.checkNetrworkVerificationSegment();

View File

@ -28,7 +28,7 @@ function ClusterPage(remote) {
ClusterPage.prototype = {
constructor: ClusterPage,
goToTab: function(tabName) {
goToTab(tabName) {
return this.remote
.findByCssSelector('.cluster-page .tabs')
.clickLinkByText(tabName)
@ -41,7 +41,7 @@ ClusterPage.prototype = {
)
);
},
removeCluster: function(clusterName) {
removeCluster(clusterName) {
return this.remote
.clickLinkByText('Dashboard')
.clickByCssSelector('button.delete-environment-btn')
@ -60,12 +60,12 @@ ClusterPage.prototype = {
.waitForCssSelector('.clusters-page', 2000)
.waitForDeletedByCssSelector('.clusterbox', 20000);
},
searchForNode: function(nodeName) {
searchForNode(nodeName) {
return this.remote
.clickByCssSelector('button.btn-search')
.setInputValue('input[name=search]', nodeName);
},
checkNodeRoles: function(assignRoles) {
checkNodeRoles(assignRoles) {
return this.remote
.findAllByCssSelector('.role-panel .role-block .role')
.then(
@ -84,7 +84,7 @@ ClusterPage.prototype = {
)
);
},
checkNodes: function(amount, status) {
checkNodes(amount, status) {
status = status || 'discover';
return this.remote
.then(() => _.range(amount).reduce(
@ -98,7 +98,7 @@ ClusterPage.prototype = {
)
);
},
resetEnvironment: function(clusterName) {
resetEnvironment(clusterName) {
return this.remote
.clickByCssSelector('button.reset-environment-btn')
.then(() => this.modal.waitToOpen())
@ -116,13 +116,13 @@ ClusterPage.prototype = {
.then(() => this.modal.waitToClose())
.waitForElementDeletion('div.progress-bar', 20000);
},
isTabLocked: function(tabName) {
isTabLocked(tabName) {
return this.remote
.then(() => this.goToTab(tabName))
.waitForCssSelector('div.tab-content div.row.changes-locked', 2000)
.then(_.constant(true), _.constant(false));
},
deployEnvironment: function() {
deployEnvironment() {
return this.remote
.then(() => this.goToTab('Dashboard'))
.then(() => this.dashboardPage.startDeployment())

View File

@ -25,7 +25,7 @@ function ClustersPage(remote) {
ClustersPage.prototype = {
constructor: ClustersPage,
createCluster: function(clusterName, stepsMethods) {
createCluster(clusterName, stepsMethods) {
var stepMethod = (stepName) => _.bind(_.get(stepsMethods, stepName, _.noop), this);
return this.remote
.clickByCssSelector('.create-cluster')
@ -51,7 +51,7 @@ ClustersPage.prototype = {
.then(() => this.modal.waitToClose());
},
clusterSelector: '.clusterbox div.name',
goToEnvironment: function(clusterName) {
goToEnvironment(clusterName) {
return this.remote
.waitForCssSelector(this.clusterSelector, 5000)
.findAllByCssSelector(this.clusterSelector)

View File

@ -31,15 +31,15 @@ function CommonMethods(remote) {
CommonMethods.prototype = {
constructor: CommonMethods,
pickRandomName: function(prefix) {
pickRandomName(prefix) {
return _.uniqueId((prefix || 'Item') + ' #');
},
getOut: function() {
getOut() {
return this.remote
.then(() => this.welcomePage.skip())
.then(() => this.loginPage.logout());
},
getIn: function() {
getIn() {
return this.remote
.then(() => this.loginPage.logout())
.then(() => this.loginPage.login())
@ -48,13 +48,13 @@ CommonMethods.prototype = {
.waitForCssSelector('.navbar-nav', 1000)
.clickByCssSelector('.global-alert.alert-warning .close');
},
createCluster: function(clusterName, stepsMethods) {
createCluster(clusterName, stepsMethods) {
return this.remote
.clickLinkByText('Environments')
.waitForCssSelector('.clusters-page', 2000)
.then(() => this.clustersPage.createCluster(clusterName, stepsMethods));
},
removeCluster: function(clusterName, suppressErrors) {
removeCluster(clusterName, suppressErrors) {
return this.remote
.clickLinkByText('Environments')
.waitForCssSelector('.clusters-page', 2000)
@ -66,7 +66,7 @@ CommonMethods.prototype = {
}
});
},
doesClusterExist: function(clusterName) {
doesClusterExist(clusterName) {
return this.remote
.clickLinkByText('Environments')
.waitForCssSelector('.clusters-page', 2000)
@ -80,7 +80,7 @@ CommonMethods.prototype = {
)
);
},
addNodesToCluster: function(nodesAmount, nodesRoles, nodeStatus, nodeNameFilter) {
addNodesToCluster(nodesAmount, nodesRoles, nodeStatus, nodeNameFilter) {
return this.remote
.then(() => this.clusterPage.goToTab('Nodes'))
.waitForCssSelector('.btn-add-nodes', 3000)

View File

@ -25,7 +25,7 @@ function DashboardPage(remote) {
DashboardPage.prototype = {
constructor: DashboardPage,
startDeployment: function() {
startDeployment() {
return this.remote
.clickByCssSelector(this.deployButtonSelector)
.then(() => this.modal.waitToOpen())
@ -33,7 +33,7 @@ DashboardPage.prototype = {
.then(() => this.modal.clickFooterButton('Deploy'))
.then(() => this.modal.waitToClose());
},
stopDeployment: function() {
stopDeployment() {
return this.remote
.clickByCssSelector('button.stop-deployment-btn')
.then(() => this.modal.waitToOpen())
@ -41,11 +41,11 @@ DashboardPage.prototype = {
.then(() => this.modal.clickFooterButton('Stop'))
.then(() => this.modal.waitToClose());
},
startClusterRenaming: function() {
startClusterRenaming() {
return this.remote
.clickByCssSelector('.cluster-info-value.name .glyphicon-pencil');
},
setClusterName: function(name) {
setClusterName(name) {
return this.remote
.then(() => this.startClusterRenaming())
.findByCssSelector('.rename-block input[type=text]')
@ -56,7 +56,7 @@ DashboardPage.prototype = {
.end()
.waitForElementDeletion('.rename-block input[type=text]', 2000);
},
discardChanges: function() {
discardChanges() {
return this.remote
.clickByCssSelector('.btn-discard-changes')
.then(() => this.modal.waitToOpen())

View File

@ -22,7 +22,7 @@ function HealthcheckPage(remote) {
HealthcheckPage.prototype = {
constructor: HealthcheckPage,
createFakeServerForNotRunnedTests: function() {
createFakeServerForNotRunnedTests() {
return this.remote
.execute(() => {
window.server = sinon.fakeServer.create();
@ -129,7 +129,7 @@ HealthcheckPage.prototype = {
]);
});
},
createFakeServerForRunningTests: function() {
createFakeServerForRunningTests() {
return this.remote
// running tests
.execute(() => {
@ -331,7 +331,7 @@ HealthcheckPage.prototype = {
]);
});
},
createFakeServerForFinishedTests: function() {
createFakeServerForFinishedTests() {
return this.remote
// running tests
.execute(() => {
@ -537,7 +537,7 @@ HealthcheckPage.prototype = {
]);
});
},
restoreServer: function() {
restoreServer() {
return this.remote
.execute(() => {
window.server.restore();

View File

@ -23,7 +23,7 @@ function InterfacesPage(remote) {
InterfacesPage.prototype = {
constructor: InterfacesPage,
findInterfaceElement: function(ifcName) {
findInterfaceElement(ifcName) {
return this.remote
.findAllByCssSelector('div.ifc-inner-container')
.then(
@ -41,7 +41,7 @@ InterfacesPage.prototype = {
)
);
},
findInterfaceElementInBond: function(bondName, ifcName) {
findInterfaceElementInBond(bondName, ifcName) {
return this.remote
.findAllByCssSelector('.' + bondName + ' .ifc-info-block')
.then(
@ -57,7 +57,7 @@ InterfacesPage.prototype = {
)
);
},
removeInterfaceFromBond: function(bondName, ifcName) {
removeInterfaceFromBond(bondName, ifcName) {
return this.remote
.then(() => this.findInterfaceElementInBond(bondName, ifcName))
.then(
@ -66,7 +66,7 @@ InterfacesPage.prototype = {
.then((btnRemove) => btnRemove.click())
);
},
assignNetworkToInterface: function(networkName, ifcName) {
assignNetworkToInterface(networkName, ifcName) {
return this.remote
.findAllByCssSelector('div.network-block')
.then(
@ -83,7 +83,7 @@ InterfacesPage.prototype = {
.then(() => this.findInterfaceElement(ifcName))
.then((ifcElement) => this.remote.dragTo(ifcElement));
},
selectInterface: function(ifcName) {
selectInterface(ifcName) {
return this.remote
.then(() => this.findInterfaceElement(ifcName))
.then((ifcElement) => {
@ -93,13 +93,13 @@ InterfacesPage.prototype = {
.then((ifcCheckbox) => ifcCheckbox.click());
});
},
bondInterfaces: function(ifc1, ifc2) {
bondInterfaces(ifc1, ifc2) {
return this.remote
.then(() => this.selectInterface(ifc1))
.then(() => this.selectInterface(ifc2))
.clickByCssSelector('.btn-bond');
},
checkBondInterfaces: function(bondName, ifcsNames) {
checkBondInterfaces(bondName, ifcsNames) {
return this.remote
.then(() => this.findInterfaceElement(bondName))
.then(

View File

@ -22,7 +22,7 @@ function LoginPage(remote) {
LoginPage.prototype = {
constructor: LoginPage,
login: function(username, password) {
login(username, password) {
username = username || Helpers.username;
password = password || Helpers.password;
@ -39,7 +39,7 @@ LoginPage.prototype = {
.setInputValue('[name=password]', password)
.clickByCssSelector('.login-btn');
},
logout: function() {
logout() {
return this.remote
.getCurrentUrl()
.then((url) => {

View File

@ -24,7 +24,7 @@ function ModalWindow(remote) {
ModalWindow.prototype = {
constructor: ModalWindow,
modalSelector: '#modal-container > .modal',
waitToOpen: function() {
waitToOpen() {
return this.remote
.waitForCssSelector(this.modalSelector, 2000)
.then(
@ -35,17 +35,17 @@ ModalWindow.prototype = {
)
);
},
checkTitle: function(expectedTitle) {
checkTitle(expectedTitle) {
return this.remote
.assertElementContainsText(this.modalSelector + ' h4.modal-title', expectedTitle,
'Unexpected modal window title');
},
close: function() {
close() {
return this.remote
.clickByCssSelector(this.modalSelector + ' .modal-header button.close')
.then(() => this.waitToClose());
},
clickFooterButton: function(buttonText) {
clickFooterButton(buttonText) {
return this.remote
.findAllByCssSelector(this.modalSelector + ' .modal-footer button')
.then(
@ -68,7 +68,7 @@ ModalWindow.prototype = {
)
);
},
waitToClose: function() {
waitToClose() {
return this.remote
.waitForElementDeletion(this.modalSelector, 5000);
}

View File

@ -24,7 +24,7 @@ function NetworkPage(remote) {
NetworkPage.prototype = {
constructor: NetworkPage,
addNodeNetworkGroup: function(name) {
addNodeNetworkGroup(name) {
return this.remote
.clickByCssSelector('.add-nodegroup-btn')
.then(() => this.modal.waitToOpen())
@ -33,7 +33,7 @@ NetworkPage.prototype = {
.then(() => this.modal.waitToClose())
.waitForCssSelector('.network-group-name[data-name=' + name + ']', 2000);
},
renameNodeNetworkGroup: function(oldName, newName) {
renameNodeNetworkGroup(oldName, newName) {
return this.remote
.then(() => this.goToNodeNetworkGroup(oldName))
.clickByCssSelector('.glyphicon-pencil')
@ -46,14 +46,14 @@ NetworkPage.prototype = {
.end()
.waitForCssSelector('.network-group-name[data-name=' + newName + ']', 2000);
},
goToNodeNetworkGroup: function(name) {
goToNodeNetworkGroup(name) {
return this.remote
.findByCssSelector('ul.node_network_groups')
.clickLinkByText(name)
.end()
.waitForCssSelector('.network-group-name[data-name=' + name + ']', 2000);
},
removeNodeNetworkGroup: function(name) {
removeNodeNetworkGroup(name) {
return this.remote
.clickByCssSelector('.network-group-name[data-name=' + name + '] .glyphicon-remove')
.then(() => this.modal.waitToOpen())

View File

@ -24,7 +24,7 @@ function NodeComponent(remote) {
NodeComponent.prototype = {
constructor: NodeComponent,
openCompactNodeExtendedView: function() {
openCompactNodeExtendedView() {
return this.remote
.findByCssSelector('div.compact-node .node-hardware p:not(.btn)')
.then((element) => this.remote.moveMouseTo(element))
@ -36,7 +36,7 @@ NodeComponent.prototype = {
// the following timeout as we have 0.3s transition for the popover
.sleep(300);
},
openNodePopup: function(fromExtendedView) {
openNodePopup(fromExtendedView) {
var cssSelector = fromExtendedView ? '.node-popover' : '.node';
return this.remote
.findByCssSelector(cssSelector)
@ -44,7 +44,7 @@ NodeComponent.prototype = {
.end()
.then(() => this.modal.waitToOpen());
},
discardNode: function(fromExtendedView) {
discardNode(fromExtendedView) {
var cssSelector = fromExtendedView ? '.node-popover' : '.node';
return this.remote
.findByCssSelector(cssSelector)
@ -55,7 +55,7 @@ NodeComponent.prototype = {
.clickByCssSelector('div.modal-content button.btn-delete')
.then(() => this.modal.waitToClose());
},
renameNode: function(newName, fromExtendedView) {
renameNode(newName, fromExtendedView) {
var cssSelector = fromExtendedView ? '.node-popover' : '.node';
return this.remote
.findByCssSelector(cssSelector)

View File

@ -22,7 +22,7 @@ function SettingsPage(remote) {
SettingsPage.prototype = {
constructor: SettingsPage,
waitForRequestCompleted: function() {
waitForRequestCompleted() {
return this.remote
// Load Defaults button is locked during any request is in progress on the tab
// so this is a hacky way to track request state

View File

@ -22,7 +22,7 @@ function WelcomePage(remote) {
WelcomePage.prototype = {
constructor: WelcomePage,
skip: function(strictCheck) {
skip(strictCheck) {
return this.remote
.waitForCssSelector('.welcome-page', 3000)
.then(

View File

@ -21,7 +21,7 @@ var ScreenshotOnFailReporter = function() {
};
ScreenshotOnFailReporter.prototype = {
saveScreenshot: function(testOrSuite) {
saveScreenshot(testOrSuite) {
var remote = this.remotes[testOrSuite.sessionId];
if (remote) {
remote.takeScreenshot().then((buffer) => {
@ -36,14 +36,14 @@ ScreenshotOnFailReporter.prototype = {
});
}
},
sessionStart: function(remote) {
sessionStart(remote) {
var sessionId = remote._session._sessionId;
this.remotes[sessionId] = remote;
},
suiteError: function(suite) {
suiteError(suite) {
this.saveScreenshot(suite);
},
testFail: function(test) {
testFail(test) {
this.saveScreenshot(test);
}
};

View File

@ -29,7 +29,7 @@ registerSuite(() => {
return {
name: 'Dashboard tab',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clustersPage = new ClustersPage(this.remote);
@ -40,11 +40,11 @@ registerSuite(() => {
.then(() => common.getIn())
.then(() => common.createCluster(clusterName));
},
beforeEach: function() {
beforeEach() {
return this.remote
.then(() => clusterPage.goToTab('Dashboard'));
},
'Renaming cluster works': function() {
'Renaming cluster works'() {
var initialName = clusterName;
var newName = clusterName + '!!!';
var renameInputSelector = '.rename-block input[type=text]';
@ -85,7 +85,7 @@ registerSuite(() => {
.clickLinkByText('Environments')
.then(() => clustersPage.goToEnvironment(initialName));
},
'Provision VMs button availability': function() {
'Provision VMs button availability'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Virtual']))
.then(() => clusterPage.goToTab('Dashboard'))
@ -98,7 +98,7 @@ registerSuite(() => {
.clickByCssSelector('.actions-panel .dropdown .dropdown-menu li.deploy button')
.then(() => dashboardPage.discardChanges());
},
'Network validation error warning': function() {
'Network validation error warning'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller']))
.then(() => clusterPage.goToTab('Networks'))
@ -116,7 +116,7 @@ registerSuite(() => {
)
.then(() => dashboardPage.discardChanges());
},
'No controller warning': function() {
'No controller warning'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Compute']))
.then(() => clusterPage.goToTab('Dashboard'))
@ -132,7 +132,7 @@ registerSuite(() => {
)
.then(() => dashboardPage.discardChanges());
},
'Capacity table tests': function() {
'Capacity table tests'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller', 'Cinder']))
.then(() => common.addNodesToCluster(2, ['Compute']))
@ -142,7 +142,7 @@ registerSuite(() => {
.assertIsIntegerContentPositive('.capacity-items .ram .capacity-value', 'RAM')
.then(() => dashboardPage.discardChanges());
},
'Test statistics update': function() {
'Test statistics update'() {
this.timeout = 120000;
var controllerNodes = 3;
var storageCinderNodes = 1;

View File

@ -31,7 +31,7 @@ registerSuite(() => {
return {
name: 'Cluster deployment',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
dashboardPage = new DashboardPage(this.remote);
@ -42,17 +42,17 @@ registerSuite(() => {
.then(() => common.getIn())
.then(() => common.createCluster(clusterName));
},
beforeEach: function() {
beforeEach() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller']))
.then(() => clusterPage.goToTab('Dashboard'));
},
afterEach: function() {
afterEach() {
return this.remote
.then(() => clusterPage.resetEnvironment(clusterName))
.then(() => dashboardPage.discardChanges());
},
'Provision nodes': function() {
'Provision nodes'() {
this.timeout = 100000;
return this.remote
.clickByCssSelector('.actions-panel .dropdown button.dropdown-toggle')
@ -150,7 +150,7 @@ registerSuite(() => {
.assertElementsExist('.node.provisioned', 2, '2 of 3 nodes provisioned')
.then(() => clusterPage.goToTab('Dashboard'));
},
'Deploy nodes': function() {
'Deploy nodes'() {
this.timeout = 100000;
return this.remote
.clickByCssSelector('.actions-panel .dropdown button.dropdown-toggle')
@ -184,7 +184,7 @@ registerSuite(() => {
'There are no changes to deploy in the environment'
);
},
'Start/stop deployment': function() {
'Start/stop deployment'() {
this.timeout = 100000;
return this.remote
.then(() => dashboardPage.startDeployment())
@ -211,7 +211,7 @@ registerSuite(() => {
'Healthcheck link is not visible after stopped deploy'
);
},
'Test deployed cluster': function() {
'Test deployed cluster'() {
this.timeout = 100000;
var cidrCssSelector = '.storage input[name=cidr]';
var cidrDeployedValue;

View File

@ -29,7 +29,7 @@ registerSuite(() => {
return {
name: 'Healthcheck page',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clustersPage = new ClustersPage(this.remote);
@ -40,13 +40,13 @@ registerSuite(() => {
.then(() => common.createCluster(clusterName))
.then(() => common.addNodesToCluster(1, ['Controller']));
},
afterEach: function() {
afterEach() {
return this.remote
.then(() => healthCheckPage.restoreServer())
.clickLinkByText('Environments')
.then(() => clustersPage.goToEnvironment(clusterName));
},
'Health Check tests are rendered if response received': function() {
'Health Check tests are rendered if response received'() {
return this.remote
.then(() => healthCheckPage.createFakeServerForNotRunnedTests())
.then(() => clusterPage.goToTab('Health Check'))
@ -63,7 +63,7 @@ registerSuite(() => {
'Stop tests button is not shown in new OpenStack environment');
},
//@TODO (morale): imitate tests stop
'Check Healthcheck tab manipulations after deploy': function() {
'Check Healthcheck tab manipulations after deploy'() {
this.timeout = 100000;
return this.remote
.then(() => clusterPage.deployEnvironment())
@ -87,7 +87,7 @@ registerSuite(() => {
.assertElementEnabled('.run-tests-btn',
'"Run Tests" button is enabled if there are checked tests');
},
'Check running tests': function() {
'Check running tests'() {
return this.remote
.then(() => healthCheckPage.createFakeServerForRunningTests())
.then(() => clusterPage.goToTab('Health Check'))
@ -100,7 +100,7 @@ registerSuite(() => {
.assertElementsAppear('.healthcheck-status-skipped', 1000, 'Skipped status is reflected')
.assertElementsAppear('.healthcheck-status-stopped', 1000, 'Stopped status is reflected');
},
'Check finished tests': function() {
'Check finished tests'() {
return this.remote
.then(() => healthCheckPage.createFakeServerForFinishedTests())
.then(() => clusterPage.goToTab('Health Check'))

View File

@ -25,7 +25,7 @@ registerSuite(() => {
return {
name: 'Logs Tab',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('Test Cluster');
@ -36,7 +36,7 @@ registerSuite(() => {
.then(() => common.addNodesToCluster(1, ['Controller']))
.then(() => clusterPage.goToTab('Logs'));
},
'"Show" button availability and logs displaying': function() {
'"Show" button availability and logs displaying'() {
var showLogsButtonSelector = '.sticker button';
return this.remote
.assertElementsExist('.sticker select[name=source] > option',

View File

@ -29,7 +29,7 @@ registerSuite(() => {
var applyButtonSelector = '.apply-btn';
return {
name: 'Networks page Neutron tests',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
dashboardPage = new DashboardPage(this.remote);
@ -40,7 +40,7 @@ registerSuite(() => {
() => common.createCluster(
'Test Cluster #1',
{
'Networking Setup': function() {
'Networking Setup'() {
return this.remote
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:vlan]')
.clickByCssSelector('input[value=network\\:neutron\\:ml2\\:tun]');
@ -50,7 +50,7 @@ registerSuite(() => {
)
.then(() => clusterPage.goToTab('Networks'));
},
afterEach: function() {
afterEach() {
return this.remote
.findByCssSelector('.btn-revert-changes')
.then(
@ -61,7 +61,7 @@ registerSuite(() => {
)
.end();
},
'Network Tab is rendered correctly': function() {
'Network Tab is rendered correctly'() {
return this.remote
.assertElementsExist('.network-tab h3', 4, 'All networks are present')
.getCurrentUrl()
@ -84,7 +84,7 @@ registerSuite(() => {
.clickLinkByText('default')
.end();
},
'Testing cluster networks: Save button interactions': function() {
'Testing cluster networks: Save button interactions'() {
var cidrInitialValue;
var cidrElementSelector = '.storage input[name=cidr]';
return this.remote
@ -103,7 +103,7 @@ registerSuite(() => {
.assertElementAppears(applyButtonSelector + ':disabled', 200,
'Save changes button is disabled again if there are no changes');
},
'Testing cluster networks: network notation change': function() {
'Testing cluster networks: network notation change'() {
return this.remote
.then(() => networkPage.goToNodeNetworkGroup('default'))
.assertElementAppears('.storage', 2000, 'Storage network is shown')
@ -115,7 +115,7 @@ registerSuite(() => {
.assertElementNotExists('.storage .ip_ranges input[type=text]:disabled',
'Network notation was changed to "ip_ranges"');
},
'Testing cluster networks: save network changes': function() {
'Testing cluster networks: save network changes'() {
var cidrElementSelector = '.storage .cidr input[type=text]';
return this.remote
.setInputValue(cidrElementSelector, '192.168.1.0/26')
@ -125,7 +125,7 @@ registerSuite(() => {
.assertElementDisabled(applyButtonSelector,
'Save changes button is disabled again after successful settings saving');
},
'Testing cluster networks: verification': function() {
'Testing cluster networks: verification'() {
this.timeout = 100000;
return this.remote
.clickByCssSelector('.subtab-link-network_verification')
@ -162,7 +162,7 @@ registerSuite(() => {
.then(() => dashboardPage.discardChanges())
.then(() => clusterPage.goToTab('Networks'));
},
'Check VlanID field validation': function() {
'Check VlanID field validation'() {
return this.remote
.then(() => networkPage.goToNodeNetworkGroup('default'))
.assertElementAppears('.management', 2000, 'Management network appears')
@ -171,7 +171,7 @@ registerSuite(() => {
.assertElementExists('.management .has-error input[name=vlan_start]',
'Field validation has worked properly in case of empty value');
},
'Testing cluster networks: data validation on invalid settings': function() {
'Testing cluster networks: data validation on invalid settings'() {
return this.remote
.then(() => networkPage.goToNodeNetworkGroup('default'))
.setInputValue('.public input[name=cidr]', 'blablabla')
@ -192,7 +192,7 @@ registerSuite(() => {
.assertElementNotExists('.add-nodegroup-btn .glyphicon-danger-sign', 1000,
'Warning icon for Add Node Network Group disappears');
},
'Add ranges manipulations': function() {
'Add ranges manipulations'() {
var rangeSelector = '.public .ip_ranges ';
return this.remote
.clickByCssSelector(rangeSelector + '.ip-ranges-add')
@ -204,7 +204,7 @@ registerSuite(() => {
.assertElementNotExists(rangeSelector + '.ip-ranges-delete',
'Remove button is absent for only one range');
},
'Segmentation types differences': function() {
'Segmentation types differences'() {
return this.remote
.then(() => networkPage.goToNodeNetworkGroup('default'))
// Tunneling segmentation tests
@ -221,7 +221,7 @@ registerSuite(() => {
.assertElementTextEquals('.segmentation-type', '(Neutron with VLAN segmentation)',
'Segmentation type is correct for VLAN segmentation');
},
'Other settings validation error': function() {
'Other settings validation error'() {
return this.remote
.clickByCssSelector('.subtab-link-network_settings')
.setInputValue('input[name=dns_list]', 'blablabla')

View File

@ -27,7 +27,7 @@ registerSuite(() => {
return {
name: 'Cluster page',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('Test Cluster');
@ -37,7 +37,7 @@ registerSuite(() => {
.then(() => common.createCluster(clusterName))
.then(() => clusterPage.goToTab('Nodes'));
},
'Add Cluster Nodes': function() {
'Add Cluster Nodes'() {
return this.remote
.assertElementExists(
'.node-list .alert-warning',
@ -92,7 +92,7 @@ registerSuite(() => {
)
.assertElementExists('.nodes-group', 'One node group is present');
},
'Edit cluster node roles': function() {
'Edit cluster node roles'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Cinder']))
.assertElementsExist('.nodes-group', 2, 'Two node groups are present')
@ -122,7 +122,7 @@ registerSuite(() => {
'One node was removed from cluster after editing roles'
);
},
'Remove Cluster': function() {
'Remove Cluster'() {
return this.remote
.then(() => common.doesClusterExist(clusterName))
.then((result) => assert.ok(result, 'Cluster exists'))

View File

@ -31,7 +31,7 @@ registerSuite(() => {
return {
name: 'Settings tab',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
settingsPage = new SettingsPage(this.remote);
@ -45,7 +45,7 @@ registerSuite(() => {
// go to Storage subtab to use checkboxes for tests
.clickLinkByText('Storage');
},
'Settings tab is rendered correctly': function() {
'Settings tab is rendered correctly'() {
return this.remote
.getCurrentUrl()
.then((url) => {
@ -67,7 +67,7 @@ registerSuite(() => {
.assertElementDisabled('.btn-revert-changes', 'Cancel Changes button is disabled')
.assertElementDisabled('.btn-apply-changes', 'Save Settings button is disabled');
},
'Check Save Settings button': function() {
'Check Save Settings button'() {
return this.remote
// introduce change
.clickByCssSelector('input[type=checkbox]')
@ -78,7 +78,7 @@ registerSuite(() => {
.assertElementAppears('.btn-apply-changes:disabled', 200,
'Save Settings button is disabled if there are no changes');
},
'Check Cancel Changes button': function() {
'Check Cancel Changes button'() {
return this.remote
// introduce change
.clickByCssSelector('input[type=checkbox]')
@ -93,7 +93,7 @@ registerSuite(() => {
.assertElementDisabled('.btn-apply-changes',
'Save Settings button is disabled after changes were cancelled');
},
'Check changes saving': function() {
'Check changes saving'() {
return this.remote
.clickByCssSelector('input[type=checkbox]')
.waitForCssSelector('.btn-apply-changes:not(:disabled)', 200)
@ -102,7 +102,7 @@ registerSuite(() => {
.assertElementDisabled('.btn-revert-changes',
'Cancel Changes button is disabled after changes were saved successfully');
},
'Check loading of defaults': function() {
'Check loading of defaults'() {
return this.remote
.clickByCssSelector('.btn-load-defaults')
.then(() => settingsPage.waitForRequestCompleted())
@ -112,8 +112,7 @@ registerSuite(() => {
'Cancel Changes button is enabled after defaults were loaded')
.clickByCssSelector('.btn-revert-changes');
},
'The choice of subgroup is preserved when user navigates through the cluster tabs':
function() {
'The choice of subgroup is preserved when user navigates through the cluster tabs'() {
return this.remote
.clickLinkByText('Logging')
.then(() => clusterPage.goToTab('Dashboard'))
@ -121,7 +120,7 @@ registerSuite(() => {
.assertElementExists('.nav-pills li.active a.subtab-link-logging',
'The choice of subgroup is preserved when user navigates through the cluster tabs');
},
'The page reacts on invalid input': function() {
'The page reacts on invalid input'() {
return this.remote
.clickLinkByText('General')
// "nova" is forbidden username
@ -139,7 +138,7 @@ registerSuite(() => {
.assertElementNotExists('.settings-tab .nav-pills > li.active i.glyphicon-danger-sign',
'Subgroup menu has default layout after resetting changes');
},
'Test repositories custom control': function() {
'Test repositories custom control'() {
var repoAmount;
return this.remote
.clickLinkByText('General')

View File

@ -26,27 +26,27 @@ registerSuite(() => {
return {
name: 'Clusters page',
setup: function() {
setup() {
common = new Common(this.remote);
clusterName = common.pickRandomName('Test Cluster');
return this.remote
.then(() => common.getIn());
},
beforeEach: function() {
beforeEach() {
return this.remote
.then(() => common.createCluster(clusterName));
},
afterEach: function() {
afterEach() {
return this.remote
.then(() => common.removeCluster(clusterName));
},
'Create Cluster': function() {
'Create Cluster'() {
return this.remote
.then(() => common.doesClusterExist(clusterName))
.then((result) => assert.ok(result, 'Newly created cluster found in the list'));
},
'Attempt to create cluster with duplicate name': function() {
'Attempt to create cluster with duplicate name'() {
return this.remote
.clickLinkByText('Environments')
.waitForCssSelector('.clusters-page', 2000)
@ -69,7 +69,7 @@ registerSuite(() => {
)
);
},
'Testing cluster list page': function() {
'Testing cluster list page'() {
return this.remote
.clickLinkByText('Environments')
.assertElementAppears('.clusters-page .clusterbox', 2000, 'Cluster container exists')

View File

@ -26,7 +26,7 @@ registerSuite(() => {
return {
name: 'Equipment Page',
setup: function() {
setup() {
common = new Common(this.remote);
node = new NodeComponent(this.remote);
modal = new ModalWindow(this.remote);
@ -47,13 +47,13 @@ registerSuite(() => {
.clickLinkByText('Equipment')
.waitForCssSelector('.equipment-page', 5000);
},
'Equipment page is rendered correctly': function() {
'Equipment page is rendered correctly'() {
return this.remote
.assertElementsExist('.node', 8, 'All Fuel nodes are presented')
.assertElementNotExists('.control-buttons-box .btn', 'No management buttons presented')
.assertElementsExist('.nodes-group', 4, 'The page has default sorting by node status');
},
'Check action buttons': function() {
'Check action buttons'() {
return this.remote
.assertElementNotExists('.node .btn-discard', 'No discard changes button on a node')
.assertElementExists('.node.offline .node-remove-button',

View File

@ -23,20 +23,20 @@ registerSuite(() => {
var loginPage, common;
return {
name: 'Login page',
setup: function() {
setup() {
loginPage = new LoginPage(this.remote);
common = new Common(this.remote);
},
beforeEach: function() {
beforeEach() {
this.remote.then(() => common.getOut());
},
'Login with incorrect credentials': function() {
'Login with incorrect credentials'() {
return this.remote
.then(() => loginPage.login('login', '*****'))
.assertElementAppears('div.login-error', 1000,
'Error message is expected to get displayed');
},
'Login with proper credentials': function() {
'Login with proper credentials'() {
return this.remote
.then(() => loginPage.login())
.assertElementDisappears('.login-btn', 2000,

View File

@ -27,7 +27,7 @@ registerSuite(() => {
return {
name: 'Node Disk',
setup: function() {
setup() {
common = new Common(this.remote);
clusterName = common.pickRandomName('Test Cluster');
sdaDisk = '.disk-box[data-disk=sda]';
@ -54,13 +54,13 @@ registerSuite(() => {
)
.end();
},
'Testing nodes disks layout': function() {
'Testing nodes disks layout'() {
return this.remote
.assertElementDisabled(cancelButtonSelector, 'Cancel button is disabled')
.assertElementDisabled(applyButtonSelector, 'Apply button is disabled')
.assertElementEnabled(loadDefaultsButtonSelector, 'Load Defaults button is enabled');
},
'Check SDA disk layout': function() {
'Check SDA disk layout'() {
return this.remote
.clickByCssSelector(sdaDisk + ' .disk-visual [data-volume=os] .toggle')
.findByCssSelector(sdaDisk + ' .disk-utility-box [data-volume=os] input')
@ -83,7 +83,7 @@ registerSuite(() => {
' .disk-details [data-volume=os] .volume-group-notice.text-info',
'Notice about "Minimal size" is present');
},
'Testing Apply and Load Defaults buttons behaviour': function() {
'Testing Apply and Load Defaults buttons behaviour'() {
return this.remote
.setInputValue(sdaDisk + ' input[type=number][name=image]', '5')
.assertElementEnabled(cancelButtonSelector, 'Cancel button is enabled')
@ -98,7 +98,7 @@ registerSuite(() => {
.assertElementEnabled(applyButtonSelector, 'Apply button is enabled')
.clickByCssSelector(applyButtonSelector);
},
'Testing volume group deletion and Cancel button': function() {
'Testing volume group deletion and Cancel button'() {
return this.remote
.findByCssSelector(sdaDisk + ' .disk-visual [data-volume=image]')
// check that visualisation div for Image Storage present and has positive width
@ -142,7 +142,7 @@ registerSuite(() => {
initialImageSize, 'Image Storage volume control contains correct value')
.assertElementDisabled(applyButtonSelector, 'Apply button is disabled');
},
'Test volume size validation': function() {
'Test volume size validation'() {
return this.remote
// reduce Image Storage volume size to free space on the disk
.setInputValue(sdaDisk + ' input[type=number][name=image]', '5')

View File

@ -27,7 +27,7 @@ registerSuite(() => {
return {
name: 'Node Interfaces',
setup: function() {
setup() {
common = new Common(this.remote);
interfacesPage = new InterfacesPage(this.remote);
clusterName = common.pickRandomName('Test Cluster');
@ -46,16 +46,16 @@ registerSuite(() => {
)
);
},
afterEach: function() {
afterEach() {
return this.remote
.clickByCssSelector('.btn-defaults')
.waitForCssSelector('.btn-defaults:enabled', 2000);
},
teardown: function() {
teardown() {
return this.remote
.then(() => common.removeCluster(clusterName, true));
},
'Configure interface properties manipulations': function() {
'Configure interface properties manipulations'() {
return this.remote
.clickByCssSelector('.mtu .btn-link')
.assertElementExists(
@ -83,13 +83,13 @@ registerSuite(() => {
'MTU control is hidden after clicking MTU link again'
);
},
'Untagged networks error': function() {
'Untagged networks error'() {
return this.remote
.then(() => interfacesPage.assignNetworkToInterface('Public', 'eth0'))
.assertElementExists('div.ifc-error',
'Untagged networks can not be assigned to the same interface message should appear');
},
'Bond interfaces with different speeds': function() {
'Bond interfaces with different speeds'() {
return this.remote
.then(() => interfacesPage.selectInterface('eth2'))
.then(() => interfacesPage.selectInterface('eth3'))
@ -97,7 +97,7 @@ registerSuite(() => {
'Interfaces with different speeds bonding not recommended message should appear')
.assertElementEnabled('.btn-bond', 'Bonding button should still be enabled');
},
'Interfaces bonding': function() {
'Interfaces bonding'() {
return this.remote
.then(() => interfacesPage.bondInterfaces('eth1', 'eth2'))
.then(() => interfacesPage.checkBondInterfaces('bond0', ['eth1', 'eth2']))
@ -108,7 +108,7 @@ registerSuite(() => {
// Removing interface from the bond
.then(() => interfacesPage.checkBondInterfaces('bond0', ['eth1', 'eth5']));
},
'Interfaces unbonding': function() {
'Interfaces unbonding'() {
return this.remote
.then(() => interfacesPage.bondInterfaces('eth1', 'eth2'))
// Two interfaces bondin
@ -117,7 +117,7 @@ registerSuite(() => {
.then(() => interfacesPage.selectInterface('eth1'))
.then(() => interfacesPage.selectInterface('eth2'));
},
'Check that two bonds cannot be bonded': function() {
'Check that two bonds cannot be bonded'() {
return this.remote
.then(() => interfacesPage.bondInterfaces('eth0', 'eth2'))
.then(() => interfacesPage.bondInterfaces('eth1', 'eth5'))

View File

@ -29,7 +29,7 @@ registerSuite(() => {
return {
name: 'Node management panel on cluster nodes page: search, sorting, filtering',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
clusterName = common.pickRandomName('Test Cluster');
@ -39,7 +39,7 @@ registerSuite(() => {
.then(() => common.createCluster(clusterName))
.then(() => clusterPage.goToTab('Nodes'));
},
'Test management controls state in new environment': function() {
'Test management controls state in new environment'() {
return this.remote
.assertElementDisabled(searchButtonSelector,
'Search button is locked if there are no nodes in environment')
@ -51,20 +51,20 @@ registerSuite(() => {
'Applied sorters and filters are not shown for empty environment');
},
'Test management controls behaviour': {
setup: function() {
setup() {
dashboardPage = new DashboardPage(this.remote);
},
beforeEach: function() {
beforeEach() {
return this.remote
.then(() => common.addNodesToCluster(3, ['Controller']))
.then(() => common.addNodesToCluster(1, ['Compute'], 'error'));
},
afterEach: function() {
afterEach() {
return this.remote
.then(() => clusterPage.goToTab('Dashboard'))
.then(() => dashboardPage.discardChanges());
},
'Test search control': function() {
'Test search control'() {
var searchInputSelector = '.node-management-panel [name=search]';
return this.remote
.clickByCssSelector(searchButtonSelector)
@ -84,7 +84,7 @@ registerSuite(() => {
.assertElementExists(searchButtonSelector,
'Empty search control is closed when clicking outside the input');
},
'Test node list sorting': function() {
'Test node list sorting'() {
var activeSortersPanelSelector = '.active-sorters';
var moreControlSelector = '.sorters .more-control';
var firstNodeName;
@ -145,7 +145,7 @@ registerSuite(() => {
.findByCssSelector('.sorters')
.end();
},
'Test node list filtering': function() {
'Test node list filtering'() {
var activeFiltersPanelSelector = '.active-filters';
var moreControlSelector = '.filters .more-control';
return this.remote

View File

@ -28,7 +28,7 @@ registerSuite(() => {
return {
name: 'Node view tests',
setup: function() {
setup() {
common = new Common(this.remote);
node = new NodeComponent(this.remote);
modal = new ModalWindow(this.remote);
@ -40,7 +40,7 @@ registerSuite(() => {
.then(() => common.getIn())
.then(() => common.createCluster(clusterName));
},
'Standard node panel': function() {
'Standard node panel'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller']))
.assertElementExists('label.standard.active', 'Standard mode chosen by default')
@ -59,7 +59,7 @@ registerSuite(() => {
.then(() => node.discardNode())
.assertElementNotExists('.node', 'Node has been removed');
},
'Node pop-up': function() {
'Node pop-up'() {
var newHostname = 'node-123';
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller']))
@ -83,7 +83,7 @@ registerSuite(() => {
'Node hostname has been updated')
.then(() => modal.close());
},
'Compact node panel': function() {
'Compact node panel'() {
return this.remote
// switch to compact view mode
.clickByCssSelector('label.compact')
@ -97,7 +97,7 @@ registerSuite(() => {
.assertElementNotExists('.compact-node .role-list',
'Role list is not shown on node compact panel');
},
'Compact node extended view': function() {
'Compact node extended view'() {
var newName = 'Node new new name';
return this.remote
.then(() => node.openCompactNodeExtendedView())
@ -119,7 +119,7 @@ registerSuite(() => {
.then(() => node.discardNode(true))
.assertElementNotExists('.node', 'Node has been removed');
},
'Additional tests for Node Attributes': function() {
'Additional tests for Node Attributes'() {
return this.remote
.then(() => common.addNodesToCluster(1, ['Controller']))
.then(() => clusterPage.goToTab('Settings'))
@ -148,7 +148,7 @@ registerSuite(() => {
'Cancel changes button is disabled after changes were saved successfully')
.then(() => modal.close());
},
'Additional tests for unallocated node': function() {
'Additional tests for unallocated node'() {
return this.remote
.clickByCssSelector('.btn-add-nodes')
.waitForElementDeletion('.btn-add-nodes', 3000)

View File

@ -24,13 +24,13 @@ registerSuite(() => {
return {
name: 'Notifications',
setup: function() {
setup() {
common = new Common(this.remote);
modal = new ModalWindow(this.remote);
return this.remote.then(() => common.getIn());
},
'Notification Page': function() {
'Notification Page'() {
return this.remote
.assertElementDisplayed('.notifications-icon .badge',
'Badge notification indicator is shown in navigation')
@ -45,7 +45,7 @@ registerSuite(() => {
.assertElementNotDisplayed('.notifications-icon .badge',
'Badge notification indicator is hidden');
},
'Notification badge behaviour': function() {
'Notification badge behaviour'() {
var clusterName = common.pickRandomName('Test Cluster');
return this.remote
.then(() => common.createCluster(clusterName))

View File

@ -27,7 +27,7 @@ registerSuite(() => {
return {
name: 'Plugin UI tests',
setup: function() {
setup() {
common = new Common(this.remote);
clusterPage = new ClusterPage(this.remote);
settingsPage = new SettingsPage(this.remote);
@ -36,19 +36,19 @@ registerSuite(() => {
.then(() => common.getIn())
.then(() => common.createCluster(clusterName));
},
beforeEach: function() {
beforeEach() {
return this.remote
.then(() => clusterPage.goToTab('Settings'))
.clickByCssSelector('.subtab-link-other');
},
afterEach: function() {
afterEach() {
return this.remote
.clickByCssSelector('.btn-load-defaults')
.then(() => settingsPage.waitForRequestCompleted())
.clickByCssSelector('.btn-apply-changes')
.then(() => settingsPage.waitForRequestCompleted());
},
'Check plugin restrictions': function() {
'Check plugin restrictions'() {
var loggingSectionSelector = '.setting-section-logging ';
return this.remote
// activate Logging plugin
@ -68,7 +68,7 @@ registerSuite(() => {
// reset changes
.clickByCssSelector('.btn-revert-changes');
},
'Check plugin in not deployed environment': function() {
'Check plugin in not deployed environment'() {
var zabbixInitialVersion, zabbixTextInputValue;
return this.remote
.assertElementEnabled(zabbixSectionSelector + 'h3 input[type=checkbox]',
@ -116,7 +116,7 @@ registerSuite(() => {
)
);
},
'Check plugin in deployed environment': function() {
'Check plugin in deployed environment'() {
this.timeout = 100000;
var zabbixInitialVersion;
return this.remote

View File

@ -25,7 +25,7 @@ registerSuite(() => {
return {
name: 'Support Page',
setup: function() {
setup() {
common = new Common(this.remote);
modal = new ModalWindow(this.remote);
saveStatisticsSettingsButton = '.tracking .btn';
@ -35,7 +35,7 @@ registerSuite(() => {
.then(() => common.getIn())
.clickLinkByText('Support');
},
'Support page is rendered correctly': function() {
'Support page is rendered correctly'() {
return this.remote
.assertElementExists('.documentation-link', 'Fuel Documentation block is present')
.assertElementExists('.snapshot', 'Diagnostic Snapshot block is present')
@ -45,12 +45,12 @@ registerSuite(() => {
.assertElementDisabled(saveStatisticsSettingsButton,
'"Save changes" button is disabled until statistics checkbox uncheck');
},
'Diagnostic snapshot link generation': function() {
'Diagnostic snapshot link generation'() {
return this.remote
.clickByCssSelector('.snapshot .btn')
.assertElementAppears('.snapshot .ready', 5000, 'Diagnostic snapshot link is shown');
},
'Usage statistics option saving': function() {
'Usage statistics option saving'() {
return this.remote
// Uncheck "Send usage statistics" checkbox
.clickByCssSelector(sendStatisticsCheckbox)
@ -61,7 +61,7 @@ registerSuite(() => {
.assertElementDisabled(saveStatisticsSettingsButton,
'"Save changes" button is disabled after saving changes');
},
'Discard changes': function() {
'Discard changes'() {
return this.remote
// Check the "Send usage statistics" checkbox
.clickByCssSelector(sendStatisticsCheckbox)

View File

@ -25,11 +25,11 @@ registerSuite(() => {
return {
name: 'Welcome page',
setup: function() {
setup() {
loginPage = new LoginPage(this.remote);
welcomePage = new WelcomePage(this.remote);
},
'Skip welcome page': function() {
'Skip welcome page'() {
return this.remote
.then(() => loginPage.login())
.then(() => welcomePage.skip(true))

View File

@ -25,24 +25,24 @@ registerSuite(() => {
return {
name: 'Wizard Page',
setup: function() {
setup() {
common = new Common(this.remote);
modal = new Modal(this.remote);
return this.remote
.then(() => common.getIn());
},
beforeEach: function() {
beforeEach() {
var clusterName = common.pickRandomName('Temp');
return this.remote
.clickByCssSelector('.create-cluster')
.then(() => modal.waitToOpen())
.setInputValue('[name=name]', clusterName);
},
afterEach: function() {
afterEach() {
return this.remote
.then(() => modal.close());
},
'Test steps manipulations': function() {
'Test steps manipulations'() {
return this.remote
.assertElementExists('.wizard-step.active',
'There is only one active and available step at the beginning')
@ -62,7 +62,7 @@ registerSuite(() => {
.assertElementExists('.wizard-step.available',
'Only one step is available after changing hypervisor');
},
'Test Compute pane: next button is disabled by when no hypervisor selected': function() {
'Test Compute pane: next button is disabled by when no hypervisor selected'() {
return this.remote
.pressKeys('\uE007')
.clickByCssSelector('input[name=hypervisor\\:vmware]')