kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Replace content app test fixtures

Open ralphiee22 opened this issue 7 years ago • 1 comments

Observed behavior

Right now in the content app, we load fixtures to use in our tests. These fixtures don't have meaningful names or attributes. Such as "title": "c2" or "title": "c1c2". Also we have relations that won't normally happen in an actual content database, such as a topic node having an audio node parent. This makes it difficult to add new tests or add/modify fixtures. It was suggested to create a channel on studio, in which we could dump the data into a fixtures file to use for our tests. In this way, we are testing a true content database schema, with meaningful names and relations.

Note: Since we currently test and have fixtures for each schema of an importable content database into kolibri, we would need to change the json fixtures for each of these schemas.

Expected behavior

Easy to add new tests and reason about tests in PRs.

DEV-facing consequences

Difficult to reason through tests, and find matching object fixtures, to the implemented tests.

ralphiee22 avatar Apr 11 '18 16:04 ralphiee22

Note: I have already done some updates to the content import fixtures (and will continue to do so) because they were not representative of data coming from a content database.

rtibbles avatar Apr 11 '18 21:04 rtibbles