split describe registration_type accomp
[angular-drzb] / test / e2e / scenarios.js
index 15036e6..4bd1abf 100644 (file)
@@ -5,7 +5,7 @@
 describe('myApp', function() {
 
   beforeEach(function() {
-    browser().navigateTo('/lang/en-dev/drzb2013.html?test=mock');
+    browser().navigateTo('/lang/hr-dev/drzb2013.html?test=mock');
   });
 
 
@@ -30,14 +30,18 @@ describe('myApp', function() {
       expect(element('p.well').text()).toBeTruthy();
     });
 
-    it('invalid form', function() {
-      expect(binding('RegistrationForm.$valid')).toEqual('false');
+    it('RegistrationForm.$valid', function() {
+      expect(binding('RegistrationForm.$valid')).toBe("false"); // FIXME toBeFalsy() doesn't work
     });
 
-       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('RegistrationForm.$error', function() {
+      expect(binding('RegistrationForm.$error')).toBeDefined();
+    });
+
+       xit('save draft button', function() {
+               input('user.registration_type').select('symposium').click();
+               expect(binding('user.registration_type')).toBe("symposium");
+               expect(element('input#save-draft')).toBeDefined();
        });
 
        it('symposium has 4 works by default', function() {
@@ -48,6 +52,10 @@ describe('myApp', function() {
                expect(r.count()).toBe(4);
 //             expect(r.row(0)).toEqual({});
        });
+  
+  });
+
+  describe('registration_type accomp', function() {
 
        var registration_url;
 
@@ -64,6 +72,7 @@ describe('myApp', function() {
                element('#edit-registration').click();
                expect(browser().location().url()).toMatch(/registration/);
                registration_url = browser().location().url();
+               //dump('registration_url', registration_url);
        });
 
        it('accomp finish registration', function() {