Skip to content

[8.1] Add functional test for assertBrowserHistoryIsNotOnLastPage#59

Merged
TavoNiievez merged 1 commit into
Codeception:8.1from
TavoNiievez:browser-history-not-on-last-page-8.1
Jun 26, 2026
Merged

[8.1] Add functional test for assertBrowserHistoryIsNotOnLastPage#59
TavoNiievez merged 1 commit into
Codeception:8.1from
TavoNiievez:browser-history-not-on-last-page-8.1

Conversation

@TavoNiievez

Copy link
Copy Markdown
Member

Adds the one missing functional test for the Symfony-inherited browser-history assertions introduced in Codeception/module-symfony#240 (assertBrowserHistoryIsNotOnLastPage). The sibling assertions (IsNotOnFirstPage, IsOnFirstPage, IsOnLastPage) were already covered by #45#48; this one was omitted because no public step could position the browser history off the last page.

public function assertBrowserHistoryIsNotOnLastPage(FunctionalTester $I)
{
    $I->amOnPage('/');
    $I->amOnPage('/login');
    $I->moveBack();
    $I->assertBrowserHistoryIsNotOnLastPage();
}

The assertion requires symfony/browser-kit >= 7.4, so it applies to the 7.4 and 8.1 branches only.

Depends on Codeception/lib-innerbrowser#87

On released lib-innerbrowser, moveBack() replays the previous request with changeHistory = true, which re-appends to the history and leaves the pointer on the last page — so this test only passes once Codeception/lib-innerbrowser#87 (move the history pointer instead of appending) is merged and released. CI here will be red until then.

Covers the last untested Symfony-inherited browser-history assertion from
module-symfony#240. Uses the public moveBack() step to position the browser
history off the last page.
@TavoNiievez TavoNiievez force-pushed the browser-history-not-on-last-page-8.1 branch from ee78d8e to 03e2424 Compare June 26, 2026 22:18
@TavoNiievez TavoNiievez merged commit 56fde86 into Codeception:8.1 Jun 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant