summaryrefslogtreecommitdiff
path: root/cypress/support
diff options
context:
space:
mode:
Diffstat (limited to 'cypress/support')
-rw-r--r--cypress/support/commands.ts23
1 files changed, 15 insertions, 8 deletions
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
index 7535103..eadcd20 100644
--- a/cypress/support/commands.ts
+++ b/cypress/support/commands.ts
@@ -38,17 +38,20 @@
declare namespace Cypress {
interface Chainable<Subject> {
- createGroup(groupData: {
- eventGroupName: string;
- eventGroupDescription: string;
- eventGroupURL: string;
- hostName: string;
- creatorEmail: string;
- }): Chainable<Subject>;
+ createGroup(
+ groupData: {
+ eventGroupName: string;
+ eventGroupDescription: string;
+ eventGroupURL: string;
+ hostName: string;
+ creatorEmail: string;
+ },
+ isPublic: boolean,
+ ): Chainable<Subject>;
}
}
-Cypress.Commands.add("createGroup", (groupData) => {
+Cypress.Commands.add("createGroup", (groupData, isPublic) => {
cy.visit("/new");
cy.get("#showNewEventGroupFormButton").click();
@@ -59,6 +62,10 @@ Cypress.Commands.add("createGroup", (groupData) => {
cy.get("#eventGroupHostName").type(groupData.hostName);
cy.get("#eventGroupCreatorEmail").type(groupData.creatorEmail);
+ if (isPublic) {
+ cy.get("#publicGroupCheckbox").check();
+ }
+
// Submit the form
cy.get("#newEventGroupForm").submit();