vanvalenlab / kiosk-frontend

DeepCell web application built using NodeJS, Express, React, and Webpack.
Other
1 stars 0 forks source link

Parametrize whether to open job results in Label #178

Closed tddough98 closed 2 years ago

tddough98 commented 2 years ago

This adds data to each each job type on whether opening results in DeepCell Label is supported. It adds some internal state to track what job type was last submitted (so switching the selected type to mesmer after getting polaris results won't show the button), and adds a canOpenInLabel field to each jobData.

I'm working on adding tests for this addition by testing that a completed mesmer job shows the button while a completed polaris job does not, but it's taking some time to figure out how to mock the API responses to make the Predict component reach it's completed state. It seems like first /api/jobtypes is called, then /api/predict, then /api/redis. @MekWarrior do you know where I can look up the expected responses for the API? We can also wait on adding tests if it's too much of a challenge for now

elaubsch commented 2 years ago

I've tested the changes manually and it seems to work as expected, we can think about formalizing tests in the future