Mink icon indicating copy to clipboard operation
Mink copied to clipboard

Extend WebAssert

Open rinatio opened this issue 11 years ago • 2 comments

Is there a way to extend WebAssert and use extended version in context?

rinatio avatar Apr 24 '13 14:04 rinatio

Currently, there is no way to use an extended WebAssert class. And I'm not sure it is really needed. You can put your custom assertions in your own classes IMO

stof avatar Apr 24 '13 14:04 stof

For example we want to

  1. extend addressEquals to not check trailing slash, (instead of using assertUrlRegex everywhere)
  2. extend fieldExists to add an abstraction over id | name | label etc in scenarios and make it work with css selectors. There're may be other cases i don't see right now. Extending WebAssert is much simpler than extending MinkContext default assertions sometimes.

rinatio avatar Apr 24 '13 14:04 rinatio