-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52c0602
commit 1a3ed2e
Showing
11 changed files
with
100 additions
and
110 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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
branches: [main, master] | ||
pull_request: | ||
branches: [ main, master ] | ||
branches: [main, master] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 | ||
- uses: actions/checkout@v4 | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: lts/* | ||
# - name: Install dependencies | ||
# run: npm ci | ||
# - name: Install Playwright Browsers | ||
# run: npx playwright install --with-deps | ||
# - name: Run Playwright tests | ||
# run: npx playwright test | ||
# - uses: actions/upload-artifact@v4 | ||
# if: always() | ||
# with: | ||
# name: playwright-report | ||
# path: playwright-report/ | ||
# retention-days: 30 |
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
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 |
---|---|---|
@@ -1,58 +1,58 @@ | ||
"use client"; | ||
// "use client"; | ||
|
||
import type { Session } from "next-auth"; | ||
import { api } from "~/trpc/react"; | ||
import { useState } from "react"; | ||
// import type { Session } from "next-auth"; | ||
// import { api } from "~/trpc/react"; | ||
// import { useState } from "react"; | ||
|
||
export default function OptIn({ session }: { session: Session }) { | ||
const { mutate: setOptInMutate } = api.survey.setOptIn.useMutation(); | ||
const [optIn, setOptIn] = useState(session.user.findExpertOptIn); | ||
const handleOptInToggle = () => { | ||
setOptInMutate({ | ||
userId: session.user.id, | ||
}); | ||
setOptIn(!optIn); | ||
}; | ||
// export default function OptIn({ session }: { session: Session }) { | ||
// const { mutate: setOptInMutate } = api.survey.setOptIn.useMutation(); | ||
// const [optIn, setOptIn] = useState(session.user.findExpertOptIn); | ||
// const handleOptInToggle = () => { | ||
// setOptInMutate({ | ||
// userId: session.user.id, | ||
// }); | ||
// setOptIn(!optIn); | ||
// }; | ||
|
||
return ( | ||
<div className="mt-8"> | ||
<h2 id="select-roles" className="mb-4 text-2xl font-bold"> | ||
Appear anonymous? | ||
</h2> | ||
If you appear anonymous, colleagues will not be able to find you based on | ||
your expertise. So if you want to be helpful, please select | ||
"no". Your answers will always be stored together with your | ||
account info. | ||
<ul className="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> | ||
<li | ||
className={`cursor-pointer rounded-lg border p-4`} | ||
onClick={() => handleOptInToggle()} | ||
> | ||
<input | ||
// return ( | ||
// <div className="mt-8"> | ||
// <h2 id="select-roles" className="mb-4 text-2xl font-bold"> | ||
// Appear anonymous? | ||
// </h2> | ||
// If you appear anonymous, colleagues will not be able to find you based on | ||
// your expertise. So if you want to be helpful, please select | ||
// "no". Your answers will always be stored together with your | ||
// account info. | ||
// <ul className="mt-4 grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> | ||
// <li | ||
// className={`cursor-pointer rounded-lg border p-4`} | ||
// onClick={() => handleOptInToggle()} | ||
// > | ||
// <input | ||
|
||
type="radio" | ||
className={`mr-2 cursor-pointer `} | ||
// type="radio" | ||
// className={`mr-2 cursor-pointer `} | ||
|
||
checked={!optIn} | ||
onChange={() => handleOptInToggle()} | ||
/> | ||
<label className={"cursor-pointer"}>Yes</label> | ||
</li> | ||
<li | ||
className={`cursor-pointer rounded-lg border p-4`} | ||
onClick={() => handleOptInToggle()} | ||
> | ||
<input | ||
// checked={!optIn} | ||
// onChange={() => handleOptInToggle()} | ||
// /> | ||
// <label className={"cursor-pointer"}>Yes</label> | ||
// </li> | ||
// <li | ||
// className={`cursor-pointer rounded-lg border p-4`} | ||
// onClick={() => handleOptInToggle()} | ||
// > | ||
// <input | ||
|
||
type="radio" | ||
className={`mr-2 cursor-pointer `} | ||
// type="radio" | ||
// className={`mr-2 cursor-pointer `} | ||
|
||
checked={optIn} | ||
onChange={() => handleOptInToggle()} | ||
/> | ||
<label className={"cursor-pointer"}>No</label> | ||
</li> | ||
</ul> | ||
</div> | ||
); | ||
} | ||
// checked={optIn} | ||
// onChange={() => handleOptInToggle()} | ||
// /> | ||
// <label className={"cursor-pointer"}>No</label> | ||
// </li> | ||
// </ul> | ||
// </div> | ||
// ); | ||
// } |
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
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