/
githubmirror
/
joomla-cms
Обзор
Документация
Войти
/
githubmirror
/
joomla-cms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
5.4-dev
tests/System/integration/administrator/components/com_modules/Modules.cy.js
73 строки
2 KB
Christian Heel
[5.2] refactor tests to use checkForSystemMessage (#44772)
24 янв 2025, 11:35
Не верифицирован
24 янв 2025, 11:35
68be1b3
Код
Авторство
О чём код?
describe('Test in backend that the module list', () => { beforeEach(() => { cy.doAdministratorLogin(); cy.visit('/administrator/index.php?option=com_modules&view=modules&filter='); }); it('has a title', () => { cy.get('h1.page-title').should('contain.text', 'Modules'); }); it('can display a list of modules', () => { cy.db_createModule({ title: 'Test module', module: 'mod_custom' }).then(() => { cy.reload(); cy.contains('Test module'); }); }); it('can open the module list', () => { cy.clickToolbarButton('New'); cy.contains('Select a Module Type'); }); it('can publish the test module', () => { cy.db_createModule({ title: 'Test module', module: 'mod_custom', published: 0 }).then(() => { cy.reload(); cy.searchForItem('Test module'); cy.checkAllResults(); cy.clickToolbarButton('Action'); cy.contains('Publish').click(); cy.checkForSystemMessage('Module published'); }); }); it('can unpublish the test module', () => { cy.db_createModule({ title: 'Test module', module: 'mod_custom', published: 1 }).then(() => { cy.reload(); cy.searchForItem('Test module'); cy.checkAllResults(); cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); cy.checkForSystemMessage('Module unpublished'); }); }); it('can trash the test module', () => { cy.db_createModule({ title: 'Test module', module: 'mod_custom' }).then(() => { cy.reload(); cy.searchForItem('Test module'); cy.checkAllResults(); cy.clickToolbarButton('Action'); cy.contains('Trash').click(); cy.checkForSystemMessage('Module trashed'); }); }); it('can delete the test module', () => { cy.db_createModule({ title: 'Test module', module: 'mod_custom', published: -2 }).then(() => { cy.reload(); cy.setFilter('state', 'Trashed'); cy.searchForItem('Test module'); cy.checkAllResults(); cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); cy.checkForSystemMessage('Module deleted'); }); }); });