Skip to content

Commit

Permalink
Update dependencies (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
fkoulen authored Oct 12, 2023
2 parents 9283893 + 05ab6c7 commit b6752ec
Show file tree
Hide file tree
Showing 20 changed files with 10,695 additions and 3,474 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"config:recommended",
":dependencyDashboard"
],
"rebaseWhen": "behind-base-branch",
"baseBranches": ["dev"],
"packageRules": [
{
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-22.04
environment: staging
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
Expand All @@ -48,7 +48,7 @@ jobs:
id: deploy
- name: Comment Preview URL Preview URL
if: github.event_name == 'pull_request' && !failure()
uses: thollander/[email protected].0
uses: thollander/[email protected].2
with:
message: Preview can be found at ${{ steps.deploy.outputs.url }}
comment_tag: execution
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-22.04
environment: prod
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
name: Build & test project

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
workflow_dispatch:
Expand All @@ -22,6 +20,9 @@ env:
NEXT_PUBLIC_SUPABASE_URL: ${{secrets.HOSTED_SUPABASE_URL}}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{secrets.HOSTED_SUPABASE_ANON_KEY}}
NEXT_PUBLIC_ONESIGNAL_APP_ID: ${{secrets.NEXT_PUBLIC_ONESIGNAL_APP_ID}}
NEXT_PUBLIC_ONESIGNAL_REST_API_KEY: ${{secrets.NEXT_PUBLIC_ONESIGNAL_REST_API_KEY}}
NEXT_PUBLIC_DISABLE_ONESIGNAL: "true"
CYPRESS_ENV: ${{secrets.CYPRESS_ENV}}
CYPRESS_OLD_EMAIL: ${{secrets.CYPRESS_OLD_EMAIL}}
CYPRESS_OLD_PASSWORD: ${{secrets.CYPRESS_OLD_PASSWORD}}
CYPRESS_OLD_DISPLAY_NAME: ${{secrets.CYPRESS_OLD_DISPLAY_NAME}}
Expand All @@ -48,7 +49,7 @@ jobs:
environment: dev
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
with:
version: latest
Expand Down Expand Up @@ -96,7 +97,7 @@ jobs:
containers: [ 1, 2, 3, 4, 5 ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download the build files
uses: actions/download-artifact@v3
with:
Expand All @@ -117,4 +118,4 @@ jobs:
# message to the pull request title
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
35 changes: 24 additions & 11 deletions cypress/e2e/account/change-password.cy.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { testErrorHandlingChangePassword } from "../helpers/change-password.helper"

const displayName = "New"
const environment = Cypress.env("CYPRESS_ENV")
const newPassword = Cypress.env("CYPRESS_NEW_PASSWORD")
const displayNameTextfield = "set-name-textfield"
const passwordTextfield = "change-password-textfield"
const displayNameTextField = "set-name-text-field"
const passwordTextField = "change-password-text-field"
const termsConditionsOverlay = "terms-and-conditions"
const termsConditionsCheckbox = "terms-conditions-checkbox"
const termsId = "terms"
const termsConditionsLink = "terms-conditions-link"
const privacyPolicyLink = "privacy-policy-link"
const privacyPolicyOverlay = "privacy-policy"
const confirmPasswordTextfield = "change-password-confirm-textfield"
const confirmPasswordTextField = "change-password-confirm-text-field"
const submitPasswordBtn = "submit-password-btn"
const submitPasswordErr = "submit-password-err"
const shortPassword = "test"

describe("Change password", () => {
Expand All @@ -23,13 +25,24 @@ describe("Change password", () => {
cy.visit("/change-password")
})

it("should login when changing password", () => {
cy.data(displayNameTextfield).type(displayName)
cy.data(passwordTextfield).type(newPassword)
cy.data(confirmPasswordTextfield).type(newPassword)
it("should login or give error when changing password", () => {
cy.data(displayNameTextField).type(displayName)
cy.data(passwordTextField).type(newPassword)
cy.data(confirmPasswordTextField).type(newPassword)
cy.data(termsConditionsCheckbox).click()
cy.data(submitPasswordBtn).click()
cy.location("pathname").should("equal", "/")
// When running locally, the user is redirected to the home page
if (environment === "local") {
cy.location("pathname").should("equal", "/")
} else {
// When running in GitHub Actions, the user gets error 422
// since we cannot change the password to the same as the current one
cy.data(submitPasswordErr).should("exist")
cy.data(submitPasswordErr).should(
"contain.text",
"New password should be different from the old password",
)
}
})

it("should show terms and conditions when clicking on the link", () => {
Expand All @@ -44,9 +57,9 @@ describe("Change password", () => {

testErrorHandlingChangePassword(
submitPasswordBtn,
confirmPasswordTextfield,
passwordTextfield,
confirmPasswordTextField,
passwordTextField,
shortPassword,
termsId
termsId,
)
})
2 changes: 1 addition & 1 deletion cypress/e2e/account/sign-out.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Sign-out", () => {
})

it("Should show toast when signing out returns error", () => {
cy.intercept("POST", "/auth/v1/logout", (req) => {
cy.intercept("POST", "/auth/v1/logout*", (req) => {
req.reply({
statusCode: 500,
})
Expand Down
9 changes: 3 additions & 6 deletions cypress/e2e/events/[event].cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,24 +309,21 @@ describe("on the specific event page", () => {
})

it("btn should not be disabled when text is incorrect", () => {
cy.wait(500)
cy.data("delete-event-btn").click()
cy.data("delete-event-btn").click({ force: true })
cy.data("delete-event-continue-button").click()
cy.data("input-delete-event").type("Brainstormborrel")
cy.data("delete-event-final-button").should("not.be.disabled")
})

it("btn should be disabled when text is incorrect", () => {
cy.wait(500)
cy.data("delete-event-btn").click()
cy.data("delete-event-btn").click({ force: true })
cy.data("delete-event-continue-button").click()
cy.data("input-delete-event").type("Brainstormborre")
cy.data("delete-event-final-button").should("be.disabled")
})

it("should show toast when failing confirm when pressing on delete", () => {
cy.wait(500)
cy.data("delete-event-btn").click()
cy.data("delete-event-btn").click({ force: true })
cy.intercept("/rest/v1/event*", {
statusCode: 500,
body: { error: "error" },
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/events/new-event.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Create events page", () => {
beforeEach(() => {
cy.wait(500)
cy.data("input-event-date").click()
cy.get("#date-picker").find("input").eq(0).type("9999-05-01", { force: true })
cy.get(".react-datepicker__day--today").click()
cy.get("body").click()
cy.data("start-time-select").select("10:00")
cy.data("end-time-select").select("11:00")
Expand Down
27 changes: 20 additions & 7 deletions cypress/e2e/settings/change-password.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { interceptIndefinitely } from "../helpers/interception.helper"

describe("the change password page", () => {
const environment = Cypress.env("CYPRESS_ENV")
const buttonSubmitNewPassword = "button-submit-new-password"
const inputCurrentPassword = "input-current-password"
const inputNewPassword = "input-new-password"
Expand Down Expand Up @@ -96,13 +97,25 @@ describe("the change password page", () => {
it("should redirect & show toast if successful update", () => {
submitCorrectData()

cy.get(".Toastify")
.get("#1")
.should("be.visible")
.should("have.class", "Toastify__toast--success")
.get(".Toastify__toast-body")
.should("have.text", "Password successfully changed!")
cy.location("pathname").should("eq", "/settings")
// If running local, the password change will be successful
if (environment == "local") {
cy.get(".Toastify")
.get("#1")
.should("be.visible")
.should("have.class", "Toastify__toast--success")
.get(".Toastify__toast-body")
.should("have.text", "Password successfully changed!")
cy.location("pathname").should("eq", "/settings")
} else {
// If running in GitHub Actions, the password change will be unsuccessful
// since we cannot change the password to the same as the current one
cy.get(".Toastify")
.get("#1")
.should("be.visible")
.should("have.class", "Toastify__toast--error")
.get(".Toastify__toast-body")
.should("contain.text", "must be different")
}
})

it("should show toast if unsuccessful update", () => {
Expand Down
Loading

0 comments on commit b6752ec

Please sign in to comment.