OpenSlides/integration/cypress/integration/committee-detail-autoupdate.spec.js
Sean 85c0e50c21 Integration tests using cypress
Test client integration (client loads)
Test auth integration (client logs in)
Test backend integration (accept request)
  - broken
Test autoupdate integration (sends au to client)

Add manual cypress tests
Add dockered cypress tests

Add Readme
Add test execution to makefile
Add test execution to github-actions

TODO:
- Create user for tests
- flush db after every test
2021-09-16 17:16:51 +02:00

31 lines
785 B
JavaScript

describe("Get autoupdates for committees detail view", () => {
let committeeName;
let committeeId;
beforeEach(() => {
cy.login();
committeeName = `Cypress ${Date.now().toString()}`;
const committeeData = {
organization_id: 1,
name: committeeName,
manager_ids: [1],
};
cy.os4request("committee.create", committeeData).then((res) => {
committeeId = res.id;
});
});
it("Receives a name change", () => {
cy.visit(`/committees/${committeeId}`);
cy.contains(committeeName);
const updatedName = committeeName + "update";
const committeeData = {
id: committeeId,
name: updatedName,
};
cy.os4request("committee.update", committeeData).then(() => {
cy.contains(updatedName);
});
});
});