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

Allow scenarios for logged in users #2

Merged
merged 2 commits into from
Apr 26, 2022
Merged

Conversation

jdlrobson
Copy link
Member

No description provided.

@jdlrobson jdlrobson force-pushed the login branch 3 times, most recently from 4f2f7f3 to c3fd2b2 Compare April 18, 2022 18:07
@jdlrobson
Copy link
Member Author

Latest patch seems more stable - using onBefore instead of onReady.

@jdlrobson jdlrobson force-pushed the login branch 2 times, most recently from ce41b5b to b76b2fd Compare April 18, 2022 18:22
@nicholasray
Copy link
Contributor

Thank you for working on this.

I'm still investigating the cause, but I've noticed the following error message 2 out of 3 runs of ./pixel.js reference with this change:

Puppeteer encountered an error while running scenario "Special:BlankPage with user menu open (#vector-2022, #logged-in, #userMenu-open)"
TimeoutError: Navigation timeout of 60000 ms exceeded

@@ -0,0 +1,5 @@
module.exports = (page) => {
page.evaluate( () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need await?

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 don't know why but i was getting a timeout with this, presumably because it never resolved

Copy link
Contributor

Choose a reason for hiding this comment

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

It happens infrequently but definitely happens for me:
Screen Shot 2022-04-18 at 2 57 13 PM

Not sure why this is yet as the adding async/await didn't seem to matter.

The other issue I'm seeing is the sticky header tests aren't showing the sticky header for me:
MediaWiki_Test_sticky_header_logged-in_scroll_0_viewport_1_tablet

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, FINALLY worked this one out. I needed to return true in page.evaluate

Pushed new patch.

Copy link
Contributor

Choose a reason for hiding this comment

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

For some reason, I'm still getting the timeouts:

Screen Shot 2022-04-20 at 10 20 01 AM

I wonder if there's something wrong with the server or the mediawiki config used that is causing those. Hopefully, I'll have some time today to dig deeper in this

@jdlrobson
Copy link
Member Author

Was this with the version of the patch using onReady? I was getting those errors with that but not onBefore

@nicholasray
Copy link
Contributor

@jdlrobson Yes, it's with commit 91b4786 . But it might be due to the await question I posted above

@jdlrobson
Copy link
Member Author

Sticky header shouldn't be showing on tablet view. Are you not seeing it on the desktop breakpoint?

@nicholasray
Copy link
Contributor

nicholasray commented Apr 18, 2022

Ah good point. I see the following at the "desktop" breakpoint (not to be confused with the "desktop-wide" which shows the sticky header). Presumably at this breakpoint we shouldn't show the sticky header but it looks like our latest TOC styles are not equipped to handle this right now as there is a large gap where the sticky header would otherwise go:

MediaWiki_Test_sticky_header_logged-in_scroll_0_viewport_2_desktop

@nicholasray
Copy link
Contributor

@jdlrobson I tried an experiment with the last commit to see how much faster it would be to use an already retrieved cookie without an expiration (from my understanding). The tests are consistently 10-15 seconds faster compared to the previous commit which uses the login page. I really like the improvement in speed. What do you think?

Copy link
Member Author

@jdlrobson jdlrobson left a comment

Choose a reason for hiding this comment

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

I guess since we're currently storing the password/username and there's no public instance of this, this should be okay. It would break however if the internals of how we log in change, but I guess this is fine for now.

@jdlrobson jdlrobson merged commit 149f356 into wikimedia:main Apr 26, 2022
jdlrobson pushed a commit to jdlrobson/pixel that referenced this pull request May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants