Skip to content
Open
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ client/test/integration/sandbox/
npm-debug.log
client/www/scripts/modules/tracing/tracing.viz.module.js
client/www/scripts/vendor
empty-*.tgz
arc-manager.json
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules
client/test/integration/sandbox
*-xunit.xml
strong-arc-*.tgz
empty-*.tgz
arc-manager.json
2 changes: 2 additions & 0 deletions client/test/e2e/arc/login-logout.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ describe('arc-login-logout', function() {

loginView.openLoginView();

browser.sleep(500);

expect(loginView.userNameInput.getText()).toEqual('');

loginView.loginToLandingView();
Expand Down
13 changes: 13 additions & 0 deletions client/test/e2e/arc/views/header-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var ArcHeaderView = (function () {
this.accountDropdown = element(
by.css('span[data-id="ArcAccountDropdown"] a.dropdown-toggle'));
this.logoutLink = element(by.id('arc-user-logout-btn'));
this.homeLink = element(by.css('a[ui-sref="home"]'));

this.logout = function() {
browser.driver.wait(
Expand All @@ -18,6 +19,18 @@ var ArcHeaderView = (function () {
browser.driver.sleep(500);
browser.waitForAngular();
};

this.navigateToLandingPage = function () {
browser.driver.wait(
EC.presenceOf(this.homeLink),
10000);

this.homeLink.click();

browser.driver.wait(
EC.presenceOf(element(by.css('.sl-app-icon-composer'))),
10000);
};
}
return ArcHeaderView;
})();
Expand Down
47 changes: 47 additions & 0 deletions client/test/e2e/build-deploy/views/build-deploy-home-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,59 @@ var BuildDeployHomeView = (function () {

this.componentIdentifier = element(
by.css('section .sl-build-deploy'));
this.buildButton = element(
by.css('form[name="builduniversal"] .primary'));
this.deployButton = element(
by.css('form[name="deployuniversal"] .primary'));
this.buildSuccessMessage = element(
by.cssContainingText(
'form[name="builduniversal"]'+
'[message="build.universal.message"]', 'Success'
)
);
this.deploySuccessMessage = element(
by.cssContainingText(
'form[name="deployuniversal"]' +
' [message="deploy.universal.message"]', 'Success'
)
);

this.waitUntilLoaded = function() {
browser.driver.wait(
EC.presenceOf(self.componentIdentifier),
10000);
};

this.buildApp = function () {
var self = this;

browser.driver.wait(
EC.elementToBeClickable(self.buildButton),
10000);

self.buildButton.click();
self.buildButton.click();

browser.driver.wait(
EC.visibilityOf(self.buildSuccessMessage),
500000);
};

this.deployApp = function () {
var self = this;

browser.driver.wait(
EC.elementToBeClickable(self.deployButton),
10000);

self.deployButton.click();
self.deployButton.click();

browser.driver.wait(
EC.visibilityOf(self.deploySuccessMessage),
150000);
};

}
return BuildDeployHomeView;
})();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ describe('model-definition-interactions', function() {
expect(modelEditorView.getCurrentModelName()).toEqual('mynewmodel');

modelEditorView.addCommentToProperty(0, 'comment1\n');
browser.sleep(250);
browser.sleep(1000);
expect(modelEditorView.getFirstComment()).toEqual('comment1');

browser.sleep(500);

modelEditorView.addCommentToProperty(0, 'comment2\n');

browser.sleep(250);
browser.sleep(1000);

expect(modelEditorView.getFirstComment()).toEqual('comment2');

Expand Down Expand Up @@ -131,7 +131,7 @@ describe('model-definition-interactions', function() {
mainTreeNavView.openFirstModel();
expect(modelEditorView.getCurrentModelName()).toEqual('mynewmodel');

browser.sleep(750);
browser.sleep(1500);

expect(modelEditorView.getCheckedElements().count()).toEqual(3);
expect(modelEditorView.getFirstComment()).toEqual('comment2');
Expand Down
59 changes: 59 additions & 0 deletions client/test/e2e/process-manager/build-test-app.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
var ArcViews = require('../arc/views/');
var ProcessManagerViews = require('../process-manager/views/');
var BuildDeployViews = require('../build-deploy/views/');
var EC = protractor.ExpectedConditions;

describe('process-manager-and-build-deploy-interactions', function () {
beforeEach(function() {
var loginView = new ArcViews.LoginView();
var landingView = new ArcViews.LandingView();

loginView.loginToLandingView();
landingView.openProcessManagerView();
});

afterEach(function() {
var headerView = new ArcViews.HeaderView();

headerView.logout();
});

it('should login and navigate to process manager,' +
'should add a pm host and activate it (build)', function () {
var processManagerHostView =
new ProcessManagerViews.ProcessManagerHostView();
var buildDeployHomeView =
new BuildDeployViews.BuildDeployHomeView();
var headerView = new ArcViews.HeaderView();
var landingView = new ArcViews.LandingView();


browser.sleep(500);

processManagerHostView.addNewPMHost(
'ec2-52-8-216-111.us-west-1.compute.amazonaws.com', '8701'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a variable

);

headerView.navigateToLandingPage();

landingView.openBuildDeployView();

browser.sleep(500);

buildDeployHomeView.buildApp();

buildDeployHomeView.deployApp();

headerView.navigateToLandingPage();

landingView.openProcessManagerView();

expect(
EC.visibilityOf(
processManagerHostView.processManagerStatusActive
)
);

processManagerHostView.deleteProcessManagerHost();
},5000000);
});
1 change: 0 additions & 1 deletion client/test/e2e/process-manager/load-balancer.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var ArcViews = require('../arc/views/');
var ProcessManagerViews = require('../process-manager/views/');
var EC = protractor.ExpectedConditions;

describe('load-balancer-interactions', function () {
beforeEach(function() {
Expand Down
39 changes: 37 additions & 2 deletions client/test/e2e/process-manager/pm-host.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ describe('process-manager-host-interactions', function () {
headerView.logout();
});

it('should login and navigate to process manager,' +
xit('should login and navigate to process manager,' +
'add a valid pm host,', function () {
var processManagerHostView =
var processManagerHostView =
new ProcessManagerViews.ProcessManagerHostView();

browser.sleep(500);
Expand All @@ -36,4 +36,39 @@ describe('process-manager-host-interactions', function () {

processManagerHostView.deleteProcessManagerHost();
});

it('should login and navigate to process manager,' +
'should add a pm host and activate it (test)', function () {
var landingView = new ArcViews.LandingView();
var processManagerHostView =
new ProcessManagerViews.ProcessManagerHostView();
var processManagerHomeView =
new ProcessManagerViews.ProcessManagerHomeView();
var headerView = new ArcViews.HeaderView();

headerView.navigateToLandingPage();
browser.driver.wait(
EC.presenceOf(this.processManagerAppCommand),
10000);
landingView.openProcessManagerView();

browser.driver.wait(
EC.visibilityOf(processManagerHomeView.componentIdentifier),
10000);
processManagerHostView.addNewPMHost(
'ec2-52-8-216-111.us-west-1.compute.amazonaws.com', '8701'
);

processManagerHostView.checkForPMHostMessage();

expect(
EC.visibilityOf(
processManagerHostView.processManagerNoApplicationFoundMessage
)
);

processManagerHostView.deleteProcessManagerHost();


});
});
21 changes: 11 additions & 10 deletions client/test/e2e/process-manager/views/process-manager-home-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@ var ProcessManagerHomeView = (function () {
var EC = protractor.ExpectedConditions;

function ProcessManagerHomeView() {
this.loadBalancerButton = element(
var self = this;
self.loadBalancerButton = element(
by.css('button[ng-click="toggleManagerLoadBalancer()"]'));
this.loadBalancerForm = element(
self.loadBalancerForm = element(
by.css('div .load-balancer-content'));
this.componentIdentifier = element(
self.componentIdentifier = element(
by.css('.manager-pm-host-grid')
);

this.waitUntilLoaded = function() {
self.waitUntilLoaded = function() {
browser.driver.wait(
EC.presenceOf(this.componentIdentifier),
EC.presenceOf(self.componentIdentifier),
10000);
};

this.openLoadBalancerForm = function () {
var self = this;
this.loadBalancerButton.click();
self.openLoadBalancerForm = function () {
self.loadBalancerButton.click();

browser.driver.wait(
EC.visibilityOf(self.loadBalancerForm),
10000);

};

this.closeLoadBalancerForm = function () {
var self = this;
this.loadBalancerButton.click();

self.loadBalancerButton.click();

browser.driver.wait(
EC.invisibilityOf(self.loadBalancerForm),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ var ProcessManagerHostView = (function () {
by.css('button[ng-click="initAddNewPMHost()"]'));
this.processManagerActivateButton = element(
by.css('button[ng-click="savePM()"]'));
this.processManagerHostErrorIndicator = element(
this.processManagerHostMessageIndicator = element(
by.css('.sl-icon-question-mark'));
this.processManagerDeleteButton = element(
by.css('a[ng-click="deleteHost(host)"]'));
this.processManagerStatusActive =
element(by.css('div.status-field span.status.active'));
this.processManagerNoServerMessage = element(
by.cssContainingText('h4', 'No Server'));
this.processManagerNoApplicationFoundMessage = element(
by.cssContainingText('h4', 'No Application Found'));
this.processManagerErrorMessageCloseButton = element(
by.css('button[ng-click="showPopover = false"]'));

Expand All @@ -40,15 +44,15 @@ var ProcessManagerHostView = (function () {
this.processManagerActivateButton.click();
};

this.checkForPMHostErrors = function () {
this.checkForPMHostMessage = function () {
var self = this;

browser.driver.wait(
EC.elementToBeClickable(self.processManagerHostErrorIndicator),
EC.elementToBeClickable(self.processManagerHostMessageIndicator),
10000);

self.processManagerHostErrorIndicator.click();
self.processManagerHostErrorIndicator.click();
self.processManagerHostMessageIndicator.click();
self.processManagerHostMessageIndicator.click();
};

this.closeErrorDialog = function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ describe('tracing-interactions', function () {
});

it('should login and navigate to process manager,' +
'add a valid pm host,', function () {
var tracingHomeView =
'validate error notice', function () {
var tracingHomeView =
new TracingViews.TracingHomeView();
var processManagerHomeView =
var processManagerHomeView =
new ProcessManagerViews.ProcessManagerHomeView();


// TODO: there is no error notice to accept, should there be?
// tracingHomeView.acceptErrorNotice();

Expand Down
6 changes: 3 additions & 3 deletions client/test/e2e/tracing/views/tracing-home-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var TracingHomeView = (function () {

this.waitUntilLoaded = function() {
browser.driver.wait(
EC.presenceOf(this.componentIdentifier),
EC.visibilityOf(this.componentIdentifier),
10000);
};

Expand All @@ -19,8 +19,8 @@ var TracingHomeView = (function () {
browser.driver.wait(
EC.elementToBeClickable(
self.dismissErrorButton
)
);
),
10000);

self.dismissErrorButton.click();
};
Expand Down
Loading