Commits

Kuno Vercammen authored 0ded7a4e031
114596: Added e2e tests for item template page
No tags

cypress/e2e/item-template.cy.ts

Added
1 +const ADD_TEMPLATE_ITEM_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/itemtemplate');
2 +
3 +describe('Item Template', () => {
4 + beforeEach(() => {
5 + cy.visit(ADD_TEMPLATE_ITEM_PAGE);
6 + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
7 + });
8 +
9 + it('It should display the elements with specific texts', () => {
10 + cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible');
11 + cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible');
12 + cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible');
13 + cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible');
14 + });
15 +});

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut