e2e test scenario
[angular-drzb] / test / e2e / scenarios.js
index 1b63871..731d2a5 100644 (file)
@@ -5,7 +5,7 @@
 describe('my app', function() {
 
   beforeEach(function() {
-    browser().navigateTo('/lang/en/drzb2013.html');
+    browser().navigateTo('/lang/en-dev/drzb2013.html?test=mock');
   });
 
 
@@ -17,7 +17,7 @@ describe('my app', function() {
   describe('registration', function() {
 
     beforeEach(function() {
-      browser().navigateTo('#/registration');
+       browser().navigateTo('#/registration');
     });
 
 
@@ -26,6 +26,29 @@ describe('my app', function() {
         toMatch(/Registration/);
     });
 
+    it('has warning box', function() {
+      expect(element('p.well').text()).toBeTruthy();
+    });
+
+    it('invalid form', function() {
+      expect(binding('RegistrationForm.$valid')).toEqual('false');
+    });
+
+       it('save draft button', function() {
+               expect(input('user.registration_type').select('symposium')).toBeDefined;
+               expect(binding('RegistrationForm.$valid')).toEqual('false');
+               expect(element('input#save-draft')).toBeDefined;
+       });
+
+       it('symposium has 4 works by default', function() {
+               input('user.registration_type').select('symposium');
+               input('user.firstname').enter('name');
+//             expect(element(':input[ng-model="user.registration_type"]').val()).toBe('symposium');
+               var r = using('div#symposium-works').repeater('div.work');
+               expect(r.count()).toBe(4);
+//             expect(r.row(0)).toEqual({});
+       });
+
   });