Skip to content

Commit d05ab9d

Browse files
Reverse Router.cy.js & Fix unwritable config after Cypress tests
1 parent 9164c66 commit d05ab9d

File tree

3 files changed

+17
-32
lines changed

3 files changed

+17
-32
lines changed

.devcontainer/post-create.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ service apache2 restart
124124
echo "--> Applying final group ownership and permissions..."
125125
chgrp -R www-data $JOOMLA_ROOT
126126
chmod -R g+rws $JOOMLA_ROOT
127+
chown www-data:www-data configuration.php
127128

128129
echo "✅ Environment finalized."
129130

tests/System/integration/site/components/com_contact/Router.cy.js

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,16 @@ describe('Test in frontend that the contact site router', () => {
4444
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
4545
});
4646
cy.request({ url: `/index.php?option=com_contact&view=contact&id=${contact.id}-${contact.alias}`, followRedirect: false }).then((response) => {
47-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
48-
expect(response.status).to.eq(200);
49-
// expect(response.status).to.eq(301);
50-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
47+
expect(response.status).to.eq(301);
48+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
5149
});
5250
cy.request({ url: `/index.php?option=com_contact&view=contact&id=${contact.id}&catid=${contact.catid}`, followRedirect: false }).then((response) => {
53-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
54-
expect(response.status).to.eq(200);
55-
// expect(response.status).to.eq(301);
56-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
51+
expect(response.status).to.eq(301);
52+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
5753
});
5854
cy.request({ url: `/index.php?option=com_contact&view=contact&id=${contact.id}-${contact.alias}&catid=${contact.catid}`, followRedirect: false }).then((response) => {
59-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
60-
expect(response.status).to.eq(200);
61-
// expect(response.status).to.eq(301);
62-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
55+
expect(response.status).to.eq(301);
56+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
6357
});
6458

6559
cy.visit(url);
@@ -87,10 +81,8 @@ describe('Test in frontend that the contact site router', () => {
8781
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
8882
});
8983
cy.request({ url: `/index.php?option=com_contact&view=contact&id=${contact.id}-${contact.alias}&catid=${contact.catid}`, followRedirect: false }).then((response) => {
90-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
91-
expect(response.status).to.eq(200);
92-
// expect(response.status).to.eq(301);
93-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
84+
expect(response.status).to.eq(301);
85+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
9486
});
9587

9688
cy.visit(url.split('/').slice(0, -1).join('/'));

tests/System/integration/site/components/com_content/Router.cy.js

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,16 @@ describe('Test in frontend that the content site router', () => {
4343
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
4444
});
4545
cy.request({ url: `/index.php?option=com_content&view=article&id=${article.id}-${article.alias}`, followRedirect: false }).then((response) => {
46-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
47-
expect(response.status).to.eq(200);
48-
// expect(response.status).to.eq(301);
49-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
46+
expect(response.status).to.eq(301);
47+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
5048
});
5149
cy.request({ url: `/index.php?option=com_content&view=article&id=${article.id}&catid=${article.catid}`, followRedirect: false }).then((response) => {
52-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
53-
expect(response.status).to.eq(200);
54-
// expect(response.status).to.eq(301);
55-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
50+
expect(response.status).to.eq(301);
51+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
5652
});
5753
cy.request({ url: `/index.php?option=com_content&view=article&id=${article.id}-${article.alias}&catid=${article.catid}`, followRedirect: false }).then((response) => {
58-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
59-
expect(response.status).to.eq(200);
60-
// expect(response.status).to.eq(301);
61-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
54+
expect(response.status).to.eq(301);
55+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
6256
});
6357

6458
cy.visit(url);
@@ -85,10 +79,8 @@ describe('Test in frontend that the content site router', () => {
8579
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
8680
});
8781
cy.request({ url: `/index.php?option=com_content&view=article&id=${article.id}-${article.alias}&catid=${article.catid}`, followRedirect: false }).then((response) => {
88-
// @TODO: The following line is just a temporary fix. Remove it and uncomment the 2 lines after it when done.
89-
expect(response.status).to.eq(200);
90-
// expect(response.status).to.eq(301);
91-
// expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
82+
expect(response.status).to.eq(301);
83+
expect(response.redirectedToUrl).to.match(new RegExp(`${url}$`));
9284
});
9385

9486
cy.visit(url.split('/').slice(0, -1).join('/'));

0 commit comments

Comments
 (0)