Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: share link and test #6385

Merged
merged 1 commit into from
Dec 22, 2023
Merged

fix: share link and test #6385

merged 1 commit into from
Dec 22, 2023

Conversation

tihuan
Copy link
Contributor

@tihuan tihuan commented Dec 20, 2023

Reason for Change

Changes

  1. Bug fix - share link using tissue name was broken. It's now fixed
  2. Added back test to test the bug above

Testing steps

  1. Go to https://localhost:3000/gene-expression?compare=disease&diseases=MONDO%3A0100096&ethnicities=unknown&publications=Ren+et+al.+Cell+2021&sexes=PATO%3A0000383%2CPATO%3A0000384&tissues=UBERON%3A0000178%2CUBERON%3A0002048&genes=DPM1%2CTNMD%2CTSPAN6&cellTypes=natural+killer+cell&ver=2
  2. Alternatively, in rdev (https://pr-6385-frontend.rdev.single-cell.czi.technology/gene-expression?compare=disease&diseases=MONDO%3A0100096&ethnicities=unknown&publications=Ren+et+al.+Cell+2021&sexes=PATO%3A0000383%2CPATO%3A0000384&tissues=UBERON%3A0000178%2CUBERON%3A0002048&genes=DPM1%2CTNMD%2CTSPAN6&cellTypes=natural+killer+cell&ver=2)
  3. You should see this app state. Note, there should be "blood" and "lung" under tissue filter (bug fix)
Screenshot 2023-12-20 at 12 34 57 PM

Checklist 🛎️

  • Add product, design, and eng as reviewers for rdev review
  • For UI changes, add screenshots/videos, so the reviewers know what you expect them to see
  • For UI changes, add e2e tests to prevent regressions

Notes for Reviewer

Copy link
Contributor

Deployment Summary

@@ -218,7 +218,11 @@ function getNewSelectedFilters({
Object.entries(tissues ?? {}).map(([id, tissue]) => [tissue.name, id])
);

const allTissueNames = Object.keys(tissueIdsByName);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allTissueNames = Object.keys(tissueIdsByName); was returning an empty array, since Object.keys() doesn't work with Map! TIL 💡

This fixes the bug where share link tissue with tissue name won't get populated in the app state

@@ -25,14 +25,11 @@ const tissueIds = TISSUES.map((tissue) => tissue.id);

const GENES = ["DPM1", "TNMD", "TSPAN6"];

const DATASETS = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've removed datasets as a filter option in the app

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (260b986) 91.99% compared to head (f653af4) 91.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6385   +/-   ##
=======================================
  Coverage   91.99%   91.99%           
=======================================
  Files         180      180           
  Lines       14803    14803           
=======================================
  Hits        13618    13618           
  Misses       1185     1185           
Flag Coverage Δ
unittests 91.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tihuan tihuan force-pushed the thuang-6131-enable-share-link-test branch from 6ce293e to f653af4 Compare December 21, 2023 16:04
@tihuan tihuan marked this pull request as ready for review December 22, 2023 16:08
@tihuan tihuan enabled auto-merge (squash) December 22, 2023 17:17
@tihuan tihuan merged commit 2f985e2 into main Dec 22, 2023
40 checks passed
@tihuan tihuan deleted the thuang-6131-enable-share-link-test branch December 22, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants