-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add friend invitation and chat e2e tests
- Loading branch information
1 parent
c8578d7
commit 7b2a04f
Showing
4 changed files
with
76 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,18 +75,18 @@ describe("E2E tests", () => { | |
cy.get("#kc-login").should("exist").click(); | ||
}); | ||
|
||
cy.wait(2000); | ||
cy.wait(3000); | ||
|
||
cy.get('[data-testid="Edit"]').should("exist").click(); | ||
|
||
cy.wait(3000); | ||
cy.wait(5000); | ||
|
||
cy.get('input[name="first_name"]').clear().type("Johnny"); | ||
cy.get('input[name="last_name"]').clear().type("Blacksmith"); | ||
cy.get('input[name="mail"]').clear().type("[email protected]"); | ||
cy.get('[data-testid="Save"]').should("exist").click(); | ||
|
||
cy.wait(2000); | ||
cy.wait(4000); | ||
|
||
cy.get('[data-testid="My Profile"]').should("exist").click(); | ||
|
||
|
@@ -109,11 +109,11 @@ describe("E2E tests", () => { | |
cy.get("#kc-login").should("exist").click(); | ||
}); | ||
|
||
cy.wait(2000); | ||
cy.wait(3000); | ||
|
||
cy.get('[data-testid="Edit"]').should("exist").click(); | ||
|
||
cy.wait(3000); | ||
cy.wait(4000); | ||
|
||
cy.get('[data-testid="Change"]').should("exist").click(); | ||
|
||
|
@@ -152,6 +152,73 @@ describe("E2E tests", () => { | |
cy.wait(1000); | ||
|
||
cy.contains("p", "Robert Lewandowski").should("exist"); | ||
cy.get('[data-testid="Robert_Lewandowski_button"]').should("exist").click(); | ||
|
||
cy.wait(1000); | ||
}); | ||
|
||
it("Accept invite", () => { | ||
cy.visit("http://localhost:5173"); | ||
|
||
cy.get('[data-testid="WelcomeLogin"]').click(); | ||
|
||
cy.origin("http://localhost:3000", () => { | ||
cy.get("#username").type("[email protected]"); | ||
cy.get("#password").type("Euro2012"); | ||
cy.get("#kc-login").should("exist").click(); | ||
}); | ||
|
||
cy.wait(3000); | ||
|
||
cy.get('[data-testid="Friends"]').should("exist").click(); | ||
cy.wait(4000); | ||
|
||
cy.contains("button", "Accept").should("exist").click(); | ||
}); | ||
|
||
it("Send message", () => { | ||
cy.visit("http://localhost:5173"); | ||
|
||
cy.get('[data-testid="WelcomeLogin"]').click(); | ||
|
||
cy.origin("http://localhost:3000", () => { | ||
cy.get("#username").type("[email protected]"); | ||
cy.get("#password").type("password2"); | ||
cy.get("#kc-login").should("exist").click(); | ||
}); | ||
|
||
cy.wait(3000); | ||
|
||
cy.get('[data-testid="Friends"]').should("exist").click(); | ||
cy.wait(4000); | ||
|
||
cy.get('[data-testid="Robert_Lewandowski_chat"]').should("exist").click(); | ||
cy.get('[data-testid="ChatBox"]').should("exist").type("Hello!{enter}"); | ||
}); | ||
|
||
it("Receive message", () => { | ||
cy.visit("http://localhost:5173"); | ||
|
||
cy.get('[data-testid="WelcomeLogin"]').click(); | ||
|
||
cy.origin("http://localhost:3000", () => { | ||
cy.get("#username").type("[email protected]"); | ||
cy.get("#password").type("Euro2012"); | ||
cy.get("#kc-login").should("exist").click(); | ||
}); | ||
|
||
cy.wait(3000); | ||
|
||
cy.get('[data-testid="Friends"]').should("exist").click(); | ||
cy.wait(4000); | ||
|
||
cy.get('[data-testid="Johnny_Blacksmith_chat"]').should("exist").click(); | ||
cy.contains("div", "Hello!").should("exist"); | ||
|
||
cy.get('[data-testid="Friends"]').should("exist").click(); | ||
cy.wait(2000); | ||
|
||
cy.get('[data-testid="Johnny_Blacksmith_delete"]').should("exist").click(); | ||
}); | ||
|
||
it("Remove account", () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters