diff --git a/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js b/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js index ae4d7392b26a4..1b36bea17a7c5 100644 --- a/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js +++ b/tests/System/integration/administrator/components/com_actionlogs/Actionlogs.cy.js @@ -25,19 +25,19 @@ describe('Test in backend that the action logs', () => { it('has an export button', () => { cy.get('#toolbar-download1').click(); - cy.get('#system-message-container').contains('There are no User Action logs to export').should('exist'); + cy.checkForSystemMessage('There are no User Action logs to export'); }); it('can clear logs', () => { cy.get('#toolbar-delete1').click(); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('All User Action logs have been deleted').should('exist'); + cy.checkForSystemMessage('All User Action logs have been deleted'); }); it('can delete selected logs', () => { cy.get('#toolbar-delete').click(); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Please first make a selection from the list').should('exist'); + cy.checkForSystemMessage('Please first make a selection from the list'); cy.log('Make a selection first'); cy.doAdministratorLogout(); cy.doAdministratorLogin(); @@ -45,7 +45,7 @@ describe('Test in backend that the action logs', () => { cy.checkAllResults(); cy.get('#toolbar-delete').click(); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('logs deleted').should('exist'); + cy.checkForSystemMessage('logs deleted'); cy.task('queryDB', 'TRUNCATE #__action_logs'); }); }); diff --git a/tests/System/integration/administrator/components/com_banners/Banner.cy.js b/tests/System/integration/administrator/components/com_banners/Banner.cy.js index 656434df59dd7..e0c6b3ca4a984 100644 --- a/tests/System/integration/administrator/components/com_banners/Banner.cy.js +++ b/tests/System/integration/administrator/components/com_banners/Banner.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the banners form', () => { cy.get('#jform_name').clear().type('Test banner'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Banner saved.').should('exist'); + cy.checkForSystemMessage('Banner saved.'); cy.contains('Test banner'); }); diff --git a/tests/System/integration/administrator/components/com_banners/Banners.cy.js b/tests/System/integration/administrator/components/com_banners/Banners.cy.js index 5c3e6235e40a8..9c9fc81417b43 100644 --- a/tests/System/integration/administrator/components/com_banners/Banners.cy.js +++ b/tests/System/integration/administrator/components/com_banners/Banners.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the banners list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Banner published.').should('exist'); + cy.checkForSystemMessage('Banner published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the banners list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Banner unpublished.').should('exist'); + cy.checkForSystemMessage('Banner unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the banners list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Banner trashed.').should('exist'); + cy.checkForSystemMessage('Banner trashed.'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the banners list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Banner deleted.').should('exist'); + cy.checkForSystemMessage('Banner deleted.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_banners/Client.cy.js b/tests/System/integration/administrator/components/com_banners/Client.cy.js index 84eac4dfae8df..0e48d09a129de 100644 --- a/tests/System/integration/administrator/components/com_banners/Client.cy.js +++ b/tests/System/integration/administrator/components/com_banners/Client.cy.js @@ -12,7 +12,7 @@ describe('Test in backend that the banner clients form', () => { cy.get('#jform_contact').clear().type('test banner client'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Client saved.').should('exist'); + cy.checkForSystemMessage('Client saved.'); cy.contains('test banner client'); }); diff --git a/tests/System/integration/administrator/components/com_banners/Clients.cy.js b/tests/System/integration/administrator/components/com_banners/Clients.cy.js index 7e3fec806f8b7..52d73fb6d5124 100644 --- a/tests/System/integration/administrator/components/com_banners/Clients.cy.js +++ b/tests/System/integration/administrator/components/com_banners/Clients.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the clients list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Client published.').should('exist'); + cy.checkForSystemMessage('Client published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the clients list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Client unpublished.').should('exist'); + cy.checkForSystemMessage('Client unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the clients list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Client trashed.').should('exist'); + cy.checkForSystemMessage('Client trashed.'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the clients list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Client deleted.').should('exist'); + cy.checkForSystemMessage('Client deleted.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_cache/Default.cy.js b/tests/System/integration/administrator/components/com_cache/Default.cy.js index 4e9439461a964..a827ff5efca60 100644 --- a/tests/System/integration/administrator/components/com_cache/Default.cy.js +++ b/tests/System/integration/administrator/components/com_cache/Default.cy.js @@ -23,11 +23,11 @@ describe('Test in backend that the cache', () => { cy.get('div.buttons-holder button[data-button-ok]').click(); } }); - cy.get('#system-message-container').contains('Expired cached items have been cleared').should('exist'); + cy.checkForSystemMessage('Expired cached items have been cleared'); }); it('can delete all', () => { cy.get('#toolbar-delete1').click(); - cy.get('#system-message-container').contains('All cache group(s) have been cleared').should('exist'); + cy.checkForSystemMessage('All cache group(s) have been cleared'); }); }); diff --git a/tests/System/integration/administrator/components/com_categories/Categories.cy.js b/tests/System/integration/administrator/components/com_categories/Categories.cy.js index 4abebb573edab..8a6d1bd484b44 100644 --- a/tests/System/integration/administrator/components/com_categories/Categories.cy.js +++ b/tests/System/integration/administrator/components/com_categories/Categories.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the categories list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Category published.').should('exist'); + cy.checkForSystemMessage('Category published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the categories list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Category unpublished.').should('exist'); + cy.checkForSystemMessage('Category unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the categories list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Category trashed.').should('exist'); + cy.checkForSystemMessage('Category trashed.'); }); }); @@ -70,6 +70,6 @@ describe('Test in backend that the categories list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Category deleted.').should('exist'); + cy.checkForSystemMessage('Category deleted.'); }); }); diff --git a/tests/System/integration/administrator/components/com_categories/Category.cy.js b/tests/System/integration/administrator/components/com_categories/Category.cy.js index cc542daa671ff..84a4daadb1a83 100644 --- a/tests/System/integration/administrator/components/com_categories/Category.cy.js +++ b/tests/System/integration/administrator/components/com_categories/Category.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the category form', () => { cy.get('#jform_title').should('exist').type('Test category'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Category saved.').should('exist'); + cy.checkForSystemMessage('Category saved.'); cy.contains('Test category'); }); diff --git a/tests/System/integration/administrator/components/com_checkin/Default.cy.js b/tests/System/integration/administrator/components/com_checkin/Default.cy.js index 406426772a328..810e6030002dc 100644 --- a/tests/System/integration/administrator/components/com_checkin/Default.cy.js +++ b/tests/System/integration/administrator/components/com_checkin/Default.cy.js @@ -25,7 +25,7 @@ describe('Test in backend that the checkin', () => { cy.searchForItem('content'); cy.checkAllResults(); cy.get('#toolbar-checkin').click(); - cy.get('#system-message-container').contains('Item checked in').should('exist'); + cy.checkForSystemMessage('Item checked in'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_config/Application.cy.js b/tests/System/integration/administrator/components/com_config/Application.cy.js index 4a9be2772a950..c38a55aaf76ac 100644 --- a/tests/System/integration/administrator/components/com_config/Application.cy.js +++ b/tests/System/integration/administrator/components/com_config/Application.cy.js @@ -22,7 +22,7 @@ describe('Test in backend that the application configuration', () => { cy.get('#sendtestmail').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'The email was sent to'); + cy.checkForSystemMessage('The email was sent to'); expect(mails.length).to.equal(1); cy.wrap(mails[0].body).should('have.string', 'This is a test mail sent using'); diff --git a/tests/System/integration/administrator/components/com_contact/Contact.cy.js b/tests/System/integration/administrator/components/com_contact/Contact.cy.js index 7b3332570550c..ae4e6f033e66c 100644 --- a/tests/System/integration/administrator/components/com_contact/Contact.cy.js +++ b/tests/System/integration/administrator/components/com_contact/Contact.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the contact form', () => { cy.get('#jform_name').clear().type('Test contact'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Contact saved.').should('exist'); + cy.checkForSystemMessage('Contact saved.'); cy.contains('Test contact'); }); diff --git a/tests/System/integration/administrator/components/com_contact/Contacts.cy.js b/tests/System/integration/administrator/components/com_contact/Contacts.cy.js index 6025b8008fc25..8fb985e427624 100644 --- a/tests/System/integration/administrator/components/com_contact/Contacts.cy.js +++ b/tests/System/integration/administrator/components/com_contact/Contacts.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Contact published.').should('exist'); + cy.checkForSystemMessage('Contact published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Contact unpublished.').should('exist'); + cy.checkForSystemMessage('Contact unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('Action'); cy.contains('.button-featured', 'Feature').click(); - cy.get('#system-message-container').contains('Contact featured.').should('exist'); + cy.checkForSystemMessage('Contact featured.'); }); }); @@ -66,7 +66,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('Action'); cy.contains('Unfeature').click(); - cy.get('#system-message-container').contains('Contact unfeatured.').should('exist'); + cy.checkForSystemMessage('Contact unfeatured.'); }); }); @@ -78,7 +78,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Contact trashed.').should('exist'); + cy.checkForSystemMessage('Contact trashed.'); }); }); @@ -91,7 +91,7 @@ describe('Test in backend that the contacts list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Contact deleted.').should('exist'); + cy.checkForSystemMessage('Contact deleted.'); }); }); diff --git a/tests/System/integration/administrator/components/com_content/Article.cy.js b/tests/System/integration/administrator/components/com_content/Article.cy.js index a5b2e69e73703..d0c30fc62ff06 100644 --- a/tests/System/integration/administrator/components/com_content/Article.cy.js +++ b/tests/System/integration/administrator/components/com_content/Article.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the article form', () => { cy.get('#jform_title').clear().type('Test article'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Article saved.').should('exist'); + cy.checkForSystemMessage('Article saved.'); cy.contains('Test article'); }); diff --git a/tests/System/integration/administrator/components/com_content/Articles.cy.js b/tests/System/integration/administrator/components/com_content/Articles.cy.js index 84b97ed828167..a03adefbcd5aa 100644 --- a/tests/System/integration/administrator/components/com_content/Articles.cy.js +++ b/tests/System/integration/administrator/components/com_content/Articles.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Article published.').should('exist'); + cy.checkForSystemMessage('Article published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Article unpublished.').should('exist'); + cy.checkForSystemMessage('Article unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('Action'); cy.contains('.button-featured', 'Feature').click(); - cy.get('#system-message-container').contains('Article featured.').should('exist'); + cy.checkForSystemMessage('Article featured.'); }); }); @@ -66,7 +66,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('Action'); cy.contains('Unfeature').click(); - cy.get('#system-message-container').contains('Article unfeatured.').should('exist'); + cy.checkForSystemMessage('Article unfeatured.'); }); }); @@ -78,7 +78,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Article trashed.').should('exist'); + cy.checkForSystemMessage('Article trashed.'); }); }); @@ -91,7 +91,7 @@ describe('Test in backend that the articles list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Article deleted.').should('exist'); + cy.checkForSystemMessage('Article deleted.'); }); }); diff --git a/tests/System/integration/administrator/components/com_fields/Field.cy.js b/tests/System/integration/administrator/components/com_fields/Field.cy.js index 3b7514e58e11d..43f9ae1d632da 100644 --- a/tests/System/integration/administrator/components/com_fields/Field.cy.js +++ b/tests/System/integration/administrator/components/com_fields/Field.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the field form', () => { cy.get('#jform_title').clear().type('Test field'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Field saved').should('exist'); + cy.checkForSystemMessage('Field saved'); cy.contains('Test field'); }); diff --git a/tests/System/integration/administrator/components/com_fields/Fields.cy.js b/tests/System/integration/administrator/components/com_fields/Fields.cy.js index fea32673c9697..a6ad229e85700 100644 --- a/tests/System/integration/administrator/components/com_fields/Fields.cy.js +++ b/tests/System/integration/administrator/components/com_fields/Fields.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the custom fields list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Field published').should('exist'); + cy.checkForSystemMessage('Field published'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the custom fields list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Field unpublished').should('exist'); + cy.checkForSystemMessage('Field unpublished'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the custom fields list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Field trashed').should('exist'); + cy.checkForSystemMessage('Field trashed'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the custom fields list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Field deleted').should('exist'); + cy.checkForSystemMessage('Field deleted'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_joomlaupdate/Update.cy.js b/tests/System/integration/administrator/components/com_joomlaupdate/Update.cy.js index bc81d06389e6e..3312be290231d 100644 --- a/tests/System/integration/administrator/components/com_joomlaupdate/Update.cy.js +++ b/tests/System/integration/administrator/components/com_joomlaupdate/Update.cy.js @@ -14,7 +14,7 @@ describe('Test the update retrieval logic', () => { cy.get('#toolbar joomla-toolbar-button[task="update.purge"] button').click(); - cy.get('#system-message-container').contains('Checked for updates.').should('exist'); + cy.checkForSystemMessage('Checked for updates.'); }); it('Receives error fetching available updates with invalid metadata', () => { @@ -24,6 +24,6 @@ describe('Test the update retrieval logic', () => { cy.get('#confirmButton').click(); - cy.get('#system-message-container').contains('Update not possible because the offered update does not have enough signatures.').should('exist'); + cy.checkForSystemMessage('Update not possible because the offered update does not have enough signatures.'); }); }); diff --git a/tests/System/integration/administrator/components/com_login/Login.cy.js b/tests/System/integration/administrator/components/com_login/Login.cy.js index f7f999f54b09e..824ab5aae209b 100644 --- a/tests/System/integration/administrator/components/com_login/Login.cy.js +++ b/tests/System/integration/administrator/components/com_login/Login.cy.js @@ -24,7 +24,7 @@ describe('Test in backend that the login component', () => { cy.get('#mod-login-password').type(Cypress.env('password')); cy.get('#btn-login-submit').click(); - cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist'); + cy.checkForSystemMessage('Username and password do not match or you do not have an account yet.'); }); it('can not log in with wrong password', () => { @@ -33,7 +33,7 @@ describe('Test in backend that the login component', () => { cy.get('#mod-login-password').type('invalid'); cy.get('#btn-login-submit').click(); - cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist'); + cy.checkForSystemMessage('Username and password do not match or you do not have an account yet.'); }); it('can not log in with non-existing user', () => { @@ -42,6 +42,6 @@ describe('Test in backend that the login component', () => { cy.get('#mod-login-password').type('invalid'); cy.get('#btn-login-submit').click(); - cy.get('#system-message-container').contains('Username and password do not match or you do not have an account yet.').should('exist'); + cy.checkForSystemMessage('Username and password do not match or you do not have an account yet.'); }); }); diff --git a/tests/System/integration/administrator/components/com_media/Media.cy.js b/tests/System/integration/administrator/components/com_media/Media.cy.js index 3ddf849f9c4e7..dcdd714c060fd 100644 --- a/tests/System/integration/administrator/components/com_media/Media.cy.js +++ b/tests/System/integration/administrator/components/com_media/Media.cy.js @@ -77,7 +77,7 @@ describe('Test in backend that the media manager', () => { cy.visit('/administrator/index.php?option=com_media&path=local-images:/invalid'); cy.wait('@getMedia'); - cy.get('#system-message-container').should('contain.text', 'File or Folder not found'); + cy.checkForSystemMessage('File or Folder not found'); }); it('can display an error message when an invalid path is defined in the session', () => { @@ -85,6 +85,6 @@ describe('Test in backend that the media manager', () => { cy.visit('/administrator/index.php?option=com_media'); cy.wait('@getMedia'); - cy.get('#system-message-container').should('contain.text', 'File or Folder not found'); + cy.checkForSystemMessage('File or Folder not found'); }); }); diff --git a/tests/System/integration/administrator/components/com_menu/Menu.cy.js b/tests/System/integration/administrator/components/com_menu/Menu.cy.js index a1d0055097f75..f775ca49edd43 100644 --- a/tests/System/integration/administrator/components/com_menu/Menu.cy.js +++ b/tests/System/integration/administrator/components/com_menu/Menu.cy.js @@ -10,7 +10,7 @@ describe('Test in backend that the user form', () => { cy.get('#jform_menudescription').clear().type('test description'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Menu saved').should('exist'); + cy.checkForSystemMessage('Menu saved'); cy.contains('test menu'); }); }); diff --git a/tests/System/integration/administrator/components/com_menu/MenuItem.cy.js b/tests/System/integration/administrator/components/com_menu/MenuItem.cy.js index f448e1375f613..c8ff8e666db21 100644 --- a/tests/System/integration/administrator/components/com_menu/MenuItem.cy.js +++ b/tests/System/integration/administrator/components/com_menu/MenuItem.cy.js @@ -27,7 +27,7 @@ describe('Test in backend that the menu list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Menu item trashed.').should('exist'); + cy.checkForSystemMessage('Menu item trashed.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_modules/Module.cy.js b/tests/System/integration/administrator/components/com_modules/Module.cy.js index 761d79fa9aea5..03849db2cab20 100644 --- a/tests/System/integration/administrator/components/com_modules/Module.cy.js +++ b/tests/System/integration/administrator/components/com_modules/Module.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the module form', () => { cy.get('#jform_title').clear().type('Test module'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Module saved').should('exist'); + cy.checkForSystemMessage('Module saved'); cy.contains('Test module'); }); diff --git a/tests/System/integration/administrator/components/com_modules/Modules.cy.js b/tests/System/integration/administrator/components/com_modules/Modules.cy.js index 5497fe6152c7b..3c258d6adea0a 100644 --- a/tests/System/integration/administrator/components/com_modules/Modules.cy.js +++ b/tests/System/integration/administrator/components/com_modules/Modules.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the module list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Module published').should('exist'); + cy.checkForSystemMessage('Module published'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the module list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Module unpublished').should('exist'); + cy.checkForSystemMessage('Module unpublished'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the module list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Module trashed').should('exist'); + cy.checkForSystemMessage('Module trashed'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the module list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Module deleted').should('exist'); + cy.checkForSystemMessage('Module deleted'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_newsfeeds/Newsfeed.cy.js b/tests/System/integration/administrator/components/com_newsfeeds/Newsfeed.cy.js index d3eac81b022ec..e0c611a780626 100644 --- a/tests/System/integration/administrator/components/com_newsfeeds/Newsfeed.cy.js +++ b/tests/System/integration/administrator/components/com_newsfeeds/Newsfeed.cy.js @@ -8,7 +8,7 @@ describe('Test in backend that the newsfeed form', () => { cy.get('#jform_link').clear().type('https://newsfeedtesturl'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('News feed saved.').should('exist'); + cy.checkForSystemMessage('News feed saved.'); cy.contains('Test newsfeed'); }); diff --git a/tests/System/integration/administrator/components/com_newsfeeds/Newsfeeds.cy.js b/tests/System/integration/administrator/components/com_newsfeeds/Newsfeeds.cy.js index 02382578001b1..a9cb2e006a4c7 100644 --- a/tests/System/integration/administrator/components/com_newsfeeds/Newsfeeds.cy.js +++ b/tests/System/integration/administrator/components/com_newsfeeds/Newsfeeds.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the newsfeeds list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('News feed published.').should('exist'); + cy.checkForSystemMessage('News feed published.'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the newsfeeds list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('News feed unpublished.').should('exist'); + cy.checkForSystemMessage('News feed unpublished.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the newsfeeds list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('News feed trashed.').should('exist'); + cy.checkForSystemMessage('News feed trashed.'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the newsfeeds list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('News feed deleted.').should('exist'); + cy.checkForSystemMessage('News feed deleted.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_plugins/Plugins.cy.js b/tests/System/integration/administrator/components/com_plugins/Plugins.cy.js index 6e0980ff321da..bc27778110384 100644 --- a/tests/System/integration/administrator/components/com_plugins/Plugins.cy.js +++ b/tests/System/integration/administrator/components/com_plugins/Plugins.cy.js @@ -17,7 +17,7 @@ describe('Test in backend that the plugins list', () => { cy.checkAllResults(); cy.contains('Disable').click(); cy.on('window:confirm', () => true); - cy.get('#system-message-container').contains('Plugin disabled.').should('exist'); + cy.checkForSystemMessage('Plugin disabled.'); }); it('can publish a plugin', () => { @@ -25,7 +25,7 @@ describe('Test in backend that the plugins list', () => { cy.checkAllResults(); cy.contains('Enable').click(); cy.on('window:confirm', () => true); - cy.get('#system-message-container').contains('Plugin enabled.').should('exist'); + cy.checkForSystemMessage('Plugin enabled.'); }); it('can edit a plugin', () => { diff --git a/tests/System/integration/administrator/components/com_scheduler/Tasks.cy.js b/tests/System/integration/administrator/components/com_scheduler/Tasks.cy.js index 4588e6e33947f..531391e2e0e24 100644 --- a/tests/System/integration/administrator/components/com_scheduler/Tasks.cy.js +++ b/tests/System/integration/administrator/components/com_scheduler/Tasks.cy.js @@ -27,7 +27,7 @@ describe('Test in backend that the tasks list', () => { cy.get('#jform_params_url').clear().type('www.test.task'); cy.get('#jform_execution_rules_interval_minutes').clear().type('1'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Item saved').should('exist'); + cy.checkForSystemMessage('Item saved'); }); it('can unpublish the test task', () => { @@ -38,7 +38,7 @@ describe('Test in backend that the tasks list', () => { cy.get('#jform_params_url').clear().type('www.test.task'); cy.get('#jform_execution_rules_interval_minutes').clear().type('1'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Item saved').should('exist'); + cy.checkForSystemMessage('Item saved'); cy.reload(); cy.searchForItem('Test task'); @@ -47,7 +47,7 @@ describe('Test in backend that the tasks list', () => { cy.contains('Disable').click(); cy.on('window:confirm', () => true); - cy.get('#system-message-container').contains('Task disabled').should('exist'); + cy.checkForSystemMessage('Task disabled'); }); it('can trash the test task', () => { @@ -60,7 +60,7 @@ describe('Test in backend that the tasks list', () => { cy.get('#jform_state').select('Disabled'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Item saved').should('exist'); + cy.checkForSystemMessage('Item saved'); cy.reload(); cy.searchForItem('Test task'); @@ -69,7 +69,7 @@ describe('Test in backend that the tasks list', () => { cy.contains('Trash').click(); cy.on('window:confirm', () => true); - cy.get('#system-message-container').contains('Task trashed').should('exist'); + cy.checkForSystemMessage('Task trashed'); }); it('can delete the test task', () => { @@ -82,7 +82,7 @@ describe('Test in backend that the tasks list', () => { cy.get('#jform_state').select('Trashed'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Item saved').should('exist'); + cy.checkForSystemMessage('Item saved'); cy.reload(); @@ -92,6 +92,6 @@ describe('Test in backend that the tasks list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Task deleted').should('exist'); + cy.checkForSystemMessage('Task deleted'); }); }); diff --git a/tests/System/integration/administrator/components/com_tags/Tag.cy.js b/tests/System/integration/administrator/components/com_tags/Tag.cy.js index c9dc6fbf07121..a936520b069f0 100644 --- a/tests/System/integration/administrator/components/com_tags/Tag.cy.js +++ b/tests/System/integration/administrator/components/com_tags/Tag.cy.js @@ -11,7 +11,7 @@ describe('Test in backend that the tag form', () => { cy.get('#jform_title').clear().type('Test tag'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Tag saved').should('exist'); + cy.checkForSystemMessage('Tag saved'); cy.contains('Test tag'); }); diff --git a/tests/System/integration/administrator/components/com_tags/Tags.cy.js b/tests/System/integration/administrator/components/com_tags/Tags.cy.js index acd4bad9529cb..f021402acac8c 100644 --- a/tests/System/integration/administrator/components/com_tags/Tags.cy.js +++ b/tests/System/integration/administrator/components/com_tags/Tags.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the custom tags list', () => { cy.clickToolbarButton('Action'); cy.contains('Publish').click(); - cy.get('#system-message-container').contains('Tag published').should('exist'); + cy.checkForSystemMessage('Tag published'); }); }); @@ -42,7 +42,7 @@ describe('Test in backend that the custom tags list', () => { cy.clickToolbarButton('Action'); cy.contains('Unpublish').click(); - cy.get('#system-message-container').contains('Tag unpublished').should('exist'); + cy.checkForSystemMessage('Tag unpublished'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the custom tags list', () => { cy.clickToolbarButton('Action'); cy.contains('Trash').click(); - cy.get('#system-message-container').contains('Tag trashed').should('exist'); + cy.checkForSystemMessage('Tag trashed'); }); }); @@ -67,7 +67,7 @@ describe('Test in backend that the custom tags list', () => { cy.clickToolbarButton('empty trash'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('Tag deleted').should('exist'); + cy.checkForSystemMessage('Tag deleted'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_users/Group.cy.js b/tests/System/integration/administrator/components/com_users/Group.cy.js index 94b891ad22b1b..c161c0f2ad6e4 100644 --- a/tests/System/integration/administrator/components/com_users/Group.cy.js +++ b/tests/System/integration/administrator/components/com_users/Group.cy.js @@ -8,7 +8,7 @@ describe('Test in backend that the user group form', () => { cy.get('#jform_title').clear().type('test group'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Group saved.').should('exist'); + cy.checkForSystemMessage('Group saved.'); cy.contains('test group'); }); @@ -19,7 +19,7 @@ describe('Test in backend that the user group form', () => { cy.get('#jform_title').clear().type('test group edited'); cy.clickToolbarButton('Save'); - cy.get('#system-message-container').contains('Group saved.').should('exist'); + cy.checkForSystemMessage('Group saved.'); }); }); diff --git a/tests/System/integration/administrator/components/com_users/Groups.cy.js b/tests/System/integration/administrator/components/com_users/Groups.cy.js index 1903fe9c68db2..1ac489ca8a7f8 100644 --- a/tests/System/integration/administrator/components/com_users/Groups.cy.js +++ b/tests/System/integration/administrator/components/com_users/Groups.cy.js @@ -29,7 +29,7 @@ describe('Test in backend that the user group list', () => { cy.clickToolbarButton('Delete'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('User Group deleted.').should('exist'); + cy.checkForSystemMessage('User Group deleted.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_users/Level.cy.js b/tests/System/integration/administrator/components/com_users/Level.cy.js index 2b781a726d8b8..ae8334999f195 100644 --- a/tests/System/integration/administrator/components/com_users/Level.cy.js +++ b/tests/System/integration/administrator/components/com_users/Level.cy.js @@ -8,7 +8,7 @@ describe('Test in backend that the user access level form', () => { cy.get('#jform_title').clear().type('test level'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('Access level saved.').should('exist'); + cy.checkForSystemMessage('Access level saved.'); cy.contains('test level'); }); @@ -19,7 +19,7 @@ describe('Test in backend that the user access level form', () => { cy.get('#jform_title').clear().type('test level edited'); cy.clickToolbarButton('Save'); - cy.get('#system-message-container').contains('Access level saved.').should('exist'); + cy.checkForSystemMessage('Access level saved.'); }); }); diff --git a/tests/System/integration/administrator/components/com_users/Levels.cy.js b/tests/System/integration/administrator/components/com_users/Levels.cy.js index dae7787337fde..fda381242df76 100644 --- a/tests/System/integration/administrator/components/com_users/Levels.cy.js +++ b/tests/System/integration/administrator/components/com_users/Levels.cy.js @@ -29,7 +29,7 @@ describe('Test in backend that the user access level list', () => { cy.clickToolbarButton('Delete'); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('View Access Level removed.').should('exist'); + cy.checkForSystemMessage('View Access Level removed.'); }); }); }); diff --git a/tests/System/integration/administrator/components/com_users/User.cy.js b/tests/System/integration/administrator/components/com_users/User.cy.js index 824dd1eb47893..ef24e41b701d0 100644 --- a/tests/System/integration/administrator/components/com_users/User.cy.js +++ b/tests/System/integration/administrator/components/com_users/User.cy.js @@ -12,7 +12,7 @@ describe('Test in backend that the user form', () => { cy.get('#jform_password2').clear().type('testtesttest'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('User saved').should('exist'); + cy.checkForSystemMessage('User saved'); cy.contains('test user'); }); @@ -27,7 +27,7 @@ describe('Test in backend that the user form', () => { cy.get('#jform_email').clear().type('testedited@example.com'); cy.clickToolbarButton('Save'); - cy.get('#system-message-container').contains('User saved.').should('exist'); + cy.checkForSystemMessage('User saved.'); }); }); @@ -54,7 +54,7 @@ describe('Test in backend that the user form', () => { cy.get('#jform_password').clear().type('testresetpswd'); cy.get('#jform_password2').clear().type('testresetpswd'); cy.clickToolbarButton('Save & Close'); - cy.get('#system-message-container').contains('User saved.').should('exist'); + cy.checkForSystemMessage('User saved.'); cy.doAdministratorLogout(); // Check that the user can login with the new password diff --git a/tests/System/integration/administrator/components/com_users/Users.cy.js b/tests/System/integration/administrator/components/com_users/Users.cy.js index 89eb4853e9caa..4090865a4b31b 100644 --- a/tests/System/integration/administrator/components/com_users/Users.cy.js +++ b/tests/System/integration/administrator/components/com_users/Users.cy.js @@ -30,7 +30,7 @@ describe('Test in backend that the user list', () => { cy.contains('Delete').click(); cy.clickDialogConfirm(true); - cy.get('#system-message-container').contains('User deleted.').should('exist'); + cy.checkForSystemMessage('User deleted.'); }); }); diff --git a/tests/System/integration/site/components/com_users/Logout.cy.js b/tests/System/integration/site/components/com_users/Logout.cy.js index 0798a83dec41f..80221ff1fa908 100644 --- a/tests/System/integration/site/components/com_users/Logout.cy.js +++ b/tests/System/integration/site/components/com_users/Logout.cy.js @@ -6,7 +6,7 @@ describe('Test in frontend that the users logout view', () => { cy.contains(`Hi ${Cypress.env('name')}`).should('not.exist'); // This is disabled for now as it looks like cypress has an issue after redirect with the session - // cy.get('#system-message-container').should('contain.text', 'You have been logged out.'); + // cy.checkForSystemMessage('You have been logged out.'); }); it('can log out the user in a menu item', () => { @@ -18,7 +18,7 @@ describe('Test in frontend that the users logout view', () => { cy.get('a:contains(Automated logout)').click(); cy.contains(`Hi ${Cypress.env('name')}`).should('not.exist'); - cy.get('#system-message-container').should('contain.text', 'You have been logged out.'); + cy.checkForSystemMessage('You have been logged out.'); }); }); }); diff --git a/tests/System/integration/site/components/com_users/Profile_Edit.cy.js b/tests/System/integration/site/components/com_users/Profile_Edit.cy.js index 83ff1f134ab0d..8c9834ec94230 100644 --- a/tests/System/integration/site/components/com_users/Profile_Edit.cy.js +++ b/tests/System/integration/site/components/com_users/Profile_Edit.cy.js @@ -29,7 +29,7 @@ describe('Test in frontend that the users profile view edit layout', () => { cy.get('#jform_email1').clear().type('testedited@example.com'); cy.get('.controls > .btn-primary').click({ force: true }); - cy.get('#system-message-container').contains('Profile saved.'); + cy.checkForSystemMessage('Profile saved.'); cy.get('#users-profile-core').should('contain.text', 'Name'); cy.get('#users-profile-core').should('contain.text', 'automated test user edited'); }); @@ -49,7 +49,7 @@ describe('Test in frontend that the users profile view edit layout', () => { cy.get('#jform_email1').clear().type('testedited@example.com'); cy.get('.controls > .btn-primary').should('be.visible').click({ force: true }); - cy.get('#system-message-container').contains('Profile saved.'); + cy.checkForSystemMessage('Profile saved.'); cy.get('.profile .btn-primary').should('be.visible').click({ force: true }); cy.get('#jform_name').should('have.value', 'automated test user edited'); cy.get('#jform_email1').should('have.value', 'testedited@example.com'); diff --git a/tests/System/integration/site/components/com_users/Remind.cy.js b/tests/System/integration/site/components/com_users/Remind.cy.js index 362ffac376cfa..1d73bb3c6ab4a 100644 --- a/tests/System/integration/site/components/com_users/Remind.cy.js +++ b/tests/System/integration/site/components/com_users/Remind.cy.js @@ -9,7 +9,7 @@ describe('Test in frontend that the users remind view', () => { cy.get('.controls > .btn').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); + cy.checkForSystemMessage('If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); expect(mails.length).to.equal(1); cy.wrap(mails[0].body).should('have.string', 'A username reminder has been requested'); @@ -26,7 +26,7 @@ describe('Test in frontend that the users remind view', () => { cy.get('.controls > .btn').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); + cy.checkForSystemMessage('If the email address you entered is registered on this site you will shortly receive an email with a reminder.'); expect(mails.length).to.equal(0); }); diff --git a/tests/System/integration/site/components/com_users/Reset.cy.js b/tests/System/integration/site/components/com_users/Reset.cy.js index df93ce7e5f952..1bf4610f07ac2 100644 --- a/tests/System/integration/site/components/com_users/Reset.cy.js +++ b/tests/System/integration/site/components/com_users/Reset.cy.js @@ -9,7 +9,7 @@ describe('Test in frontend that the users reset view', () => { cy.get('.controls > .btn').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); + cy.checkForSystemMessage('If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); expect(mails.length).to.equal(1); cy.wrap(mails[0].body).should('have.string', 'To reset your password, you will need to submit this verification code'); @@ -32,7 +32,7 @@ describe('Test in frontend that the users reset view', () => { cy.get('.controls > .btn').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); + cy.checkForSystemMessage('If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); expect(mails.length).to.equal(1); cy.wrap(mails[0].body).should('have.string', 'To reset your password, you will need to submit this verification code'); @@ -49,7 +49,7 @@ describe('Test in frontend that the users reset view', () => { cy.get('.controls > .btn').click(); cy.task('getMails').then((mails) => { - cy.get('#system-message-container').should('contain.text', 'If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); + cy.checkForSystemMessage('If the email address you entered is registered on this site you will shortly receive an email with a link to reset the password for your account.'); expect(mails.length).to.equal(0); });