Visitar URL original
Flaky issue where $I->canSee() fails incorrectly · Issue #6820 · Codeception/Codeception · GitHub
Skip to content

Flaky issue where $I->canSee() fails incorrectly #6820

Description

@adnweedon

I've had an occasional flaky issue where a step fails because it can't see a string, but the failure output very obviously has the string on the page!

For example:

Image

But the output shows:

Image

which very clearly does have "Funds" on the page!

Is this something that anyone else has seen - does anyone have any idea how I can sort it?

Activity

  1. cgsmith commented on Feb 13, 2025

    @cgsmith

    Try running with the --debug option. You should also be able to view the failure in the _output folder. Take a look at my functional test output as an example:

    My Test:

        public function checkSuccessVerification(FunctionalTester $I)
        {
            $I->amOnRoute('site/verify-email', ['token' => '4ch0qbfhvWwkcuWqjN8SWRq72SOw1KYT_1548675330']);
            $I->canSee('Your email has been confirmed! Upon our approval you will receive a welcome email.');
            $I->canSee('Sales Agent portal!', 'h1');
    
            $I->seeRecord('common\models\User', [
               'email' => 'test@mail.com',
               'status' => \common\models\User::STATUS_VERIFIED
            ]);
        }

    Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions