/
githubmirror
/
joomla-cms
Обзор
Документация
Войти
/
githubmirror
/
joomla-cms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
5.4-dev
tests/System/support/commands.mjs
25 строк
746 B
Benjamin Trenkle
Merge remote-tracking branch 'Joomla/4.4-dev' into upmerges/2024-08-10
10 авг 2024, 12:16
Не верифицирован
10 авг 2024, 12:16
7f400b8
Код
Авторство
О чём код?
/** * Imports commands from files. The commands start with the folder name and an underscore as Cypress doesn't support * namespaces for commands. * * https://github.com/cypress-io/cypress/issues/6575 */ import { registerCommands } from 'joomla-cypress'; import './commands/api.mjs'; import './commands/config.mjs'; import './commands/db.mjs'; registerCommands(); // Click Joomla Dialog Confirm, isOkay: true = push "ok" button, false = push "cancel" button Cypress.Commands.add('clickDialogConfirm', (isOkay) => { let selector = '.joomla-dialog-confirm'; if (isOkay) { selector += ' button[data-button-ok]'; } else { selector += ' button[data-button-cancel]'; } return cy.get(selector, { timeout: 1000 }).click(); });