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

Fixed test case failure #5123

Closed
wants to merge 1 commit into from
Closed

Fixed test case failure #5123

wants to merge 1 commit into from

Conversation

MAT1018
Copy link

@MAT1018 MAT1018 commented Mar 8, 2025

Fix cBioPortal/cbioportal#11445

Fixes:
• Used async/await for proper test execution.
• Increased timeout using jest.setTimeout(10000).
• Refactored sinon.stub to dynamically resolve session IDs.
• Ensured correct session sequencing using await new Promise(resolve => setTimeout(resolve, 100));.
• Restored stub after test execution to prevent interference.

Result:
• All tests passed (yarn test confirms no failures).
• Session handling now correctly reflects sequence execution.

Screenshot 2025-03-09 at 12 51 35 AM

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

Any screenshots or GIFs?

If this is a new visual feature please add a before/after screenshot or gif
here with e.g. Giphy CAPTURE or Peek

Notify reviewers

Read our Pull request merging
policy
. It can help to figure out who worked on the
file before you. Please use git blame <filename> to determine that
and notify them either through slack or by assigning them as a reviewer on the PR

Copy link

netlify bot commented Mar 8, 2025

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit 2aaebc7
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/67cca47700a0300008657905
😎 Deploy Preview https://deploy-preview-5123.preview.cbioportal.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@MAT1018 MAT1018 changed the title Fixed issue 11445 Fixed test case failure Mar 8, 2025
@alisman
Copy link
Collaborator

alisman commented Mar 11, 2025

@MAT1018 thank you for this PR. unless I'm mistaken, the unit tests seemed to already be passing though. what prompted this change?

@MAT1018
Copy link
Author

MAT1018 commented Mar 11, 2025

@alisman I am sorry. I had run all the test cases upon setting up the repo and found 1 test case failing so raised issue and PR with screenshots but now they seem to pass. Must have been my mistake, thank you for enlightening me.

@MAT1018 MAT1018 closed this Mar 11, 2025
@MAT1018 MAT1018 deleted the Ftest branch March 11, 2025 21:06
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.

🚨 Fix Failing Test: handles new session before old session finished saving in URLWrapper.spec.ts
2 participants