Test passes in headed mode, but always fails in headless mode
I am trying to perform test on w2ui field of type "list"
Ideally when we click on this w2ui list element, drop down(overlay) is generated with the select options and then we select an option.
But while running test in headless mode, this drop down is not generated.
Code To reproduce the issue :-
Code for webpage:
Save the code provided in above link in file "test_webpage.html" . Place this html file in the directory where cypress.json is located.
Code of Cypress Test:
describe('W2UI List Test', function() {
it('Click List Field', function() {
cy.visit('test_webpage.html');
cy.get('.w2ui-select').siblings('.w2ui-field-helper').should('be.visible').click();
cy.wait(2000);
cy.get('#w2ui-overlay tr[index=0]').should('be.visible').click();
});
});