split out test into smaller it parts
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Jan 2013 23:38:53 +0000 (00:38 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Jan 2013 23:38:53 +0000 (00:38 +0100)
test/e2e/scenarios.js

index 15036e6..61e79eb 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() {
@@ -64,6 +68,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);
        });
 
        it('accomp finish registration', function() {