Skip to content

Commit

Permalink
[cypress] + com_checkin (#43662)
Browse files Browse the repository at this point in the history
* cy-checkin

* cs

* less

* cs

* Update tests/System/integration/administrator/components/com_checkin/Default.cy.js

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/System/integration/administrator/components/com_checkin/Default.cy.js

Co-authored-by: Brian Teeman <brian@teeman.net>

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
  • Loading branch information
alikon and brianteeman authored Jun 19, 2024
1 parent 22beae0 commit fcaeff8
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
describe('Test in backend that the checkin', () => {
beforeEach(() => {
cy.doAdministratorLogin();
cy.visit('/administrator/index.php?option=com_checkin');
});

it('has a title', () => {
cy.get('h1.page-title').should('contain.text', 'Maintenance: Global Check-in');
});

it('can display message', () => {
cy.get('p.lead').should('contain.text', 'There are no tables with checked out items');
});

it('can display a list of checked out', () => {
cy.db_createArticle({ title: 'Test article', checked_out: '1', checked_out_time: '2024-01-01 20:00:00' }).then(() => {
cy.visit('/administrator/index.php?option=com_checkin');
cy.get('tr.row0').should('contain.text', 'content');
});
});

it('can check in items', () => {
cy.db_createArticle({ title: 'Test article', checked_out: '1', checked_out_time: '2024-01-01 20:00:00' }).then(() => {
cy.visit('/administrator/index.php?option=com_checkin');
cy.searchForItem('content');
cy.checkAllResults();
cy.get('#toolbar-checkin').click();
cy.get('#system-message-container').contains('Item checked in').should('exist');
});
});
});

0 comments on commit fcaeff8

Please sign in to comment.