skillbox/client/cypress/integration/survey.spec.js

35 lines
837 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');
});
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')
});
});