run the cypress e2e tests for frontend->com_privacy->request
all 6 tests for Test in frontend that the privacy request view pass
all 6 tests fail - examples below
can submit an information request of type export without a menu item
TypeError
Cannot read properties of undefined (reading 'sender')
[tests/System/integration/site/components/com_privacy/Request.cy.js:33:28](https://j5.test/__/#)
31 | cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
32 | cy.wrap(mails).should('have.lengthOf', 2);
> 33 | cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
| ^
34 | cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
35 | cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to export all personal information related to this email address at ');
36 | });
can submit an information request of type remove without a menu item
TypeError
Cannot read properties of undefined (reading 'sender')
[tests/System/integration/site/components/com_privacy/Request.cy.js:65:28](https://j5.test/__/#)
63 | cy.get('.alert-message').should('contain.text', 'Your information request has been created. Before it can be processed, you must verify this request. An email has been sent to your address with additional instructions to complete this verification.');
64 | cy.wrap(mails).should('have.lengthOf', 2);
> 65 | cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
| ^
66 | cy.wrap(mails[0].body).should('have.string', `A new information request has been submitted by ${Cypress.env('email')}.`);
67 | cy.wrap(mails[1].body).should('have.string', 'Someone has created a request to remove all personal information related to this email address at ');
68 | });
can verify link sent to user is valid
TypeError
Cannot read properties of undefined (reading 'body')
[tests/System/integration/site/components/com_privacy/Request.cy.js:96:28](https://j5.test/__/#)
94 |
95 | cy.task('getMails').then((mails) => {
> 96 | const str = mails[1].body;
| ^
97 |
98 | const firstSplitURL = str.split('paste your token into the form.\n')[1];
99 | const secondSplitURL = firstSplitURL.split('URL: ')[1];
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-03 07:10:49 |
Closed_By | ⇒ | alikon |
No not resolved
Status | Closed | ⇒ | New |
Closed_Date | 2024-03-03 07:10:49 | ⇒ | |
Closed_By | alikon | ⇒ |
i'm unable to reproduce nor drone
Labels |
Added:
bug
|
yes, @alikon and me are working on it; it is probably the same cause as in #42515; it is most likely related to smtp-tester
which is used in Cypress JavaScript to stub SMTP; we therefore check all five specs with mail usage:
I cannot reproduce the failures on macOS local or macOS docker and continue to work on Ubuntu docker first and Windows next. On the way implementing and testing my docker installation I saw exactly such kind of errors always if the SMTP stub is not reachable.
Which environment are you using for testing?
Which environment are you using for testing?
Windows 11 using laragon as my amp stack
yeah, these six tests also fail on Ubuntu-docker with TypeError: Cannot read properties of undefined (reading 'sender/body') ?
thanks for confirming.
I wonder why they dont fail on drone when run there. OR maybe they are not running
not sure what is the root cause honestly, on laragon which i've discovered recently, fail ,whatever, settings you set or at least in my tests, if it fail on ubuntu too....
some times ago i've had an image in wich all works like in drone ... but forgot settings
the entire point of tests is that they should produce the same results on all supported environments
yeah, these six tests also fail on Ubuntu-docker with TypeError: Cannot read properties of undefined (reading 'sender/body') ?
Unfortunately, I can't confirm myself ? After also scripting the Ubuntu configuration and setting up a new VPS, the five 'smtp-tester'-related tests are now running without problems on ubuntu-docker. I verified this with one more VPS (more powerful, 8-cores, CPU-optimised) – in ubunto-docker there are no problems with the 5 specs. I suspect my fault was due to the Ubuntu firewall as the port for SMTP needs to be open and I was somehow too focussed to see the error. However, I have ordered a Windows 11 miniPC and will repeat the test with laragon ... ?
with my new miniPC tested on Windows 11 / Laragon / PHP 8.1 / joomla-cms branch 5.1-dev
npm run cypress:run -- --spec tests\System\integration\site\components\com_privacy\Request.cy.js
As I cannot reproduce the problem, I will discuss in next ATT call how to proceed.
Labels |
Added:
Unit/System Tests
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-20 11:24:59 |
Closed_By | ⇒ | brianteeman |
The problem was that the tests require
public $mailer = 'smtp';
public $smtphost = 'localhost';
public $smtpport = 1025;
Closing this issue now, has been resolved elsewhere
but feel free to reopen if needed.