Unit/System Tests No Code Attached Yet bug
avatar brianteeman
brianteeman
14 Dec 2023

Steps to reproduce the issue

Run the e2e cypress test for frontend->com_users->remind

Expected result

no errors

Actual result

can send a reminder email for a test user in a menu item

TypeError
Cannot read properties of undefined (reading 'body')
[tests/System/integration/site/components/com_users/Remind.cy.js:19:28](https://j5.test/__/#)
  17 | 
  18 |           cy.wrap(mails).should('have.lengthOf', 1);
> 19 |           cy.wrap(mails[0].body).should('have.string', 'A username reminder has been requested');
     |                            ^
  20 |           cy.wrap(mails[0].body).should('have.string', '/test-reminder');
  21 |           cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
  22 |           cy.wrap(mails[0].receivers).should('have.property', 'test@example.com');

can send a reminder email for a test user without a menu item

TypeError
Cannot read properties of undefined (reading 'body')
[tests/System/integration/site/components/com_users/Remind.cy.js:38:28](https://j5.test/__/#)
  36 | 
  37 |           cy.wrap(mails).should('have.lengthOf', 1);
> 38 |           cy.wrap(mails[0].body).should('have.string', 'A username reminder has been requested');
     |                            ^
  39 |           cy.wrap(mails[0].body).should('have.string', '/component/users/login');
  40 |           cy.wrap(mails[0].sender).should('equal', Cypress.env('email'));
  41 |           cy.wrap(mails[0].receivers).should('have.property', 'test@example.com');

System information (as much as possible)

php 8.1.3
joomla 5.1branch

Additional comments

avatar brianteeman brianteeman - open - 14 Dec 2023
avatar joomla-cms-bot joomla-cms-bot - change - 14 Dec 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Dec 2023
avatar alikon alikon - change - 3 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-03 07:11:15
Closed_By alikon
avatar alikon alikon - close - 3 Mar 2024
avatar alikon
alikon - comment - 3 Mar 2024

Closing this issue now, has been resolved elsewhere
but feel free to reopen if needed.

avatar brianteeman
brianteeman - comment - 3 Mar 2024

No - not resolved

avatar alikon alikon - change - 3 Mar 2024
Status Closed New
Closed_Date 2024-03-03 07:11:15
Closed_By alikon
avatar alikon alikon - reopen - 3 Mar 2024
avatar alikon
alikon - comment - 3 Mar 2024

i'm unable to reproduce nor drone

avatar Hackwar Hackwar - change - 26 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 26 Mar 2024
avatar alikon alikon - change - 17 May 2024
Labels Added: Unit/System Tests
avatar alikon alikon - labeled - 17 May 2024
avatar brianteeman brianteeman - close - 20 May 2024
avatar brianteeman
brianteeman - comment - 20 May 2024

The problem was that the tests require
public $mailer = 'smtp';
public $smtphost = 'localhost';
public $smtpport = 1025;

avatar brianteeman brianteeman - change - 20 May 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-05-20 11:22:23
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment