OpenSlides / OpenSlides/openslides-client

Improve ServerTimePresenter service test

Open Beginner friendly
#3,423 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tests
Dominant language
TypeScript
Stars
35
Forks
52
Avg merge
1d 9h
Merged PRs (30d)
52

Description

The spec of the ServerTimePresenter currently specifies a way to long timeout for its tests. This is somewhat annoying and should be changed.
The await calls within the test should not exceed 5 seconds. `jasmin.clock().tick(...) or the angular equivalent should be used.

https://github.com/OpenSlides/openslides-client/blob/main/client/src/app/gateways/server-time.service.spec.ts#L53

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with client/src/app/gateways/server-time.service.spec.ts at the linked section and inspect how the ServerTimePresenter awaits currently cause long timeouts. Replace the waiting approach with jasmine.clock().tick(...) or the Angular equivalent, keeping every await call within five seconds. Run the service spec and confirm it completes without long delays.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.