One of my test expects an error message text to be one of multiple values. Since getText() returns a promise I cannot use toContain() jasm
getText()
toContain()
The alternative solution is to use .toMatch() matcher with Regular Expressions and specifically a special character | (called "or"), which allows to match only one entry to succeed:
.toMatch()
|
expect(page.errorMessage.getText()).toMatch(/Unknown Error|Connection Error/);