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

refactored test cases to use async and await #4918

Conversation

bemijonathan
Copy link
Contributor

@bemijonathan bemijonathan commented Jun 4, 2024

Fix cBioPortal/cbioportal# (see https://help.github.com/en/articles/closing-issues-using-keywords)

Describe changes proposed in this pull request:

  • move all sync tests to async in comparisonTab.spec.js

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 Jun 4, 2024

Deploy Preview for cbioportalfrontend ready!

Name Link
🔨 Latest commit b5b5490
🔍 Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/666a1e1dbd3e130008751798
😎 Deploy Preview https://deploy-preview-4918--cbioportalfrontend.netlify.app
📱 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.

'button[data-test="sampleGroupComparisonCreateGroupButton"]';
const PatientCreateGroupButton =
'button[data-test="patientGroupComparisonCreateGroupButton"]';
const getSampleCreateGroupButton = async function() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i don't think you need to wrap these in fuctions. enough to use getElementByTestHandle directly.

@bemijonathan bemijonathan force-pushed the feature/bemijonathan-improve-logical-remote-tests branch from b32cee7 to 7b26d63 Compare June 6, 2024 13:53
@bemijonathan bemijonathan force-pushed the feature/bemijonathan-improve-logical-remote-tests branch from 7b26d63 to fb00e3f Compare June 6, 2024 14:03
@bemijonathan bemijonathan requested a review from alisman June 6, 2024 14:12
@bemijonathan bemijonathan marked this pull request as ready for review June 6, 2024 14:12
@bemijonathan bemijonathan force-pushed the feature/bemijonathan-improve-logical-remote-tests branch from f73fe53 to cb88996 Compare June 6, 2024 14:20
});

it('select from sample venn diagram', function() {
it('select from sample venn diagram', async function() {
jsApiClick('rect[data-test="sample0VennRegion"]');
Copy link
Collaborator

Choose a reason for hiding this comment

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

jsApiClick will need to be awaited

(await getElement(SampleCreateGroupButton)).click();
await getElement('div.rc-tooltip-inner', { timeout: 20000 });
await browser.pause(200);
const el = await getElement(
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets try to convert these to getElementByTestHandle (whenever you see we are using data-test)

@alisman alisman merged commit 0e6fb09 into cBioPortal:master Jun 21, 2024
11 of 14 checks passed
bemijonathan added a commit to bemijonathan/cbioportal-frontend that referenced this pull request Jun 26, 2024
* refactor test cases to use async and await
bemijonathan added a commit to bemijonathan/cbioportal-frontend that referenced this pull request Jul 17, 2024
#1)

* Update Genome Nexus API model and reVUE reference to fit new model (cBioPortal#4919)

* Update Genome Nexus API model
* Update revue reference to fit new model

* Publish

 - cbioportal-frontend@3.3.280
 - cbioportal-clinical-timeline@0.3.82
 - cbioportal-frontend-commons@0.5.66
 - cbioportal-utils@0.3.41
 - genome-nexus-ts-api-client@1.1.32
 - oncokb-frontend-commons@0.0.25
 - react-mutation-mapper@0.8.109
 - react-variant-view@0.3.110

* move sync to async

* move all customTabs to async

* move all customTabs to async

* move all expressionComparison to async

* move all genomicEvolotion to async

* move all groupComparison to async

* move all groupComparison to async

* move all results.logic to async

* move all redirect to async

* move all quickSearch to async

* convert plots to async

* move all patient.spec.js to async

* move all oncoprinter.spec.js to async

* move async to async migration home.spec.js mutation-mapper-tool.spec.js mutationsTab.spec.js

* move sync to async migration  oncoprinterColorConfig.spec.js mutationTable.spec.js

* refactored test cases to use async and await (cBioPortal#4918)

* refactor test cases to use async and await

* fix newsletter link in banner

* fix newsletter link in sidebar

* Remove demo-rfc72 reference from local e2e test

* retest and refactor few changes

* last refactoring except comparisonTab

* tiny refactorings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants