What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi everybody, I'm trying to test a class that depends on a Glue-Resource (ProductsRestApi). When try

U01660GHSTT
U01660GHSTT Posts: 80 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi everybody,
I'm trying to test a class that depends on a Glue-Resource (ProductsRestApi). When trying to create that object I get an error: Could not map method "resource" to a locator. Seems that there is a ResourceLocator missing, isn't it?
I'm wondering how it is possible to add this Locator.

Comments

  • U01660GHSTT
    U01660GHSTT Posts: 80 πŸ§‘πŸ»β€πŸš€ - Cadet

    Is there any reason why the Glue-Container in the test environment doesn't have a ResourceLocator? Maybe this is done on purpose?
    I ask myself if I'm doing things wrong in general here.

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Marcel!

    You cannot access Resource in tests, right?

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    If so, I can confirm that ResourceLocator is really missing from the LocatorHelper.
    I’m not aware of any intention behind it, so I would add ResourceLocator to the list.

  • U01660GHSTT
    U01660GHSTT Posts: 80 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Eugenia, thanks. Yeah right, the ResourceLocator is missing.
    What is the list you're talking about? (Sorry if this is a dumb question. I'm fairly new to spryker and codeception πŸ˜‰ )

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi!

    I’m talking about the list in this method: \Spryker\Zed\Testify\Locator\Business\BusinessLocator::getBundleProxy()

    I’ll also open up an issue to fix this in the core.