diff --git a/cypress/e2e/contacts.cy.ts b/cypress/e2e/contacts.cy.ts
index 65e3259..ee18d57 100644
--- a/cypress/e2e/contacts.cy.ts
+++ b/cypress/e2e/contacts.cy.ts
@@ -33,4 +33,9 @@ describe("Contacts", () => {
.first()
.should("have.text", "camryn90@yahoo.com");
});
+
+ it("should open create contacts page", () => {
+ cy.get("[cy-test=openCreateContactForm-button]").click();
+ cy.location("pathname").should("eq", Page.CreateContact);
+ });
});
diff --git a/cypress/e2e/contacts/new.cy.ts b/cypress/e2e/contacts/new.cy.ts
new file mode 100644
index 0000000..a34517b
--- /dev/null
+++ b/cypress/e2e/contacts/new.cy.ts
@@ -0,0 +1,20 @@
+import { Page } from "../../support/pages";
+
+describe("Create contact", () => {
+ beforeEach(() => {
+ cy.visit(Page.CreateContact);
+ });
+
+ it("should create a contact", () => {
+ const email = "foo@example.com";
+
+ cy.get("[cy-test=createContact-form-field-email]").type(email);
+ cy.get("[cy-test=createContact-button]").click();
+
+ cy.location("pathname").should("eq", Page.Contacts);
+
+ cy.get("[cy-test=contacts-table-col-email]")
+ .first()
+ .should("have.text", email);
+ });
+});
diff --git a/src/app/contacts/ContactForm/AudienceContactForm.vue b/src/app/contacts/ContactForm/AudienceContactForm.vue
index c15204f..62f71ec 100644
--- a/src/app/contacts/ContactForm/AudienceContactForm.vue
+++ b/src/app/contacts/ContactForm/AudienceContactForm.vue
@@ -1,5 +1,5 @@