36 lines
897 B
JavaScript
36 lines
897 B
JavaScript
describe('Survey', () => {
|
|
beforeEach(() => {
|
|
cy.exec("python ../server/manage.py prepare_surveys_for_cypress");
|
|
|
|
cy.viewport('macbook-15');
|
|
cy.startGraphQLCapture();
|
|
cy.login('rahel.cueni', 'test', true);
|
|
cy.get('body').contains('Neues Wissen erwerben');
|
|
});
|
|
|
|
it('should display and fill out the survey', () => {
|
|
cy.visit('/survey/U3VydmV5Tm9kZTox');
|
|
|
|
cy.get('.survey__panel-title').should('contain', 'Fall 1')
|
|
|
|
cy.get('#sq_100i').type('Wohlwollen');
|
|
cy.get('#sq_101i').type('Demut');
|
|
|
|
cy.get('[value="Speichern & Weiter"]').click();
|
|
//cy.get('.button--primary').click()
|
|
|
|
cy.get('#sq_102i').type('Keuschheit');
|
|
cy.get('#sq_103i').type('Geduld');
|
|
|
|
cy.get('[value=Abschliessen]').click();
|
|
|
|
cy.waitFor('UpdateAnswer');
|
|
|
|
cy.visit('/survey/U3VydmV5Tm9kZTox');
|
|
|
|
cy.get('#sq_100i').should('have.value', 'Wohlwollen')
|
|
|
|
});
|
|
|
|
});
|