Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: Remove redundant e2e test #10046

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src/test/playwright/e2e/exam/test-exam/TestExamTestRun.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,6 @@ test.describe('Test exam test run', { tag: '@slow' }, () => {
});

test.describe('Manage a test run', () => {
test('Changes test run working time', async ({ login, courseManagementAPIRequests, examTestRun }) => {
const hour = 1;
const minutes = 20;
const seconds = 45;

await login(instructor);
const testRun = await courseManagementAPIRequests.createExamTestRun(exam, exerciseArray);
await examTestRun.openTestRunPage(course, exam);
await examTestRun.changeWorkingTime(testRun.id!);
await examTestRun.setWorkingTimeHours(hour);
await examTestRun.setWorkingTimeMinutes(minutes);
await examTestRun.setWorkingTimeSeconds(seconds);
const testRunResponse = await examTestRun.saveTestRun();
const updatedTestRun: StudentExam = await testRunResponse.json();

expect(testRunResponse.status()).toBe(200);
expect(updatedTestRun.id).toBe(testRun.id);
expect(updatedTestRun.workingTime).toBe(hour * 3600 + minutes * 60 + seconds);

await examTestRun.openTestRunPage(course, exam);
await examTestRun.getTestRun(testRun.id!).waitFor({ state: 'visible' });
await expect(examTestRun.getWorkingTime(testRun.id!).filter({ hasText: `${hour}h ${minutes}min ${seconds}s` })).toBeVisible();
await expect(examTestRun.getStarted(testRun.id!).filter({ hasText: 'No' })).toBeVisible();
await expect(examTestRun.getSubmitted(testRun.id!).filter({ hasText: 'No' })).toBeVisible();
});

test('Conducts a test run', async ({ login, courseManagementAPIRequests, examTestRun, examNavigation, examParticipation }) => {
await login(instructor);
const testRun = await courseManagementAPIRequests.createExamTestRun(exam, exerciseArray);
Expand Down
Loading