<commit_before>// The HREF of the first category level 1
var href = 'furniture.html';

// The test
casper.test.begin('Category Level 1', function suite(test) {

    // Start on the homepage
    casper.start(url, function () {

        this.printTitle();

        // Main nav exists?
        test.assertExists('#nav');

        // Main categories links exists?
        test.assertExists('#nav a.level-top[href="'+ url + href +'"]');
    })

    // Then go to the category's page
    .thenClick('#nav a.level-top', function () {

        this.printTitle();

        // Are we on a category page?
        test.assertExists('body.catalog-category-view');

        // Get the URL of the first link in the menu and compare it with the url
        test.assertUrlMatch(url + href);

        // Test title
        test.assertTitle('Furniture');

        // Products list exist?
        test.assertExists('.category-products');

        // Menu link is active?
        test.assertExists('#nav li.level-top.nav-1.active > a');
    })

    .run(function () {
        test.done();
    });
});<commit_msg>[test] Category Level 1 - Added hover on link, wait for submenu<commit_after>// The HREF of the first category level 1
var href = 'furniture.html';

// The test
casper.test.begin('Category Level 1', function suite(test) {

    // Start on the homepage
    casper.start(url, function () {

        this.printTitle();

        // Main nav exists?
        test.assertExists('#nav');

        // Main categories links exists?
        test.assertExists('#nav a.level-top[href="'+ url + href +'"]');

        // Move the mouse on the link
        this.mouse.move('#nav a.level-top');

        // Wait the submenu
        this.waitForSelector('#nav .nav-1 ul.shown-sub', function () {
            test.assertExists('#nav .nav-1 ul.shown-sub');

            // Click the link
            this.click('#nav .nav-1 a.level-top');
        });
    })

    // Then go to the category's page
    .then(function () {

        this.printTitle();

        // Are we on a category page?
        test.assertExists('body.catalog-category-view');

        // Get the URL of the first link in the menu and compare it with the url
        test.assertUrlMatch(url + href);

        // Test title
        test.assertTitle('Furniture');

        // Products list exist?
        test.assertExists('.category-products');

        // Menu link is active?
        test.assertExists('#nav li.level-top.nav-1.active > a');
    })

    .run(function () {
        test.done();
    });
});
{'fraction_non_alphanumeric': 0.1430817610062893, 'fraction_numerical': 0.003930817610062893, 'mean_word_length': 2.040621266427718, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7429293', 'n_tokens_mistral': 752, 'n_tokens_neox': 709, 'n_words': 210}