Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Session Issue #4157

Closed
yugenekr opened this issue Apr 23, 2017 · 1 comment
Closed

Multi Session Issue #4157

yugenekr opened this issue Apr 23, 2017 · 1 comment
Assignees
Labels

Comments

@yugenekr
Copy link

@yugenekr yugenekr commented Apr 23, 2017

What are you trying to achieve?

In versions before 2.2.10 (sorry, don't have exact previous version number with working behavior), friends windows would be switched automatically, so all main actor window elements would become reachable after a friend has done the actions. Here's an example of what I mean - the last line is added to the current codeception test to show the desired (and previously working) functionality:

$I = new WebGuy($scenario);
$I->wantTo('call friends to try multi session');
$I->amOnPage('/info');
$jon = $I->haveFriend('jon');
$jon->does(function (WebGuy $I) {
    $I->amOnPage('/');
    $I->seeInCurrentUrl('/');
});
$I->seeInCurrentUrl('/info');
$I->see('Don\'t do that at home');

The same behavior is shown in the docs

What do you get instead?

1) FriendsCept: Call friends to try multi session
 Test  tests/web/FriendsCept.php
 Step  See "Don't do that at home"
 Fail  Failed asserting that  on page /info
--> Welcome to test app!
More info
Test Link
Test
Document-Relative Link
Some text with formatting
on separate lines
Link Text A wise man said: "debug!" Please don't provide us any personal information. Array ( )
--> contains "don't do that at home".

Scenario Steps:

 7. $I->see("Don't do that at home") at tests/web/FriendsCept.php:11
 6. $I->seeInCurrentUrl("/info") at tests/web/FriendsCept.php:10
 5. // --- JON FINISHED
 4. $I->seeInCurrentUrl("/") at tests/web/FriendsCept.php:8
 3. $I->amOnPage("/") at tests/web/FriendsCept.php:7
 2. // JON DOES ---

Now main actor window elements are reachable again if to add $friend->leave() before that, thus in case it's needed, a friend has to be re-initialized again, which is not always convenient.

Is it an intentional behavior? Which way can browser windows be switched without making a friend to leave?

Thank you

@Naktibalda
Copy link
Member

@Naktibalda Naktibalda commented Apr 24, 2017

@DavertMik It looks like this issue was caused by your performOn change.

@yugenekr yugenekr changed the title Multi Session Clarification is Needed Multi Session Issue May 4, 2017
DavertMik added a commit that referenced this issue May 10, 2017
DavertMik added a commit that referenced this issue May 11, 2017
DavertMik added a commit that referenced this issue May 11, 2017
* fixes #4157

* fixes #4203
chris1312 pushed a commit to chris1312/Codeception that referenced this issue Jun 16, 2017
chris1312 pushed a commit to chris1312/Codeception that referenced this issue Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.