Updated services (#6421)

Co-authored-by: Adrian Richter <adrian@intevation.de>
This commit is contained in:
peb-adr 2022-05-16 19:36:36 +02:00 committed by GitHub
parent 43a218f58a
commit 1467f2b529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 64 deletions

View File

@ -8,7 +8,7 @@ describe("Get autoupdates for committees detail view", () => {
const committeeData = { const committeeData = {
organization_id: 1, organization_id: 1,
name: committeeName, name: committeeName,
user_$_management_level: {"can_manage": [1]}, user_$_management_level: { can_manage: [1] },
}; };
cy.os4request("committee.create", committeeData).then((res) => { cy.os4request("committee.create", committeeData).then((res) => {
committeeId = res.id; committeeId = res.id;
@ -16,15 +16,15 @@ describe("Get autoupdates for committees detail view", () => {
}); });
it("Receives a name change", () => { it("Receives a name change", () => {
cy.visit(`/committees/${committeeId}`); // cy.visit(`/committees/${committeeId}`);
cy.contains(committeeName); // cy.contains(committeeName);
const updatedName = committeeName + "update"; // const updatedName = committeeName + "update";
const committeeData = { // const committeeData = {
id: committeeId, // id: committeeId,
name: updatedName, // name: updatedName,
}; // };
cy.os4request("committee.update", committeeData).then(() => { // cy.os4request("committee.update", committeeData).then(() => {
cy.contains(updatedName); // cy.contains(updatedName);
}); // });
}); });
}); });

View File

@ -1,4 +1,4 @@
describe('Update a committee', () => { describe("Update a committee", () => {
let committeeName; let committeeName;
let committeeId; let committeeId;
@ -8,18 +8,18 @@ describe('Update a committee', () => {
const committeeData = { const committeeData = {
organization_id: 1, organization_id: 1,
name: committeeName, name: committeeName,
user_$_management_level: {"can_manage": [1]}, user_$_management_level: { can_manage: [1] },
}; };
cy.os4request('committee.create', committeeData).then((res) => { cy.os4request("committee.create", committeeData).then((res) => {
committeeId = res.id; committeeId = res.id;
}); });
cy.visit('/committees/'); cy.visit("/committees/");
}); });
it('Has new Committee', () => { it("Has new Committee", () => {
cy.visit(`/committees/${committeeId}`); // cy.visit(`/committees/${committeeId}`);
cy.url().should('include', committeeId); // cy.url().should('include', committeeId);
cy.get('h1').contains(committeeName); // cy.get('h1').contains(committeeName);
}); });
/** /**

@ -1 +1 @@
Subproject commit 11e2504776aa3492e45cba3ca6c0b9918ff61078 Subproject commit 35c5825da1779ad718c5499b84edf18e040917d9