Delete cypress/support/commands.js

这个提交包含在:
Peter Goodhall 2025-07-30 17:17:56 +01:00 提交者 GitHub
父节点 9cdd874c66
当前提交 0e2d50b2f4
找不到此签名对应的密钥
GPG 密钥 ID: B5690EEEBB952194

查看文件

@ -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();
});