Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max out smarty grumpiness in unit tests - obviously failed - need to figure out why (tests should have failed) #22405

Closed
wants to merge 5 commits into from

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Max out smarty grumpiness in unit tests

Before

Happy smarty

After

Frowny smarty

Technical Details

Comments

@civibot
Copy link

civibot bot commented Jan 7, 2022

(Standard links)

@civibot civibot bot added the master label Jan 7, 2022
@eileenmcnaughton eileenmcnaughton changed the title Max out smarty grumpiness in unit tests Max out smarty grumpiness in unit tests - obviously failed - need to figure out why (tests should have failed) Jan 7, 2022
@eileenmcnaughton eileenmcnaughton force-pushed the mod branch 3 times, most recently from 1f2f359 to 1d422e1 Compare January 8, 2022 04:06
* @return bool
*/
private static function isTestEnvironment(): bool {
return CRM_Core_Config::singleton()->userFramework === 'CRM_Utils_System_UnitTests';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? Would it just be 'UnitTests'?

Copy link
Contributor

@demeritcowboy demeritcowboy Jan 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also bootstrap defines CIVICRM_TEST and I've seen that used elsewhere, and so also works when running in a real CMS.

@demeritcowboy
Copy link
Contributor

demeritcowboy commented Jan 16, 2022

Just looking at the log so far this broke jenkins while still at the letter "A", so most of the CRM_ tests didn't run.

👍 ⭐

@eileenmcnaughton
Copy link
Contributor Author

Looks like it started failing here

not ok 224 - Error: CRM_Case_BAO_CaseTest::testCaseActivity
not ok 225 - Error: CRM_Case_BAO_CaseTest::testAddCaseToContact
not ok 226 - Error: CRM_Case_BAO_CaseTest::testSortByCaseContact

@demeritcowboy
Copy link
Contributor

I see not ok 165 - Error: CRM_Activity_Form_ActivityTest::testActivityCreate

@eileenmcnaughton
Copy link
Contributor Author

UG - that one passed for me locally - even running from the start!

There is one known test failing thing open - #22470 is what is blocking tests in #22466 - not sure if that could also affect here

@demeritcowboy
Copy link
Contributor

Ok I can look at 22470.

@eileenmcnaughton
Copy link
Contributor Author

I've found the thing in the activity tests (or at least one thing)

@eileenmcnaughton eileenmcnaughton force-pushed the mod branch 2 times, most recently from 7f795c9 to caa2e20 Compare January 17, 2022 06:38
@eileenmcnaughton
Copy link
Contributor Author

This looks like the current fail -

image

I think #22470 will get past that notice

@eileenmcnaughton
Copy link
Contributor Author

currently falling over on the isset on totalTaxAmount in the contribution template - this value could be cast from the {contribution.tax_amount} token - but needs to be assigned in an unformatted style #22547 would be the pre-requisite to fixing

@eileenmcnaughton
Copy link
Contributor Author

ok - this would fix the current fail #22560

The empty check on templateSelected was added to stop tests failing on a smarty notice.

However, this still causes a smarty notice (and test fails) in grumpy smarty mode.

Hence this re-fixes in by moving the check to only be done for the from
(the sms Upload form) that assigns it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants