stale-optician-85950
10/24/2022, 1:20 PMgray-kilobyte-89541
10/24/2022, 1:21 PMstale-optician-85950
10/24/2022, 1:22 PMprehistoric-restaurant-72560
10/24/2022, 1:24 PMcy.get("#checkbox").should("not.be.checked").click().should("be.checked");
Is this kind of assertion is possible in cypress? Or I have to split it to:
cy.get("#checkbox").should("not.be.checked").click()
cy.get("#checkbox").should("be.checked")
So far 1 liner does not work, and Im just curious if it's in cypress "nature"gray-kilobyte-89541
10/24/2022, 1:26 PMprehistoric-restaurant-72560
10/24/2022, 1:29 PMprehistoric-restaurant-72560
10/24/2022, 1:34 PM("have.attr", "ng-reflect-checked", "true")
works fine.prehistoric-restaurant-72560
10/24/2022, 2:33 PMshould("have.text")
fails due to whitespaces that needs to me trimmed.
So I wonder if there is a way to implement custom command that would do
.invoke("text").invoke("trim")
under the hood?fresh-doctor-14925
10/24/2022, 2:36 PM.should("contain.text")
suit your purposes? Then you're not having to do any string manipulationprehistoric-restaurant-72560
10/24/2022, 2:38 PMprehistoric-restaurant-72560
10/24/2022, 2:45 PMgray-kilobyte-89541
10/24/2022, 2:48 PMprehistoric-restaurant-72560
10/24/2022, 2:59 PMfreezing-piano-2792
10/24/2022, 3:46 PMhundreds-author-68171
10/24/2022, 5:06 PMgray-kilobyte-89541
10/24/2022, 5:42 PMstale-optician-85950
10/24/2022, 8:04 PMcypress-cdp
does indeed work and I've learned a lot more about Chrome DevTools Protocol in the process. Well done 👏boundless-ice-56105
10/24/2022, 8:12 PMboundless-ice-56105
10/24/2022, 8:13 PMgray-kilobyte-89541
10/25/2022, 12:37 AMfreezing-oxygen-59684
10/25/2022, 5:27 AMorange-book-46212
10/25/2022, 6:40 AMcalm-train-20398
10/25/2022, 9:24 AMorange-ocean-68369
10/25/2022, 11:18 AMbrave-river-4142
10/25/2022, 12:16 PMglamorous-country-57678
10/25/2022, 12:52 PMadorable-vase-67839
10/25/2022, 1:07 PMgray-kilobyte-89541
10/25/2022, 2:46 PMadorable-vase-67839
10/25/2022, 2:49 PMfreezing-piano-2792
10/25/2022, 2:49 PM