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

Harden window closing code upon session reset #27

Merged

Conversation

aik099
Copy link
Member

@aik099 aik099 commented Apr 7, 2024

Problems solved:

Test failure is unrelated.

Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.24%. Comparing base (71c242b) to head (d04dfda).

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #27      +/-   ##
============================================
- Coverage     83.65%   82.24%   -1.42%     
+ Complexity      192      191       -1     
============================================
  Files             1        1              
  Lines           471      473       +2     
============================================
- Hits            394      389       -5     
- Misses           77       84       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

/**
* @dataProvider initialWindowNameDataProvider
*/
public function testSessionResetClosesWindows(?string $initialWindowName): void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof Would it make sense to put this test in driver-testsuite?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this test into the driver's test suite instead of the Mink driver test suite because the window closing behavior upon session reset is non-standard or advertised anywhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding that in the driver testsuite as I think it makes sense for any driver supporting to open new windows to close them on reset.

We can update the phpdoc of the DriverInterface to suggest drivers to close extra windows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding that in the driver testsuite as I think it makes sense for any driver supporting to open new windows to close them on reset.

Done in the minkphp/driver-testsuite#96 .

We can update the phpdoc of the DriverInterface to suggest drivers to close extra windows.

@stof , please review my other PRs (7 by today). It's been over a month now, and I don't know if you've looked at them and they're OK to merge or I need to change something.

Also what can I do to speed up the review process?

Once that is arranged I can try creating a DriverInterface-related PR.

@aik099 aik099 force-pushed the session-reset-with-initial-window-rename-fix branch from 8198a7b to da234b2 Compare April 9, 2024 06:38
@aik099 aik099 merged commit 73ad0b6 into minkphp:main Jun 28, 2024
24 of 29 checks passed
@aik099 aik099 deleted the session-reset-with-initial-window-rename-fix branch June 28, 2024 13:59
@aik099
Copy link
Member Author

aik099 commented Jun 28, 2024

Thank you, @stof .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants