Skip to content

Commit e6d204c

Browse files
authored
Completed some missing test in components (#40769)
1 parent b777e56 commit e6d204c

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

tests/System/integration/administrator/components/com_banners/Banner.cy.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,14 @@ describe('Test in backend that the banners form', () => {
1818

1919
cy.wait('@listview');
2020
});
21+
22+
it('can edit a banner', () => {
23+
cy.db_createBanner({ name: 'Test Banner' }).then((id) => {
24+
cy.visit(`administrator/index.php?option=com_banners&task=banner.edit&id=${id}`);
25+
cy.get('#jform_name').clear().type('Test banner edited');
26+
cy.clickToolbarButton('Save & Close');
27+
28+
cy.contains('Test banner edited');
29+
});
30+
});
2131
});

tests/System/integration/administrator/components/com_categories/Category.cy.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ describe('Test in backend that the category form', () => {
1111
cy.contains('Test category');
1212
});
1313

14+
it('can change access level of a test category', () => {
15+
cy.db_createCategory({ title: 'Test category' }).then((id) => {
16+
cy.visit(`administrator/index.php?option=com_categories&task=category.edit&id=${id}&extension=com_content`);
17+
cy.get('#jform_access').select('Special');
18+
cy.clickToolbarButton('Save & Close');
19+
20+
cy.get('td').contains('Special').should('exist');
21+
});
22+
});
23+
1424
it('check redirection to list view', () => {
1525
cy.visit('administrator/index.php?option=com_categories&task=category.add&extension=com_content');
1626
cy.intercept('index.php?option=com_categories&view=categories&extension=com_content').as('listview');

tests/System/integration/administrator/components/com_fields/Field.cy.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ describe('Test in backend that the field form', () => {
1111
cy.contains('Test field');
1212
});
1313

14+
it('check redirection to list view', () => {
15+
cy.visit('administrator/index.php?option=com_fields&task=field.add&context=com_content.article');
16+
cy.intercept('index.php?option=com_fields&view=fields&context=com_content.article').as('listview');
17+
cy.clickToolbarButton('Cancel');
18+
19+
cy.wait('@listview');
20+
});
21+
1422
it('can edit a field', () => {
1523
cy.db_createField({ title: 'Test field' }).then((id) => {
1624
cy.visit(`administrator/index.php?option=com_fields&task=field.edit&id=${id}&context=com_content.article`);

tests/System/integration/administrator/components/com_tags/Tag.cy.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@ describe('Test in backend that the tag form', () => {
2020
cy.contains('Test tag edited');
2121
});
2222
});
23+
24+
it('check redirection to list view', () => {
25+
cy.visit('administrator/index.php?option=com_tags&task=tag.add');
26+
cy.intercept('index.php?option=com_tags&view=tags').as('listview');
27+
cy.clickToolbarButton('Cancel');
28+
29+
cy.wait('@listview');
30+
});
2331
});

0 commit comments

Comments
 (0)