Skip to content

Commit

Permalink
Update E2E perform-wizard test for #2039
Browse files Browse the repository at this point in the history
  • Loading branch information
NSkelsey authored and evilaliv3 committed Aug 17, 2017
1 parent cda0993 commit 9940b69
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
22 changes: 11 additions & 11 deletions client/app/js/controllers/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ GLClient.controller('WizardCtrl', ['$scope', '$location', '$route', '$http', 'Au

$scope.config_profiles = [
{
name: 'default',
title: 'Use default settings',
active: true,
active: true,
name: 'default',
title: 'Use default settings',
},
{
name: 'journos',
title: 'Investigative journalism',
name: 'journo',
title: 'Investigative journalism',
},
{
name: 'transparency',
title: 'NGO anticorruption reporting',
name: 'transparency',
title: 'NGO anticorruption reporting',
},
{
name: 'public',
title: 'Public administration compliant whistleblowing',
name: 'public',
title: 'Public administration compliant whistleblowing',
},
{
name: 'corporate',
title: 'Internal corporate fraud reporting',
name: 'corporate',
title: 'Internal corporate fraud reporting',
},
];

Expand Down
12 changes: 8 additions & 4 deletions client/tests/end2end/test-admin-perform-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ describe('globaLeaks setup wizard', function() {

element.all(by.id('ButtonNext')).get(1).click();

element(by.id('profile-1')).click();

element.all(by.id('ButtonNext')).get(2).click();

element(by.model('wizard.admin.mail_address')).sendKeys('globaleaks-admin@mailinator.com');
element(by.model('wizard.admin.password')).sendKeys(browser.gl.utils.vars['user_password']);
element(by.model('admin_check_password')).sendKeys(browser.gl.utils.vars['user_password']);

element.all(by.id('ButtonNext')).get(2).click();
element.all(by.id('ButtonNext')).get(3).click();

element(by.model('wizard.context.name')).sendKeys('Context 1');

element.all(by.id('ButtonNext')).get(3).click();
element.all(by.id('ButtonNext')).get(4).click();

element(by.model('wizard.receiver.name')).sendKeys('Recipient1');
element(by.model('wizard.receiver.mail_address')).sendKeys('globaleaks-receiver1@mailinator.com');

element.all(by.id('ButtonNext')).get(4).click();
element.all(by.id('ButtonNext')).get(5).click();

expect(element(by.css('.congratulations')).isPresent()).toBe(true);

element.all(by.id('ButtonNext')).get(5).click();
element.all(by.id('ButtonNext')).get(6).click();

browser.gl.utils.waitForUrl('/admin/home');
});
Expand Down

0 comments on commit 9940b69

Please sign in to comment.