From ef0eac771b1a47100074e93ef347b7dfade8533f Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Sat, 26 Aug 2023 18:16:46 -0400 Subject: [PATCH 01/13] Update Categories.cy.js --- .../integration/api/com_banners/Categories.cy.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/System/integration/api/com_banners/Categories.cy.js b/tests/System/integration/api/com_banners/Categories.cy.js index 66f54b16f50a5..77781890ba873 100644 --- a/tests/System/integration/api/com_banners/Categories.cy.js +++ b/tests/System/integration/api/com_banners/Categories.cy.js @@ -17,10 +17,15 @@ describe('Test that banners categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/banners/categories', { title: 'automated test banner category' }) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test banner category')); + cy.api_post('/banners/categories', { title: 'automated test banner category', description: 'automated test banner category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test banner category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test banner category description'); + }) }); it('can update a category', () => { From b87952f5db0e55feda489a1a35ddbf45d62ad6b3 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Sat, 26 Aug 2023 18:17:56 -0400 Subject: [PATCH 02/13] Update Categories.cy.js --- .../api/com_contact/Categories.cy.js | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tests/System/integration/api/com_contact/Categories.cy.js b/tests/System/integration/api/com_contact/Categories.cy.js index 78093a74b6635..e32ee19ad764d 100644 --- a/tests/System/integration/api/com_contact/Categories.cy.js +++ b/tests/System/integration/api/com_contact/Categories.cy.js @@ -17,17 +17,27 @@ describe('Test that contact categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/contacts/categories', { title: 'automated test contact category' }) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test contact category')); + cy.api_post('/contacts/categories', { title: 'automated test contact category', description: 'automated test contact category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test contact category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test contact category description'); + }) }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test contact category', extension: 'com_contact' }) - .then((id) => cy.api_patch(`/contacts/categories/${id}`, { title: 'updated automated test contact category' })) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test contact category')); + .then((id) => cy.api_patch(`/contacts/categories/${id}`, { title: 'updated automated test contact category', description: 'automated test contact category description' })) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test contact category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test contact category description'); + }) }); }); From d267d537ff8e1e88714ef1e4d45933994c922697 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Sat, 26 Aug 2023 18:19:05 -0400 Subject: [PATCH 03/13] Update Categories.cy.js --- .../api/com_content/Categories.cy.js | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/tests/System/integration/api/com_content/Categories.cy.js b/tests/System/integration/api/com_content/Categories.cy.js index ae7629fe3a27e..c75401205cb54 100644 --- a/tests/System/integration/api/com_content/Categories.cy.js +++ b/tests/System/integration/api/com_content/Categories.cy.js @@ -17,17 +17,27 @@ describe('Test that content categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/content/categories', { title: 'automated test content category' }) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test content category')); + cy.api_post('/content/categories', { title: 'automated test content category', description: 'automated test content category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test content category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test content category description'); + }) }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test content category', extension: 'com_content' }) - .then((id) => cy.api_patch(`/content/categories/${id}`, { title: 'updated automated test content category' })) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test content category')); + .then((id) => cy.api_patch(`/content/categories/${id}`, { title: 'updated automated test content category', description: 'automated test content category description' })) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test content category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test content category description'); + }) }); }); From ca63fe26ded4d5bbc265603a829fc3edbf0007b0 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Sat, 26 Aug 2023 18:20:49 -0400 Subject: [PATCH 04/13] Update Categories.cy.js --- .../api/com_newsfeed/Categories.cy.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/System/integration/api/com_newsfeed/Categories.cy.js b/tests/System/integration/api/com_newsfeed/Categories.cy.js index 3174fb9abb1f9..2e6d05f0ae9b2 100644 --- a/tests/System/integration/api/com_newsfeed/Categories.cy.js +++ b/tests/System/integration/api/com_newsfeed/Categories.cy.js @@ -5,4 +5,37 @@ describe('Test that newsfeed categories API endpoint', () => { .then(() => cy.api_get('/newsfeeds/categories')) .then((response) => cy.api_responseContains(response, 'title', 'automated test category')); }); + + it('can display a single category', () => { + cy.db_createCategory({ title: 'automated test feed category', extension: 'com_newsfeeds' }) + .then((id) => cy.api_get(`/newsfeeds/categories/${id}`)) + .then((response) => cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test feed category')); + }); + + it('can create a category', () => { + cy.api_post('/newsfeeds/categories', { title: 'automated test feed category', description: 'automated test feed category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test feed category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test feed category description'); + }) + }); + + it('can update a category', () => { + cy.db_createCategory({ title: 'automated test feed category', extension: 'com_newsfeeds' }) + .then((id) => cy.api_patch(`/newsfeeds/categories/${id}`, { title: 'updated automated test feed category', description: 'automated test feed category description' })) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test feed category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test feed category description'); + }) + }); }); From c73920aba7b49c7017c7ff59d458c7d20967e5cc Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Sat, 26 Aug 2023 18:25:10 -0400 Subject: [PATCH 05/13] Update Categories.cy.js --- .../integration/api/com_banners/Categories.cy.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/System/integration/api/com_banners/Categories.cy.js b/tests/System/integration/api/com_banners/Categories.cy.js index 77781890ba873..0d77e854fa1c7 100644 --- a/tests/System/integration/api/com_banners/Categories.cy.js +++ b/tests/System/integration/api/com_banners/Categories.cy.js @@ -30,9 +30,14 @@ describe('Test that banners categories API endpoint', () => { it('can update a category', () => { cy.db_createCategory({ title: 'automated test banner category', extension: 'com_banners' }) - .then((id) => cy.api_patch(`/banners/categories/${id}`, { title: 'updated automated test banner category' })) - .then((response) => cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test banner category')); + .then((id) => cy.api_patch(`/banners/categories/${id}`, { title: 'updated automated test banner category', description: 'automated test banner category description' })) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test banner category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test banner category description'); + }) }); }); From ae7e60afe348e8360effce83ef86da2073eb25f1 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:05:39 -0400 Subject: [PATCH 06/13] Update Categories.cy.js added spaces and semicolons --- .../api/com_banners/Categories.cy.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/System/integration/api/com_banners/Categories.cy.js b/tests/System/integration/api/com_banners/Categories.cy.js index 0d77e854fa1c7..f1a5dadcadf2d 100644 --- a/tests/System/integration/api/com_banners/Categories.cy.js +++ b/tests/System/integration/api/com_banners/Categories.cy.js @@ -17,27 +17,27 @@ describe('Test that banners categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/banners/categories', { title: 'automated test banner category', description: 'automated test banner category description' }) - .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test banner category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test banner category description'); - }) + cy.api_post('/banners/categories', { title: 'automated test banner category', description: 'automated test banner category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test banner category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test banner category description'); + }); }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test banner category', extension: 'com_banners' }) .then((id) => cy.api_patch(`/banners/categories/${id}`, { title: 'updated automated test banner category', description: 'automated test banner category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test banner category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test banner category description'); - }) + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test banner category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test banner category description'); + }); }); }); From da515e74aa0dfb2d7be39723a609862cbdfe1d5b Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:08:47 -0400 Subject: [PATCH 07/13] Update Categories.cy.js Missing spaces and semicolons --- .../api/com_contact/Categories.cy.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/System/integration/api/com_contact/Categories.cy.js b/tests/System/integration/api/com_contact/Categories.cy.js index e32ee19ad764d..36516431bb58f 100644 --- a/tests/System/integration/api/com_contact/Categories.cy.js +++ b/tests/System/integration/api/com_contact/Categories.cy.js @@ -17,27 +17,27 @@ describe('Test that contact categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/contacts/categories', { title: 'automated test contact category', description: 'automated test contact category description' }) - .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test contact category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test contact category description'); - }) + cy.api_post('/contacts/categories', { title: 'automated test contact category', description: 'automated test contact category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test contact category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test contact category description'); + }); }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test contact category', extension: 'com_contact' }) .then((id) => cy.api_patch(`/contacts/categories/${id}`, { title: 'updated automated test contact category', description: 'automated test contact category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test contact category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test contact category description'); - }) + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test contact category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test contact category description'); + }); }); }); From 71bbf0db12e3e76208eb4258b665852fd4bbd5ad Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:10:24 -0400 Subject: [PATCH 08/13] Update Categories.cy.js Missing spaces and semicolons --- .../api/com_content/Categories.cy.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/System/integration/api/com_content/Categories.cy.js b/tests/System/integration/api/com_content/Categories.cy.js index c75401205cb54..6fa68e50ea2c3 100644 --- a/tests/System/integration/api/com_content/Categories.cy.js +++ b/tests/System/integration/api/com_content/Categories.cy.js @@ -17,27 +17,27 @@ describe('Test that content categories API endpoint', () => { }); it('can create a category', () => { - cy.api_post('/content/categories', { title: 'automated test content category', description: 'automated test content category description' }) - .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test content category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test content category description'); - }) + cy.api_post('/content/categories', { title: 'automated test content category', description: 'automated test content category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test content category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test content category description'); + }); }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test content category', extension: 'com_content' }) .then((id) => cy.api_patch(`/content/categories/${id}`, { title: 'updated automated test content category', description: 'automated test content category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test content category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test content category description'); - }) + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test content category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test content category description'); + }); }); }); From 509b9b0cf92527c144e6bbfa5653c110eea3cce3 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:12:21 -0400 Subject: [PATCH 09/13] Update Categories.cy.js Missing spaces and semicolons --- .../api/com_newsfeed/Categories.cy.js | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/System/integration/api/com_newsfeed/Categories.cy.js b/tests/System/integration/api/com_newsfeed/Categories.cy.js index 2e6d05f0ae9b2..d2f3d6c41c581 100644 --- a/tests/System/integration/api/com_newsfeed/Categories.cy.js +++ b/tests/System/integration/api/com_newsfeed/Categories.cy.js @@ -13,29 +13,29 @@ describe('Test that newsfeed categories API endpoint', () => { .its('title') .should('include', 'automated test feed category')); }); - + it('can create a category', () => { - cy.api_post('/newsfeeds/categories', { title: 'automated test feed category', description: 'automated test feed category description' }) - .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'automated test feed category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test feed category description'); - }) + cy.api_post('/newsfeeds/categories', { title: 'automated test feed category', description: 'automated test feed category description' }) + .then((response) => { + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'automated test feed category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test feed category description'); + }); }); it('can update a category', () => { cy.db_createCategory({ title: 'automated test feed category', extension: 'com_newsfeeds' }) .then((id) => cy.api_patch(`/newsfeeds/categories/${id}`, { title: 'updated automated test feed category', description: 'automated test feed category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') - .its('title') - .should('include', 'updated automated test feed category'); - cy.wrap(response).its('body').its('data').its('attributes') - .its('description') - .should('include', 'automated test feed category description'); - }) + cy.wrap(response).its('body').its('data').its('attributes') + .its('title') + .should('include', 'updated automated test feed category'); + cy.wrap(response).its('body').its('data').its('attributes') + .its('description') + .should('include', 'automated test feed category description'); + }); }); }); From a065d33fc17ab2711777b26d19c328c4ddd723c9 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:21:31 -0400 Subject: [PATCH 10/13] Update Categories.cy.js removed tabs --- tests/System/integration/api/com_banners/Categories.cy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/System/integration/api/com_banners/Categories.cy.js b/tests/System/integration/api/com_banners/Categories.cy.js index f1a5dadcadf2d..20d30909877db 100644 --- a/tests/System/integration/api/com_banners/Categories.cy.js +++ b/tests/System/integration/api/com_banners/Categories.cy.js @@ -32,12 +32,12 @@ describe('Test that banners categories API endpoint', () => { cy.db_createCategory({ title: 'automated test banner category', extension: 'com_banners' }) .then((id) => cy.api_patch(`/banners/categories/${id}`, { title: 'updated automated test banner category', description: 'automated test banner category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('title') .should('include', 'updated automated test banner category'); - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('description') .should('include', 'automated test banner category description'); - }); + }); }); }); From 1ceac2da5fd473f8314cc3c7e6cdbfd2b79cb416 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:22:03 -0400 Subject: [PATCH 11/13] Update Categories.cy.js Removed tabs --- tests/System/integration/api/com_contact/Categories.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/System/integration/api/com_contact/Categories.cy.js b/tests/System/integration/api/com_contact/Categories.cy.js index 36516431bb58f..83478d45d09a1 100644 --- a/tests/System/integration/api/com_contact/Categories.cy.js +++ b/tests/System/integration/api/com_contact/Categories.cy.js @@ -32,10 +32,10 @@ describe('Test that contact categories API endpoint', () => { cy.db_createCategory({ title: 'automated test contact category', extension: 'com_contact' }) .then((id) => cy.api_patch(`/contacts/categories/${id}`, { title: 'updated automated test contact category', description: 'automated test contact category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('title') .should('include', 'updated automated test contact category'); - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('description') .should('include', 'automated test contact category description'); }); From c9bd7a8fa938be834215ff49ada30fba1a038dd5 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:22:33 -0400 Subject: [PATCH 12/13] Update Categories.cy.js Removed tabs --- tests/System/integration/api/com_content/Categories.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/System/integration/api/com_content/Categories.cy.js b/tests/System/integration/api/com_content/Categories.cy.js index 6fa68e50ea2c3..a3dc570774889 100644 --- a/tests/System/integration/api/com_content/Categories.cy.js +++ b/tests/System/integration/api/com_content/Categories.cy.js @@ -32,10 +32,10 @@ describe('Test that content categories API endpoint', () => { cy.db_createCategory({ title: 'automated test content category', extension: 'com_content' }) .then((id) => cy.api_patch(`/content/categories/${id}`, { title: 'updated automated test content category', description: 'automated test content category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('title') .should('include', 'updated automated test content category'); - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('description') .should('include', 'automated test content category description'); }); From ba53e4048d97eb1bb08ac10b6c51be12d1b2afb2 Mon Sep 17 00:00:00 2001 From: Olivier Buisard Date: Fri, 1 Sep 2023 11:23:03 -0400 Subject: [PATCH 13/13] Update Categories.cy.js Removed tabs --- tests/System/integration/api/com_newsfeed/Categories.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/System/integration/api/com_newsfeed/Categories.cy.js b/tests/System/integration/api/com_newsfeed/Categories.cy.js index d2f3d6c41c581..3f323ceafc83b 100644 --- a/tests/System/integration/api/com_newsfeed/Categories.cy.js +++ b/tests/System/integration/api/com_newsfeed/Categories.cy.js @@ -30,10 +30,10 @@ describe('Test that newsfeed categories API endpoint', () => { cy.db_createCategory({ title: 'automated test feed category', extension: 'com_newsfeeds' }) .then((id) => cy.api_patch(`/newsfeeds/categories/${id}`, { title: 'updated automated test feed category', description: 'automated test feed category description' })) .then((response) => { - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('title') .should('include', 'updated automated test feed category'); - cy.wrap(response).its('body').its('data').its('attributes') + cy.wrap(response).its('body').its('data').its('attributes') .its('description') .should('include', 'automated test feed category description'); });