From 0e2d50b2f486c930ae66550219f162f56dc5a275 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 30 Jul 2025 17:17:56 +0100 Subject: [PATCH] Delete cypress/support/commands.js --- cypress/support/commands.js | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 cypress/support/commands.js diff --git a/cypress/support/commands.js b/cypress/support/commands.js deleted file mode 100644 index 37631bca..00000000 --- a/cypress/support/commands.js +++ /dev/null @@ -1,20 +0,0 @@ -Cypress.Commands.add("login", () => { - const username = "m0abc"; - const password = "demo"; - cy.visit("/index.php/user/login"); - cy.get('input[name="user_name"]').type(username); - cy.get('input[name="user_password"]').type(password); - cy.get('button[type="submit"]').click(); -}); - -// Custom command to wait for select elements to be populated -Cypress.Commands.add("waitForSelectOptions", (selector, minOptions = 1) => { - cy.get(selector).should('be.visible'); - cy.get(`${selector} option`).should('have.length.greaterThan', minOptions); -}); - -// Custom command to simulate tab key press -Cypress.Commands.add("tab", { prevSubject: 'element' }, (subject) => { - cy.wrap(subject).trigger('keydown', { key: 'Tab', code: 'Tab' }); - return cy.focused(); -});