Skip to content

Commit

Permalink
Merge branch 'main' into luis/settings-two
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Jun 7, 2024
2 parents 39046c7 + 03a89e9 commit 50030e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
with:
wait-on: "http://localhost:5173/"
working-directory: automated-tests
browser: chrome

- name: Upload screenshots and videos from failed tests 📷
uses: actions/upload-artifact@v3
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/05-settings-profile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ describe("Settings Profile Tests", () => {
});
});

it("I7 - UsernameID should be displayed next to username", () => {
// Needs investigation on how to implement clipboard retrieve correctly in cypress
it.skip("I7 - UsernameID should be displayed next to username", () => {
// Go to friends and copy short ID
chatsMainPage.buttonFriends.click();
cy.location("href").should("include", "/friends");
Expand Down Expand Up @@ -103,7 +104,8 @@ describe("Settings Profile Tests", () => {
});
});

it("I8 - Clicking usernameID should copy it to clipboard", () => {
// Needs investigation on how to implement clipboard retrieve correctly in cypress
it.skip("I8 - Clicking usernameID should copy it to clipboard", () => {
// Go to friends and copy short ID
chatsMainPage.buttonFriends.click();
cy.location("href").should("include", "/friends");
Expand Down
12 changes: 12 additions & 0 deletions cypress/e2e/PageObjects/LoginPin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ class LoginPinPage {
}

public loginWithPin(pin: string) {
if (Cypress.browser.name === "chrome") {
cy.window().then((win) => {
win.sessionStorage.clear();
win.indexedDB.databases().then((r) => {
for (var i = 0; i < r.length; i++)
win.indexedDB.deleteDatabase(r[i].name);
});
});
}
cy.clearAllSessionStorage();
cy.clearAllCookies();
cy.clearAllLocalStorage();
this.launchApplication();
this.waitUntilPageIsLoaded();
this.enterPin(pin);
Expand Down

0 comments on commit 50030e5

Please sign in to comment.