Skip to content

Add URL lookup by link label in a given email - #140

Merged
Jamesking56 merged 1 commit into
masterfrom
issue-43-link-url
Oct 1, 2026
Merged

Jamesking56 merged 1 commit into
masterfrom
issue-43-link-url

Conversation

@Jamesking56

@Jamesking56 Jamesking56 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

$url = $I->grabUrlForLinkFromEmail($I->lastMessage(), "Second link");

Adds one action that returns the first href with an exact, case-sensitive label in the given email HTML. Fails when no link matches.

Accepts an Email from lastMessage(), lastMessageTo(), lastMessageFrom(), or direct construction. Includes documentation and tests for selected emails, encoded HTML, nested tags, entities, duplicate labels, and missing links.

Closes #43.

Evidence

  • Before: testGrabUrlForLinkFromGivenEmail failed because the action did not exist.
    After: php vendor/bin/codecept run passed: 71 tests, 105 assertions.
  • The selected-email test proves the given email wins over the latest email.
  • PHP syntax checks and Codeception actor generation passed. No static type checker is configured.
  • Full-suite run used a temporary MailCatcher on SMTP port 1125; the local helper port was restored afterward.
  • Standards and spec reviews found no issues.

Merge Danger

Door: two-way

Blast Radius: extraction

Adds one action; uses the existing MIME parser and native DOM API.

@Jamesking56 Jamesking56 changed the title Add URL lookup by link label in the last email Add URL lookup by link label in emails Oct 1, 2026
@Jamesking56 Jamesking56 changed the title Add URL lookup by link label in emails Add URL lookup by link label in a given email Oct 1, 2026
@Jamesking56
Jamesking56 marked this pull request as ready for review October 1, 2026 12:57
@Jamesking56
Jamesking56 merged commit ab8d047 into master Oct 1, 2026
8 checks passed
@Jamesking56
Jamesking56 deleted the issue-43-link-url branch October 1, 2026 13:06
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Released in 4.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get URL for link labelled X

1 participant