'Why Cypress.config('defaultCommandTimeout', 10000); is not working in my script for this suggestive drop-down button which shall wait for 10s

I know there is this solution by adding 'defaultCommandTimeout' in the cypress.json file, but I do not want to add wait in my entire test framework and need to only wait for one particular element. Please go through the screenshots and help me out!

    add.getCountry().type('India');
    Cypress.config('defaultCommandTimeout', 10000);
    add.selectCountry().click();

Cypress result:

cypress result



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source