https://cypress.io logo
Join Discord
Powered by
# general-chat
  • s

    salmon-computer-88142

    09/01/2022, 11:37 AM
    now the only thing i need to solve out is how do i know the column index by the column name
  • g

    gray-kilobyte-89541

    09/01/2022, 11:42 AM
    https://glebbahmutov.com/cypress-examples/9.7.0/recipes/table-cell-by-column-heading.html#find-table-cell-by-the-column-heading or search the examples, and again, if you explain / give an example of what you are trying to find, it is usually much simpler
  • t

    thankful-vegetable-38026

    09/01/2022, 11:45 AM
    hey @gray-kilobyte-89541 , do you, perchance, know how I'd be able to get the value inside an it() block? I'm rewriting your cypress/snapshot module and I'm getting stuck there lol
  • t

    thankful-vegetable-38026

    09/01/2022, 11:47 AM
    i can't seem to find anything that'd even tell me if it's even possible to access the current test in a plugin command
  • s

    salmon-computer-88142

    09/01/2022, 11:50 AM
    its great example to find 1 cell in specific row and column but in my case, i want to find a row that contains column values
  • s

    salmon-computer-88142

    09/01/2022, 11:50 AM
    so the search is different
  • s

    salmon-computer-88142

    09/01/2022, 11:50 AM
    i want row that has for example in column A: 'value1', column B: 'value2' etc..
  • f

    freezing-piano-2792

    09/01/2022, 12:14 PM
    Is your app inherently undeterministic and therefore impossible to verify? If he answer is no, then there's no reason for why a test shouldn't always be able to verify it
  • g

    gray-kilobyte-89541

    09/01/2022, 1:23 PM
    if you can prepare HTML codebox then I am sure there is an elegant solution
  • s

    salmon-computer-88142

    09/01/2022, 2:52 PM
    how can i filter elements that has descendant element with specific class. like: cy.get('row').filter('.cell')
  • s

    salmon-computer-88142

    09/01/2022, 2:52 PM
    it doesnt find me anything because i think it looks for "row" elements with class ".cell" and i want the descendant elements with calss '.cell'
  • s

    salmon-computer-88142

    09/01/2022, 4:33 PM
    any idea?
  • s

    salmon-computer-88142

    09/01/2022, 4:33 PM
    i tried alot of things nothing works
  • s

    salmon-computer-88142

    09/01/2022, 4:34 PM
    i can only use :contains that check data on descendant elements
  • c

    cuddly-thailand-33926

    09/01/2022, 4:50 PM
    Is there any way I can run a command to run my previously failed tests? Or a way to make test retries occur at the end? (Retry Later : true)
  • g

    gray-kilobyte-89541

    09/01/2022, 6:14 PM
    without a code sandbox showing what markup you have in general and what you are trying to select, it is impossible to help. But you can use full CSS + jQuery selectors, see examples in https://glebbahmutov.com/cypress-examples/9.7.0/commands/querying.html and https://glebbahmutov.com/cypress-examples/9.7.0/commands/traversal.html and https://glebbahmutov.com/cypress-examples/9.7.0/#recipes
  • p

    polite-potato-14743

    09/01/2022, 7:08 PM
    no, but i can't really answer further than that. I dont necessarily know why but it seems like my tests will pass and fail back and forth. Can't get a lot of consistency.
  • p

    polite-potato-14743

    09/01/2022, 7:10 PM
    checking this out, thanks.
  • s

    salmon-computer-88142

    09/01/2022, 7:13 PM
    that was my solution..
    Copy code
    rows.filter((_, element) => {
                    const result = Cypress._.every(cells, ({ column, value }) => {
                      const [header] =
                        Object.entries(headers).find(([index, header]) => {
                          return typeof column === 'string'
                            ? column === header
                            : column === Number(index);
                        }) || [];
    
                      return !Cypress._.isNil(header)
                        ? element.children.item(Number(header)).firstChild
                            .firstChild.textContent === value
                        : false;
                    });
  • s

    salmon-computer-88142

    09/01/2022, 7:13 PM
    kinda not intuitive
  • s

    salmon-computer-88142

    09/01/2022, 7:15 PM
    i want to find all the rows by their cells.
    Copy code
    const cells = [{column: 'Col1', value: 'val1'}, {column:'Col2', value: 'val2'}]
  • s

    salmon-computer-88142

    09/01/2022, 7:15 PM
    after i find the rows. i want to filter them
  • s

    salmon-computer-88142

    09/01/2022, 7:15 PM
    it looks like i cannot do it using selector
  • s

    salmon-computer-88142

    09/01/2022, 7:17 PM
    so first i need to "translate" the col name to index, than i need to find all the cells in their right index with the right value
  • g

    gray-kilobyte-89541

    09/01/2022, 11:33 PM
    since I still have no idea what is your markup / table, it is hard to say anything
  • s

    salmon-computer-88142

    09/02/2022, 12:01 AM
    im using AgGrid
  • g

    gray-kilobyte-89541

    09/02/2022, 12:39 AM
    Here is my plain HTML https://github.com/bahmutov/cypress-examples/commit/630439650588837640a73f53a87c7e18f63c80ff
  • q

    quaint-judge-45197

    09/02/2022, 4:24 AM
    Got solution - After digging deeper into the network tab we found that our website URL was redirecting to another URL, and that URL needs certs not our website URL. Cypress does not pass cert to redirects, so we have to pass certs for that redirected URL in client Certification.
  • s

    salmon-computer-88142

    09/02/2022, 6:15 AM
    can i do alias on elements that will be removed from dom and still reach them?
    a
    f
    • 3
    • 4
  • f

    freezing-piano-2792

    09/02/2022, 11:05 AM
    It's sometimes difficult for sure, but you shouldn't ever think that it's inherently impossible
1...787980...127Latest