Skip to content

Commit

Permalink
Merge branch 'master' into rfc83
Browse files Browse the repository at this point in the history
  • Loading branch information
forus authored Jul 17, 2024
2 parents a1461f4 + 5da378a commit 8a5ace0
Show file tree
Hide file tree
Showing 50 changed files with 1,229 additions and 680 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ e2e-localdb-workspace/
junit.xml
.nvim.lua
.luarc.json
.vs/
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Note: you can check the frontend version of the live instance by checking `windo
Make sure you have installed the node version and yarn version specified in
[package.json](https://github.com/cBioPortal/cbioportal-frontend/blob/master/package.json).

> **Tip:** We recommend that you use [nvm: Node Version Manager](https://github.com/nvm-sh/nvm) and [yvm: Yarn Version Manager](https://yvm.js.org/docs/overview) to switch between versions more easily.
> **Tip:** For node, we recommend that you use [nvm: Node Version Manager](https://github.com/nvm-sh/nvm) to switch between versions easily.
> **Tip:** For yarn, you can use [yarn set version](https://yarnpkg.com/cli/set/version) or `npm install yarn@(version)`.
> **Windows Tip:** If you are developing on Windows, we recommend that you use [Ubuntu / Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
Expand Down Expand Up @@ -52,6 +54,8 @@ export BRANCH_ENV=master # or rc if branching from rc
yarn run start
```

> **Tip:** BRANCH_ENV should be set to `master` or `rc`, and not to your local branch name. You can set this in your ~/.bashrc if you don't intend to change it often.
Example pages:
- http://localhost:3000/
- http://localhost:3000/patient?studyId=lgg_ucsf_2014&caseId=P04
Expand All @@ -71,8 +75,6 @@ GREP=example.spec.js yarn run testModules
```

> **Windows Tip:** There is a known solved hiccup running the tests on Ubuntu via Windows Subsystem for Linux (WSL): [#7096](https://github.com/cBioPortal/cbioportal/issues/7096)
To run unit/integration tests in watch mode
```
yarn run test:watch
Expand Down Expand Up @@ -139,6 +141,12 @@ or clear entire local storage
```
localStorage.clear()
```
You can also add a bookmarklet to quickly switch to your local frontend server. Set the URL to the following:

```
javascript:(function()%7BlocalStorage.setItem%28%60localdev%60,true%29%3Bwindow.location.reload()%3B %7D)()
```

You can also use a netlify deployed cbioportal-frontend pull request for serving the JS:
1. Create the following bookmarklet:
```
Expand All @@ -147,6 +155,8 @@ javascript:(function()%7Bvar pr %3D prompt("Please enter PR%23")%3Bif (pr %26%26
2. Navigate to the cBioPortal installation that you want to test.
3. Click the bookmarklet and enter your pull request number.



## Run e2e-tests

End-to-end tests can be run against public cbioportal instances or against a local dockerized backend. These two e2e-tests types are referred to as `remote` and `local` types of e2e-tests.
Expand All @@ -161,6 +171,7 @@ cd end-to-end-test
// install deps
yarn --ignore-engines
cd ..
```

```
Expand Down Expand Up @@ -349,3 +360,16 @@ Please make sure to not introduce any dependencies from `cbioportal-frontend` wo
### react-mutation-mapper

[react-mutation-mapper](https://www.npmjs.com/package/react-mutation-mapper/) is a separate public npm library that contains the Mutation Mapper and related components.

## WSL Tips

When running on a Windows environment, use [WSL: Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10). You will be able to run a linux shell, which is necessary for many of the scripts used. You will also be able to use it concurrently with Windows applications.

Make sure the git repo is cloned under the WSL file system (under your home directory). If you instead clone it to the Windows file system (e.g. `/mnt/c/...` from WSL), then all scripts will be extremely slow.

If you may be working with the git repo via the Windows system, then make sure your line returns are set to `lf` as opposed to the Windows default `crlf`.

```
# from the repo folder
git config core.autocrlf false
```
3 changes: 0 additions & 3 deletions end-to-end-test/local/docker_compose/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ mkdir -p $E2E_WORKSPACE/keycloak
cd $E2E_WORKSPACE
git clone https://github.com/cBioPortal/cbioportal-docker-compose.git
cd cbioportal-docker-compose
#TODO: temporarily use docker compose for demo-rfc72
# https://github.com/cBioPortal/cbioportal-docker-compose/pull/23
git checkout demo-rfc72

# update keycloak config with permissions for test studies
config_json="$(cat $TEST_HOME/docker_compose/keycloak/keycloak-config.json)"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 0 additions & 43 deletions end-to-end-test/remote/specs/core/comparisonTab.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,49 +367,6 @@ describe('results view comparison tab screenshot tests', function() {
);
assertScreenShotMatch(res);
});

it('results view comparison tab microbiome signature tab several groups', function() {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/comparison?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=blca_tcga_pan_can_atlas_2018&case_set_id=blca_tcga_pan_can_atlas_2018_cnaseq&comparison_selectedGroups=%5B"CDKN2A"%2C"MDM2"%2C"MDM4"%5D&comparison_subtab=generic_assay_microbiome_signature&data_priority=0&gene_list=CDKN2A%2520MDM2%2520MDM4&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=blca_tcga_pan_can_atlas_2018_gistic&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=blca_tcga_pan_can_atlas_2018_mutations&profileFilter=0&tab_index=tab_visualize`
);
$(
'div[data-test="GroupComparisonGenericAssayEnrichments"]'
).waitForDisplayed({ timeout: 10000 });
$('b=Polyomavirus').waitForDisplayed({ timeout: 10000 });
$('b=Polyomavirus').click();
$('div[data-test="MiniBoxPlot"]').waitForDisplayed({
timeout: 20000,
});
$('body').moveTo({ xOffset: 0, yOffset: 0 });
var res = browser.checkElement(
'.msk-tab:not(.hiddenByPosition)',
'',
{
hide: ['.qtip'],
}
);
assertScreenShotMatch(res);
});

it('results view comparison tab microbiome signature tab two groups', function() {
// deselect a group
$('button[data-test="groupSelectorButtonMDM4"]').click();

$(
'div[data-test="GroupComparisonGenericAssayEnrichments"]'
).waitForDisplayed({ timeout: 10000 });
$('b=Wolbachia').waitForDisplayed({ timeout: 10000 });
$('b=Wolbachia').click();
$('body').moveTo({ xOffset: 0, yOffset: 0 });
var res = browser.checkElement(
'.msk-tab:not(.hiddenByPosition)',
'',
{
hide: ['.qtip'],
}
);
assertScreenShotMatch(res);
});
});

describe('delete group from session', function() {
Expand Down
Loading

0 comments on commit 8a5ace0

Please sign in to comment.