-
Notifications
You must be signed in to change notification settings - Fork 297
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
: Fix flaky playwright e2e tests involving automatic exercise assessments
#8740
Development
: Fix flaky playwright e2e tests involving automatic exercise assessments
#8740
Conversation
…ger than expected
… participations to reduce load and testing time
… load in team participation test
WalkthroughThe changes encompass enhancements to the exam participation and result summary features, including adding a Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range comments (6)
src/test/playwright/support/pageobjects/exercises/ExerciseResultPage.ts (1)
Line range hint
1-1
: Use type imports for Playwright types to optimize bundle size.- import { Page } from 'playwright'; + import type { Page } from 'playwright';src/test/playwright/support/commands.ts (1)
Line range hint
10-96
: Consider refactoring theCommands
class to use simple functions instead of a class with only static members to simplify the structure and potentially reduce overhead.Tools
Biome
[error] 10-96: Avoid classes that contain only static members. (lint/complexity/noStaticOnlyClass)
Prefer using simple functions instead of classes with only static members.
[error] 77-77: This type annotation is trivially inferred from its initialization. (lint/style/noInferrableTypes)
Safe fix: Remove the type annotation.
[error] 77-77: This type annotation is trivially inferred from its initialization. (lint/style/noInferrableTypes)
Safe fix: Remove the type annotation.
src/test/playwright/support/pageobjects/exam/ExamParticipationActions.ts (1)
Line range hint
1-1
: Use type imports for Playwright types to optimize bundle size.- import { Page, expect } from '@playwright/test'; + import type { Page, expect } from '@playwright/test';src/test/playwright/e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts (2)
Line range hint
69-69
: Avoid using non-null assertions.It's generally safer to handle potential null or undefined values explicitly rather than using non-null assertions. This can help prevent runtime errors if unexpected null or undefined values occur.
Also applies to: 70-70, 71-71, 78-78, 116-116, 122-122, 137-137, 138-138, 145-145, 146-146, 153-153, 154-154, 156-156, 172-172, 176-176
Line range hint
89-89
: Specify a more explicit type instead ofany
.Using
any
can lead to potential bugs and maintenance issues as it bypasses TypeScript's static type checking. If possible, define a more specific type or interface.src/test/playwright/support/fixtures.ts (1)
Line range hint
2-3
: Useimport type
for type-only imports.- import { LoginPage } from './pageobjects/LoginPage'; - import { UserCredentials } from './users'; + import type { LoginPage } from './pageobjects/LoginPage'; + import type { UserCredentials } from './users';This change ensures that these imports are used for types only and are erased during compilation, which can help optimize the bundle size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests seems to be failing on Playwright github action
Do you mean the Multi-Node build? Many tests consistently fail there, probably due to builds running too slowly. But we haven't decided on how to fix them yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm!
Tests are passing on CI,
However, when I try to run e2e/exam/ExamResults.spec.ts
, this test fails e2e\exam\ExamResults.spec.ts:126:21 › Exam Results › Check exam exercise results › Check exam results for programming exercise › Check exam programming exercise results
.
This may be OS dependant or due to my setup. I am using windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue previously mentioned is probably due to my setup.
Tests are passing on CI.
Current test failures on Bamboo build are solved by #8764 |
General
: Fix flaky e2e tests involving automatic exercise assessmentsDevelopment
: Fix flaky playwright e2e tests involving automatic exercise assessments
Checklist
General
Client
Motivation and Context
There are some flaky Playwright e2e tests that are failing due to automatic exercise assessment taking too long
Description
This PR fixes 3 different test suites as follows:
Steps for Testing
Steps for running the tests:
npm install && npm run playwright:setup
npx playwright test e2e/exercise/programming/ProgrammingExerciseParticipation.spec.ts -g "Instructor checks the participation"
npx playwright test e2e/exercise/quiz-exercise/QuizExerciseAssessment.spec.ts
npx playwright test e2e/exam/ExamResults.spec.ts
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Code Review
Manual Tests