<commit_before>

describe('Search Views', function () {

    context('Navigation', function () {
/*
        beforeEach(function () {
            cy.visit('https://example.cypress.io')
            cy.get('.navbar-nav').contains('Commands').click()
            cy.get('.dropdown-menu').contains('Navigation').click()
        });
*/  

        before(function(){ // beforeAll
            cy.visit('/search/');
        });

        it('Has at least 100 results for /search/?type=Item', function () {

            cy.location('search').should('include', 'type=Item');


            let searchResultRows = cy.get('.search-results-container .search-result-row').then(($searchResultElems)=>{
                expect($searchResultElems.length).to.equal(25);
            });

            cy.searchPageTotalResultCount().should('be.greaterThan', 100);

        });

        it('Load as you scroll works for ?type=Item', function () {

            cy.location('search').should('include', 'type=Item');

            cy.searchPageTotalResultCount().then((totalCountExpected)=>{
                let intervalCount = Math.min(20, parseInt(totalCountExpected / 25));

                for (let interval = 0; interval < intervalCount; interval++){
                    cy.scrollToBottom().then(()=>{
                        cy.get('.search-results-container .search-result-row[data-row-number="' + ( 25 * (interval + 1) ) + '"]', { timeout: 5000 }).should('have.length', 1);
                    });
                }

            });

        });

    });

});<commit_msg>Another test<commit_after>

describe('Search Views', function () {

    context('For /search/?type=Item', function () {
/*
        beforeEach(function () {
            cy.visit('https://example.cypress.io')
            cy.get('.navbar-nav').contains('Commands').click()
            cy.get('.dropdown-menu').contains('Navigation').click()
        });
*/  

        before(function(){ // beforeAll
            cy.visit('/search/');
        });

        it('Has at least 100 results for /search/?type=Item', function () {

            cy.location('search').should('include', 'type=Item');


            cy.get('.search-results-container .search-result-row').then(($searchResultElems)=>{
                expect($searchResultElems.length).to.equal(25);
            });

            cy.searchPageTotalResultCount().should('be.greaterThan', 100);

        });

        it('Load as you scroll works for ?type=Item', function () {

            cy.location('search').should('include', 'type=Item');

            cy.searchPageTotalResultCount().then((totalCountExpected)=>{
                let intervalCount = Math.min(20, parseInt(totalCountExpected / 25));

                for (let interval = 0; interval < intervalCount; interval++){
                    cy.scrollToBottom().then(()=>{
                        cy.get('.search-results-container .search-result-row[data-row-number="' + ( 25 * (interval + 1) ) + '"]', { timeout: 5000 }).should('have.length', 1);
                    });
                }

            });

        });

    });

    context('For Page collection', function(){

        before(function(){ // beforeAll
            cy.visit('/pages'); // We should get redirected to ?type=Page
        });

        it('Should redirect to /search/?type=Page correctly', function(){
            cy.location('search').should('include', 'type=Page');
            cy.location('pathname').should('include', '/search/');
        });

        it('Should have at least 20 results.', function(){
            cy.get('.search-results-container .search-result-row').then(($searchResultElems)=>{
                expect($searchResultElems.length).to.be.greaterThan(20);
            });
        });

    });

});
{'fraction_non_alphanumeric': 0.17898106161643104, 'fraction_numerical': 0.012269938650306749, 'mean_word_length': 2.0687397708674307, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '6527174', 'n_tokens_mistral': 1067, 'n_tokens_neox': 952, 'n_words': 159}