<commit_before>
import { testGraphTabClick } from './../support/macros';

describe("Individual Item Views", function(){

    context('FileProcessed MCOOL Collection', function(){

        it('Have at least 35 MCOOL FileProcessed files', function(){
            cy.visit('/search/?type=FileProcessed&file_format.display_title=mcool&workflow_run_outputs.workflow.title!=No+value').end()
                .wait(300).get('#slow-load-container').should('not.have.class', 'visible').end()
                .searchPageTotalResultCount().should('be.greaterThan', 34);
        });


        it('Default sort ordering is by date_created', function(){
            cy.get('.search-headers-row .search-headers-column-block[data-field="date_created"] .column-sort-icon').should('have.class', 'active');
        });

    });

    Cypress._.forEach(Cypress._.range(0, 10), function(idx){

        context('FileProcessed MCOOL - #' + (idx + 1) + '/10', function(){

            after(function(){ // Return to search results
                cy.go('back').wait(100).end();
            });

            it('FileView loads correctly on click from SearchView', function(){
                cy.get('.search-results-container .search-result-row[data-row-number="' + idx + '"] .search-result-column-block[data-field="display_title"] a')
                    .should('contain', '.mcool').click({ force: true }).wait(200).end();<commit_msg>Update search/?type=File sort ordering Cypress test to make date_created column visible.<commit_after>
import { testGraphTabClick } from './../support/macros';

describe("Individual Item Views", function(){

    context('FileProcessed MCOOL Collection', function(){

        it('Have at least 35 MCOOL FileProcessed files', function(){
            cy.visit('/search/?type=FileProcessed&file_format.display_title=mcool&workflow_run_outputs.workflow.title!=No+value').end()
                .wait(300).get('#slow-load-container').should('not.have.class', 'visible').end()
                .searchPageTotalResultCount().should('be.greaterThan', 34);
        });


        it('Default sort ordering is by date_created', function(){
            // First we must add the column to the view
            // Open column selector panel
            cy.get('#content div.above-results-table-row div.pull-right.right-buttons button.btn[data-tip="Configure visible columns"]').click().end()
                // Check the 'Date Created' checkbox
                .get('#content .search-result-config-panel div input[type="checkbox"][value="date_created"]').click().end()
                // Perform check
                .get('.search-headers-row .search-headers-column-block[data-field="date_created"] .column-sort-icon').should('have.class', 'active');
        });

    });

    Cypress._.forEach(Cypress._.range(0, 10), function(idx){

        context('FileProcessed MCOOL - #' + (idx + 1) + '/10', function(){

            after(function(){ // Return to search results
                cy.go('back').wait(100).end();
            });

            it('FileView loads correctly on click from SearchView', function(){
                cy.get('.search-results-container .search-result-row[data-row-number="' + idx + '"] .search-result-column-block[data-field="display_title"] a')
                    .should('contain', '.mcool').click({ force: true }).wait(200).end();
{'fraction_non_alphanumeric': 0.16845557543231962, 'fraction_numerical': 0.011329755515802028, 'mean_word_length': 2.8168373151308304, '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': '6345128', 'n_tokens_mistral': 981, 'n_tokens_neox': 903, 'n_words': 179}