Skip to content

Commit aa8dd65

Browse files
authored
[5.3][cypress] PHP Warning Undefined array key "parent_id" on POST com_content (joomla#45093)
* set parent_id * jscs
1 parent 7bd454b commit aa8dd65

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/System/integration/api/com_content/Categories.cy.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ describe('Test that content categories API endpoint', () => {
1717
});
1818

1919
it('can create a category', () => {
20-
cy.api_post('/content/categories', { title: 'automated test content category', description: 'automated test content category description' })
20+
cy.api_post('/content/categories', {
21+
title: 'automated test content category',
22+
description: 'automated test content category description',
23+
parent_id: 1,
24+
extension: 'com_content',
25+
})
2126
.then((response) => {
2227
cy.wrap(response).its('body').its('data').its('attributes')
2328
.its('title')
@@ -30,7 +35,10 @@ describe('Test that content categories API endpoint', () => {
3035

3136
it('can update a category', () => {
3237
cy.db_createCategory({ title: 'automated test content category', extension: 'com_content' })
33-
.then((id) => cy.api_patch(`/content/categories/${id}`, { title: 'updated automated test content category', description: 'automated test content category description' }))
38+
.then((id) => cy.api_patch(`/content/categories/${id}`, {
39+
title: 'updated automated test content category',
40+
description: 'automated test content category description',
41+
}))
3442
.then((response) => {
3543
cy.wrap(response).its('body').its('data').its('attributes')
3644
.its('title')

0 commit comments

Comments
 (0)