<commit_before>var assert = require('assert');
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils')
    .goToUrlAndSetLocalStorage;
var postDataToUrl = require('../../../shared/specUtils').postDataToUrl;
var parse = require('url-parse');
var _ = require('lodash');

var {
    useExternalFrontend,
    waitForOncoprint,
} = require('../../../shared/specUtils');

const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');

describe('posting query parameters (instead of GET) to query page', function() {
    if (useExternalFrontend) {
        it('reads posted data (written by backend) and successfully passes params into URL, resulting in oncoprint display', function() {
            var url = `${CBIOPORTAL_URL}/results?localdist=true`;

            let query = {
                gene_list: 'CDKN2A MDM2 MDM4 TP53',
                cancer_study_list: 'study_es_0',
                case_set_id: 'study_es_0_cnaseq',
                profileFilter: '0',
                RPPA_SCORE_THRESHOLD: '2.0',
                Z_SCORE_THRESHOLD: '2.0',
                genetic_profile_ids_PROFILE_MUTATION_EXTENDED:
                    'study_es_0_mutations',
                genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION:
                    'study_es_0_gistic',<commit_msg>remove hardcoded `localdist=true` from test url<commit_after>var assert = require('assert');
var goToUrlAndSetLocalStorage = require('../../../shared/specUtils')
    .goToUrlAndSetLocalStorage;
var postDataToUrl = require('../../../shared/specUtils').postDataToUrl;
var parse = require('url-parse');
var _ = require('lodash');

var {
    useExternalFrontend,
    waitForOncoprint,
} = require('../../../shared/specUtils');

const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');

describe('posting query parameters (instead of GET) to query page', function() {
    if (useExternalFrontend) {
        it('reads posted data (written by backend) and successfully passes params into URL, resulting in oncoprint display', function() {
            const url = `${CBIOPORTAL_URL}/results`;
            goToUrlAndSetLocalStorage(url);

            let query = {
                gene_list: 'CDKN2A MDM2 MDM4 TP53',
                cancer_study_list: 'study_es_0',
                case_set_id: 'study_es_0_cnaseq',
                profileFilter: '0',
                RPPA_SCORE_THRESHOLD: '2.0',
                Z_SCORE_THRESHOLD: '2.0',
                genetic_profile_ids_PROFILE_MUTATION_EXTENDED:
                    'study_es_0_mutations',
                genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION:
                    'study_es_0_gistic',
{'fraction_non_alphanumeric': 0.12146359864202187, 'fraction_numerical': 0.010562052055827989, 'mean_word_length': 2.6478679504814306, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3396391', 'n_tokens_mistral': 860, 'n_tokens_neox': 822, 'n_words': 155}