run all e2e scenarios
[angular-drzb] / test / e2e / scenarios.js
index 61e79eb..806ca86 100644 (file)
@@ -52,6 +52,10 @@ describe('myApp', function() {
                expect(r.count()).toBe(4);
 //             expect(r.row(0)).toEqual({});
        });
+  
+  });
+
+  describe('registration_type accomp', function() {
 
        var registration_url;
 
@@ -68,7 +72,7 @@ describe('myApp', function() {
                element('#edit-registration').click();
                expect(browser().location().url()).toMatch(/registration/);
                registration_url = browser().location().url();
-               console.log('registration_url', registration_url);
+               //dump('registration_url', registration_url);
        });
 
        it('accomp finish registration', function() {
@@ -80,6 +84,14 @@ describe('myApp', function() {
                expect(browser().location().url()).toMatch(/confirmation/);
        });
 
+       it('accomp change to lecture', function() {
+               browser().navigateTo( '#' + registration_url.value );
+               expect(browser().location().url()).toBe(registration_url.value);
+               input('user.registration_type').select('lecture');
+               var work_persons = using('fieldset#has_work').repeater('div.persons');
+               expect(work_persons.count()).toBe(1);
+       });
+
   });
 
 
@@ -96,4 +108,18 @@ describe('myApp', function() {
     });
 
   });
+
+  describe('authors', function() {
+
+    beforeEach(function() {
+      browser().navigateTo('#/authors');
+    });
+
+
+    it('loading', function() {
+      expect(element('[ng-view] div:first').text()).
+        toMatch(/Loading/);
+    });
+
+  });
 });