Project

General

Profile

Actions

Story #15334

closed

[Workbench2] Unit testing

Added by Eric Biagiotti over 5 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
2.0
Release relationship:
Auto

Description

Review https://dev.arvados.org/projects/arvados/wiki/Hacking_Workbench2 to get a better understanding of how WB2 is structured.

Reducers

Reducers are responsible for transitioning between states. These are straight forward to test. Start with an initial state, call the reducer with an action, and evaluate the resulting state.

Action creators and services

These are the components that invoke actions to change state and interact with outside resources (Axios, localstorage, etc). Need more research to figure out how to test these properly. Do we use the actual store, or mock it? Do we have to mock the entire service repository?

React UI Components

React components only rely on their connected props/state, which make them relatively easy to test using something like Enzyme. Consider snapshot testing for components that don't change often.

Resources: https://redux.js.org/recipes/writing-tests, https://willowtreeapps.com/ideas/best-practices-for-unit-testing-with-a-react-redux-approach


Related issues 2 (0 open2 closed)

Related to Arvados Epics - Story #15333: Workbench2 feature parity with WorkbenchClosed01/01/202012/31/2021

Actions
Blocks Arvados - Story #15581: [Workbench2] Improve error handling and reporting Resolved

Actions
Actions #1

Updated by Eric Biagiotti over 5 years ago

  • Related to Story #15333: Workbench2 feature parity with Workbench added
Actions #2

Updated by Eric Biagiotti over 5 years ago

  • Subject changed from Workbench 2 unit testing to [Workbench2] Unit testing
Actions #3

Updated by Tom Morris over 5 years ago

  • Target version set to To Be Groomed
Actions #4

Updated by Tom Morris over 5 years ago

  • Target version changed from To Be Groomed to Arvados Future Sprints
  • Story points set to 2.0
Actions #5

Updated by Tom Morris over 5 years ago

  • Blocks Story #15581: [Workbench2] Improve error handling and reporting added
Actions #6

Updated by Peter Amstutz almost 5 years ago

  • Target version deleted (Arvados Future Sprints)
  • Release set to 20
Actions #7

Updated by Peter Amstutz over 3 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF