Skip to content

Conversation

@jrafanie
Copy link
Member

No description provided.

@jrafanie
Copy link
Member Author

@asirvadAbrahamVarghese can you review this and try it locally?

I see a few problems running it with:

export CYPRESS=true; SPEC=cypress/e2e/ui/Services/Catalogs/copy_catalog.cy.js bundle exec rake spec:cypress
  • Fails to find the catalog item sporadically due to the "undefined method split" for nil... that's a known issue due to the API colliding on the session store... that's ok for now, but does happen.

  • Creating the service template via factories must be different in some way in terms of the node indexes. In this example, which fails fairly often, even through it navigates "all catalog items", and "unassigned" and expands it, it then looks for the item in the sibling to "unassigned", "my catalog" and can't find it and blows up:

image
  • Sometimes it sporadically fails because the tree is still loading and the main div is also still loading:
image

and an ajax tree_autoload happens after it already fails... so it didn't wait for it:
image

Note, we do a tree_select intercept but I don't see one for the tree_autoload.

@asirvadAbrahamVarghese
Copy link
Contributor

asirvadAbrahamVarghese commented Oct 31, 2025

Creating the service template via factories must be different in some way in terms of the node indexes. In this example, which fails fairly often, even through it navigates "all catalog items", and "unassigned" and expands it, it then looks for the item in the sibling to "unassigned", "my catalog" and can't find it and blows up:

image

I really hope that screenshot ⬆️ isn’t right 😢, having ‘Test-Catalog-Item’ visible in UI but our command failing to find it would be quite weird...

it then looks for the item in the sibling to "unassigned", "my catalog" and can't find it and blows up

We expect to traverse all the way to the "My Catalog" node to find a match, because we’re looping through all <li> items(here they are"All Catalog Items", "Unassigned", "Test Catalog Item" & "My Catalog") in the expanded accordion. As of now we aren’t really limiting the lookup to the "Unassigned" node. To do that, we’d need to consider data-nodeid:
image

Sometimes it sporadically fails because the tree is still loading and the main div is also still loading:

and an ajax tree_autoload happens after it already fails... so it didn't wait for it:

Note, we do a tree_select intercept but I don't see one for the tree_autoload.

Exactly, I also feel waiting on the tree_autoload might fix this. To do that, I think I’ll need to enhance the interceptApi command to wait for multiple APIs, currently, it only waits on tree_select from the same event - I’ll take a look and follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants