'Asserting value from certain row on table

I am trying to assert a value from a certain row on a table. The row I am trying to assert the value of will always have the same description, but where the row is on the table might change according to what document gets loaded to create the table from.

My Question is, How am I able to assert the value in the row where the description is Parts Inventory Here is the HTML to the row on the table I am trying to assert enter image description here



Solution 1:[1]

This solution should work:

cy.contains('01 - Parts inventory').parent().next().children()
.should('have.text','2899869.56')

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1