- <a class="btn" href="#/registration/{{registration.id}}">edit</a>
+ <a id="edit-registration" class="btn" href="#/registration/{{registration.id}}">edit</a>
{{registration.user.registration_type}}
{{registration._id | registration_date_time}}
- <a class="btn" href="#/{{registration.state}}/{{registration.id}}" title="{{registration.state}}" ng-show="registration.state"><tt>{{registration.id}}</tt></a>
+ <a id="registration-state" class="btn" href="#/{{registration.state}}/{{registration.id}}" title="{{registration.state}}" ng-show="registration.state"><tt>{{registration.id}}</tt></a>
{{registration.state}}
% if ( $lang =~ m/-dev/ ) {
<a class="btn" href="<%= $couchdb_view %>/{{registration._id}}" target="couchdb">couchdb</a>
/* 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');
// 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/);
+ });
+
});