Code Monkey home page Code Monkey logo

Comments (13)

adayIvey avatar adayIvey commented on July 18, 2024

Setting the CurrencyIsoCode = 'USD' when the account data is created in the test fixed the issue for me

List accountList = new List
{
new Account(Name='TestAccount2',AccountNumber='A2',AnnualRevenue=12345.67, CurrencyIsoCode = 'USD'),
new Account(Name='TestAccount1',AccountNumber='A1',AnnualRevenue=76543.21, CurrencyIsoCode = 'USD')
};

from fflib-apex-common.

ImJohnMDaniel avatar ImJohnMDaniel commented on July 18, 2024

Thanks for the update @adayIvey. Glad to hear that you were able to resolve your issue. Cheers!

from fflib-apex-common.

adayIvey avatar adayIvey commented on July 18, 2024

While I did resolve my issue I think the test should be updated to include a currency code when creating Account Data

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

Sounds like a reasonable and simple test improvement that would shield users from a nuisance test failure.

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

Hi @adayIvey,
I'm having difficulty reproducing your issue. Would you, please, send me a screenshot of your Manage Currencies page so that I recreate that in a scratch org?

from fflib-apex-common.

adayIvey avatar adayIvey commented on July 18, 2024

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

Hi again @adayIvey,
For some reason, your reply came through unreadable. Here's what I see on the Github site.
image

from fflib-apex-common.

adayIvey avatar adayIvey commented on July 18, 2024
image




image

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

@adayIvey
I created a scratch org from this project's multi-currency definition and configured as depicted above, yet all FFLIB tests complete and pass.

image

Are there other multicurrency configurations that might help me to reproduce the issue that you're seeing? It's obvious you're experiencing something; we just need to identify the culprit for reproducibility.

Thanks!

from fflib-apex-common.

adayIvey avatar adayIvey commented on July 18, 2024

sorry for the late reply but tbh I am not sure what else I can say to help

but I did just try deploying into our production org from github and I get this error

`Status: Completed
Deployment CompleteTest failure, method: fflib_SObjectSelectorTest.testQueryLocatorById -- System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9038.49 stack Class.fflib_SObjectSelectorTest.testQueryLocatorById: line 88, column 1

Test failure, method: fflib_SObjectSelectorTest.testSelectSObjectsById -- System.AssertException: Assertion Failed: Expected: 12345.67, Actual: 9038.49 stack Class.fflib_SObjectSelectorTest.testSelectSObjectsById: line 61, column 1

labels/CustomLabels.labels`

Screenshot 2024-06-26 143258

to get around this I want to try and deploy it manually from from a sandbox where I have updated the test that is causing me issues and I have tried using changesets or vscode and I get issues. Is there a specific way I need to deploy these files (I have already deployed the Apex Mocks classes)

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

@adayIvey
I have all confidence that something is causing an incompatibility with FFLIB in your orgs, but I can't condone a presumptive fix without an ability to reproduce the error and attribute it to a shortcoming in FFLIB. Again, I'm happy to pursue this further with more information. With that said, I'll take your latest screenshot and further attempt to reproduce the issue, especially with the corporate currency being the Canadian Dollar.

Aye? 😁

from fflib-apex-common.

adayIvey avatar adayIvey commented on July 18, 2024

thanks, if you have any ideas on additional info I can provide I will just ask

from fflib-apex-common.

stohn777 avatar stohn777 commented on July 18, 2024

@adayIvey,
If you're adept with scratch orgs, the best path would be determining the key configuration facet, from your SF environments, that causes that unit test to fail in one of this repo's multi-currency scratch orgs. Otherwise, further progress will likely be delayed pending my availability to experiment further.

from fflib-apex-common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.