diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..0404c10 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,27 @@ +name: Playwright Tests +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm install -g pnpm && pnpm install + - name: Install Playwright Browsers + run: pnpm exec playwright install --with-deps + - name: Run Playwright tests + run: pnpm exec playwright test + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.gitignore b/.gitignore index d1595af..9cda64e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ yarn-error.log* # vercel .vercel +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/apps/web/app/(root)/admin/group/[id]/page.tsx b/apps/web/app/(root)/admin/group/[id]/page.tsx index 8e1c35b..de5955f 100644 --- a/apps/web/app/(root)/admin/group/[id]/page.tsx +++ b/apps/web/app/(root)/admin/group/[id]/page.tsx @@ -1,6 +1,6 @@ import GroupBody from "@/components/admin/groupBody/organisms/group-body"; -export default function GroupPage(): JSX.Element { +export default function GroupPage(): JSX.Element { return (
{isNew ? "New group" : "Edit group"}
- {!isNew ? + {!isNew && allowElimination ? diff --git a/apps/web/components/admin/groupBody/molecules/group-header.tsx b/apps/web/components/admin/groupBody/molecules/group-header.tsx index a3e6d34..74fa105 100644 --- a/apps/web/components/admin/groupBody/molecules/group-header.tsx +++ b/apps/web/components/admin/groupBody/molecules/group-header.tsx @@ -18,7 +18,7 @@ interface GroupHeaderProps { export function GroupHeader({ groupData, onGroupsSettingsPress, - setUpdatedUsers + setUpdatedUsers, }: GroupHeaderProps): JSX.Element { const [creditsModalIsOpen, setCreditsModalIsOpen] = useState