diff --git a/__tests__/Stress Tests/stress-test b/__tests__/Stress Tests/stress-test new file mode 100644 index 0000000..f66750f --- /dev/null +++ b/__tests__/Stress Tests/stress-test @@ -0,0 +1,24 @@ +import http from 'k6/http'; +import { sleep } from 'k6'; + +export let options = { + stages: [ + { duration: '1m', target: 100 }, // ramp up to 100 users + { duration: '2m', target: 100 }, // stay at 100 users + { duration: '1m', target: 0 }, // ramp down + ], +}; + +export default function () { + http.get('https://team3docker.uksouth.cloudapp.azure.com/home'); + sleep(1); +} + +// install homebrew and k6 if not installed: +// /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +// echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile +// eval "$(/opt/homebrew/bin/brew shellenv)" +// brew install k6 + +// to run: k6 run "/Users/olabielas/Desktop/COMP0067_2025_Team3-1/__tests__/Stress Tests/stress-test" +// (or equivalent) diff --git a/package-lock.json b/package-lock.json index f70be3c..0240a74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "html2canvas": "^1.4.1", "jspdf": "^3.0.1", "jspdf-autotable": "^5.0.2", + "k6": "^0.0.0", "libphonenumber-js": "^1.12.6", "lodash": "^4.17.21", "next": "15.1.2", @@ -7254,6 +7255,12 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/k6": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/k6/-/k6-0.0.0.tgz", + "integrity": "sha512-GAQSWayS2+LjbH5bkRi+pMPYyP1JSp7o+4j58ANZ762N/RH/SdlAT3CHHztnn8s/xgg8kYNM24Gd2IPo9b5W+g==", + "license": "AGPL-3.0" + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", diff --git a/package.json b/package.json index cf6534f..d08fcfd 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "html2canvas": "^1.4.1", "jspdf": "^3.0.1", "jspdf-autotable": "^5.0.2", + "k6": "^0.0.0", "libphonenumber-js": "^1.12.6", "lodash": "^4.17.21", "next": "15.1.2", diff --git a/src/actions/email/sendInvite.ts b/src/actions/email/sendInvite.ts index 3c969a8..47f84af 100644 --- a/src/actions/email/sendInvite.ts +++ b/src/actions/email/sendInvite.ts @@ -36,7 +36,7 @@ export async function sendInviteEmail(name: string, email: string, patientId: st
Dear ${name},
Your patient ${patientName} would like to share their symptoms data with you on our platform.
Register your account to view their spidergrams and track their data.
-Here is a link to our website: https://team3.uksouth.cloudapp.azure.com
+Here is a link to our website: https://team3docker.uksouth.cloudapp.azure.com/register
Kind regards,
The Spider team
`, diff --git a/src/actions/email/sendReset.ts b/src/actions/email/sendReset.ts index a5d52d3..9ababfc 100644 --- a/src/actions/email/sendReset.ts +++ b/src/actions/email/sendReset.ts @@ -44,7 +44,7 @@ export async function sendPasswordReset(email: string) { return { success: false, error: 'Failed to update user in database.' }; } - const resetLink = `localhost:3000/reset-password/${token}`; + const resetLink = `https://team3docker.uksouth.cloudapp.azure.com//reset-password/${token}`; const msg = { to: email, diff --git a/src/app/(blank-layout-pages)/forgotpassword/page.tsx b/src/app/(blank-layout-pages)/forgot-password/page.tsx similarity index 100% rename from src/app/(blank-layout-pages)/forgotpassword/page.tsx rename to src/app/(blank-layout-pages)/forgot-password/page.tsx diff --git a/src/views/AddClinician.tsx b/src/views/AddClinician.tsx index 34447c2..e08597b 100644 --- a/src/views/AddClinician.tsx +++ b/src/views/AddClinician.tsx @@ -190,6 +190,7 @@ const ClinicianLinkPage = ({ id, cliniciansList }: Props) => { } } else { console.log("Please enter you clinician's email before sending the message.") + toast.error("Please enter you clinician's email before sending the message.") } } diff --git a/src/views/Login.tsx b/src/views/Login.tsx index 568f484..3aef526 100644 --- a/src/views/Login.tsx +++ b/src/views/Login.tsx @@ -154,7 +154,7 @@ const LoginV2 = ({ mode }: { mode: string }) => { className='text-end' color='primary.main' component={Link} - href='/forgotpassword' + href='/forgot-password' sx={{ textDecoration: 'underline' }} > {' '}