oppia / oppia/oppia-web-developer-docs

Update doc for Sequential Dependency in Acceptance Tests

Open
#470 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
18
Forks
134
PR merge metrics
No merged PRs in 30d

Description

Acceptance tests have a high setup cost (for example, creating explorations, users, or other resources). To manage this, we’ve mostly standardized on a structure where one setup step is done at the start of the module, and then all subsequent it() blocks run sequentially in order.

This means:

  1. The first it() usually handles setup (e.g., creating an exploration).
  2. All following it() blocks depend on the state left by the previous ones.

Because of this dependency:

  1. While debugging a failure, first fix any diff-snapshots issues if they exist.
  2. Then, solve failures in the sequential order of the it() blocks, since later tests assume earlier ones have already passed.

For example :
In create-delete-and-update-status-of-voiceovers-of-the-explorations.spec.ts, the first it() block performs the initial setup and navigation. All subsequent it() blocks are sequentially dependent on it.
1. Some later tests start directly from uploading a file.
2. They do not repeat navigation steps, because the navigation was already performed in the earlier it().

Update the documentation to explain this and how to approach fixing them.

https://github.com/user-attachments/assets/36659ce5-62e4-4b52-a669-50bbdca62a67

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

Find the existing acceptance-test documentation and use create-delete-and-update-status-of-voiceovers-of-the-explorations.spec.ts as the example. Document the shared setup, sequential dependence between it() blocks, and the recommended debugging order, including diff-snapshot failures first; done when contributors can follow the guidance to diagnose these tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.