User tests: Successful: 0 Unsuccessful: 0
add a test for Categories wise view of contacts in com_contact.
Category | ⇒ | JavaScript Unit Tests |
Status | New | ⇒ | Pending |
Did you forget to commit the come in the db.js file? Also rename the function to db_createCategory as it creates only one category.
Sorry My bad.
Labels |
Added:
?
PR-4.4-dev
|
There are also some code style issues.
The code to open the page must also be in a then statement, otherwise you can run into async issues, so something liek this should work (didn't test it actually and there are cs issues):
describe('Test that the Catagories of com_contact ', () => {
it('can display a list of categories of contacts in menu item', () => {
cy.db_createCategory({ title: 'automated test category 1', extension: 'com_contact' })
.then((id) => cy.db_createContact({ name: 'automated test contact 1', catid: id }))
.then() => cy.db_createCategory({ title: 'automated test category 2', extension: 'com_contact' })
.then((id) => {
cy.db_createContact({ name: 'automated test contact 2', catid: id });
cy.db_createContact({ name: 'automated test contact 3', catid: id });
}). then(() => {
cy.visit('index.php?option=com_contact&view=categories&id=0');
cy.contains('automated test category 1');
cy.contains('automated test category 2');
cy.get(':nth-child(2) > .page-header > .badge').contains('Contact Count: 1');
cy.get(':nth-child(3) > .page-header > .badge').contains('Contact Count: 2');
});
});
});
The test fails because you need to add some more default values to the db_createCategory function
The test fails because you need to add some more default values to the db_createCategory function
Added more default values but don't know why still checks are failing?
Restartet drone, probably a server issue
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-03-28 13:51:38 |
Closed_By | ⇒ | laoneo |
Thanks!
Thanks a lot for merging it.
Did you forget to commit the come in the db.js file? Also rename the function to db_createCategory as it creates only one category.