Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
student flow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdkeere committed May 23, 2024
1 parent 03646a9 commit 03ed499
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions frontend/src/tests/existing-user-pages.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { test, expect } from '@playwright/test';
import {Token} from "../utils/ApiInterfaces.ts";
import {join} from "lodash";

test('user flow: student', async ({ page }) => {
await page.goto('https://localhost:8080');
Expand Down Expand Up @@ -47,14 +46,14 @@ test('user flow: student', async ({ page }) => {
const leaveButton = page.getByRole('button').nth(2);
await expect(leaveButton).toBeVisible();
await leaveButton.click();
//const noGroup = page.getByText('You don\'t have a group yet');
//await expect(noGroup).toBeVisible();
await expect(groupMember).toBeHidden();
//selecteer groep
const joinButton = page.getByRole('row', { name: '2 2' }).getByRole('button');
await expect(joinButton).toBeVisible();
await joinButton.click();
//await expect(noGroup).toBeHidden();
await expect(groupMember).toBeVisible();
const otherMember = page.getByRole('cell', { name: 'Ruben', exact: true });
await expect(otherMember).toBeVisible();
await expect(joinButton).toBeHidden();
//ga naar courses
const coursesButton = page.getByRole('link').nth(2);
Expand All @@ -70,7 +69,7 @@ test('user flow: student', async ({ page }) => {
//ga naar settings en log uit
await settingsButton.click();
const logoutButton = page.locator('div').filter({ hasText: /^Logout:$/ }).getByRole('link')
await logoutButton.click(); // deze button zou wel iets eenvoudiger mogen zijn
await logoutButton.click();
await page.waitForLoadState('networkidle');
await expect(page).toHaveTitle(/Delphi/);
const loginButton = page.getByRole('link', { name: 'Log in' })
Expand Down

0 comments on commit 03ed499

Please sign in to comment.