-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5.1] Cypress com_cache modification for Joomla.Dialog (#43682)
- Loading branch information
1 parent
dd95135
commit d8eb36e
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
tests/System/integration/administrator/components/com_cache/Default.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
describe('Test in backend that the cache', () => { | ||
beforeEach(() => { | ||
cy.doAdministratorLogin(); | ||
cy.visit('/administrator/index.php?option=com_cache&view=cache'); | ||
}); | ||
|
||
it('have a title', () => { | ||
cy.get('h1.page-title').should('contain.text', 'Maintenance: Clear Cache'); | ||
}); | ||
|
||
it('can display message', () => { | ||
cy.get('div.alert.alert-info').should('contain.text', 'Select the Clear Expired Cache button'); | ||
}); | ||
|
||
it('can display a list of chached items', () => { | ||
cy.get('tr.row0').should('contain.text', '_media_version'); | ||
}); | ||
|
||
it('can clear expired cache', () => { | ||
cy.get('#toolbar-delete2').click(); | ||
cy.get('body').then(($body) => { | ||
if ($body.find('div.buttons-holder button[data-button-ok]').length > 0) { | ||
cy.get('div.buttons-holder button[data-button-ok]').click(); | ||
} | ||
}); | ||
cy.get('#system-message-container').contains('Expired cached items have been cleared').should('exist'); | ||
}); | ||
|
||
it('can delete all', () => { | ||
cy.get('#toolbar-delete1').click(); | ||
cy.get('#system-message-container').contains('All cache group(s) have been cleared').should('exist'); | ||
}); | ||
}); |