/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
-describe('my app', function() {
+describe('myApp', function() {
beforeEach(function() {
browser().navigateTo('/lang/en-dev/drzb2013.html?test=mock');
it('should render registration when user navigates to /registration', function() {
expect(element('[ng-view]').text()).
- toMatch(/Registration/);
+ toMatch(/Registra/);
});
it('has warning box', function() {
// expect(r.row(0)).toEqual({});
});
+ var registration_url;
+
+ it('accomp draft', function() {
+ input('user.registration_type').select('accomp');
+ input('user.firstname').enter('Test');
+ input('user.surname').enter('Registration');
+ input('user.city').enter('TEST');
+ input('user.email').enter('test.registration@example.com');
+
+ element('button#update-draft').click();
+ expect(element('[ng-view]').text()).toMatch(/draft/i);
+ expect(browser().location().url()).toMatch(/draft/);
+ element('#edit-registration').click();
+ expect(browser().location().url()).toMatch(/registration/);
+ registration_url = browser().location().url();
+ });
+
+ it('accomp finish registration', function() {
+ browser().navigateTo( '#' + registration_url.value );
+ expect(browser().location().url()).toBe(registration_url.value);
+ input('user.reception').select('no');
+ input('user.dinner').select('no');
+ element('#update-registration').click();
+ expect(browser().location().url()).toMatch(/confirmation/);
+ });
+
});