minkphp / minkphp/Mink

Wrong response info in the exception when delaying the rendering

Open
#333 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
1.6k
Forks
286
PR merge metrics
No merged PRs in 30d

Description

The Mink Exception displayes the response info in its __toString message. but they are retrieved when displaying the exception, not when creating it. This means that the info will be related to the last page, not to the page on which the exception occured.

We figured it when using Mink in Behat: when using the pretty formatter, the info are right as the exception is displayed just after being thrown. But when using the progress formatter, the exception is only displayed at the end of the run so the response info will be taken from the last page of the last scenario instead

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Mink Exception implementation and its __toString method, then trace where the response information is retrieved. Reproduce the difference between Behat's pretty and progress formatters with a delayed exception display. Done means the exception reports the response from the page where it occurred, rather than the last page visited.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.