Description
I encountered several regressions when trying to upgrade codeceptjs from 3.5.8 to 3.5.11. Selector that worked with 3.5.8 do not work with 3.5.11.
What do you get instead?
ERROR! Unsupported pseudo :last-of-type
. Example selector that is now broken:
lastInputRow: '[data-testid="field-definitions-container"] > *:last-of-type',
I looked through the dependencies. The dependency convert-cssxpath/src/converter.js:
throws the error. Likely the same issue as mentioned in slack.
`locator.all: DOMException: Failed to execute 'evaluate' on 'Document': The string '[contains(., 'Delete')]' is not a valid XPath expression. The selector is:
deleteModal: {
deleteButton: locate(".p-confirm-popup:last-of-type button").withText("Delete")
},
Once I remove :last-of-type:
the selector works again, so this may just be the same as the first with a different point of failure.
locator.all: DOMException: Failed to execute 'evaluate' on 'Document': The string '//li[@role="option"]//*[@data-testid="date"][ancestor::]' is not a valid XPath expression.
. Locator is:
locate(`li[role="option"] [data-testid="${type}"]`).inside('[data-testid="field-definitions-container"] > *:last-of-type')
Likely also the same issue, but I can't fully verify because this is needed for the suite to continue.