Comments (8)
Hello and first of all, thank you for this very detailed issue 🙏🏻 .
I'm going to check this one on my spare time. Concerning the tab that opens, it's "normal", lighthouse opens a new tab when running its audits.
Concerning the third party verifications, I'm not sure how to handle this since it's not a scenario I'm very familiar with Cypress. I'm going to try to find time for this.
Thank you again 🙏🏻
from cypress-audit.
Oh great to hear 😊 . Can we consider this issue to be closed or are you expecting something particular in order to be okay with the behavior?
And again, a huge thank you for the time spent investigating here 🙏🏻
Yup. This is something we will have to retry when Cypress has multi domain support.
from cypress-audit.
@muratkeremozcan can you try with this workaround?
Fantastic! The workaround helped!
Thank you so much for commenting on this closed thread. Words aren't enough to express my appreciation.
from cypress-audit.
Hello and first of all, thank you for this very detailed issue 🙏🏻 .
I'm going to check this one on my spare time. Concerning the tab that opens, it's "normal", lighthouse opens a new tab when running its audits.
Concerning the third party verifications, I'm not sure how to handle this since it's not a scenario I'm very familiar with Cypress. I'm going to try to find time for this.
Thank you again 🙏🏻
I gave it a repro attempt here with auth0-cypress demo + cypress audit. It is working though. Might need a more complex example.
from cypress-audit.
Oh great to hear 😊 . Can we consider this issue to be closed or are you expecting something particular in order to be okay with the behavior?
And again, a huge thank you for the time spent investigating here 🙏🏻
from cypress-audit.
Thank you 🙏🏻
from cypress-audit.
@muratkeremozcan can you try with this workaround?
from cypress-audit.
Hi guys,
Thank you so much for all of your effort in this issue. Great work there!
I tried to look into this guide (and many similar ones on the internet) but still cannot resolve my issue.
Basically, I am writing performance test cases in Cypress for my website.
It launches from a third-party Amazon Cognito sign-in page.
So when I go to my website, at first it will redirect me to the Cognito sign-in page, and then after signing in, I will be redirected back to the home page of my website.
What I want to test is the performance metrics of different actions performed on my website. But no matter what, I have to go through the login process.
Here's the problem that I encounter:
- If the current browser hasn't yet previously signed in to my site, and so there's no cache (relating to this site) being stored in the browser, when I go to the site, the Cognito page will have a button allowing me to sign-in through my organization's SSO.
- But if the current browser already has been previously used to sign in to my site, and so there's cache storing the previous sign-in data, when I go to the site again, the Cognito page will look different. It will have a button allowing me to Continue to my site (ie. the button shows something like 'Continue with
<my organization>
'). After clicking on it, I need not to enter passwords from the SSO again, and I am directly signed in. - I understand that lighthouse() command in cypress-audit first performs whatever actions I would like to test against, and then opens a new tab in order to estimate the performance metrics, and finally the new tab closes and resumes the Cypress test. So I encounter the "Continue button" mentioned above in this step, in the new tab (that lighthouse() tries to open).
So my question here is:
- On the new tab, my testing script could not proceed further, because there isn't any sign-in button appearing on the new tab opened by lighthouse(), but instead, there's a "Continue button".
- So the lighthouse() command got stuck there, causing the metrics measured to be 0. (Kinda frustrating because it obviously does not pass any threshold.)
- My workaround: manually click the "Continue button" whenever the test script encounters that page.
- Is there any way to have lighthouse() command automate this step?
Thanks. Feel free to comment.
PS Since my codes are private, I am unfortunately unable to share in the community, but feel free to arrange meetings with me to review and solve it together.
Look forward to any solutions! 💯
from cypress-audit.
Related Issues (20)
- Light House: Save Trace File after audit HOT 1
- More detailed failure report HOT 1
- Error: Webpack Compilation Error: Module parse failed: Unexpected token (151:33) HOT 2
- Lighthouse check is skipped when we pass chrome binary path in cypress run HOT 1
- cy.pa11y() fails with the following error: The "listener" argument must be of type function. Received undefined
- Cypress Lighthouse test failing after latest Chrome Version Upgrade (Version 111.0.5563.64 ) HOT 30
- Can't install v1.4.1 via npm HOT 1
- Cypress-Audit support for Lighthouse-user-flow
- Unexpected token '||=' HOT 3
- Create output report (html and json) doesn't work HOT 4
- CRA example does not work out of the box: Unexpected token '??=' HOT 1
- pa11y/cypress integration with typescript
- Cypress screenshot error since Chrome 107
- cy.task('lighthouse') failed with the following error: > Unexpected token '??=' HOT 2
- VSCode Pa11y and typescript - /node_modules/.pnpm/@[email protected]/node_modules/@cypress-audit/pa11y/index.d.ts' is not a module HOT 1
- Seeing invalid arguments compilation error with HTML Reports "Expected 0 arguments, but got 1."
- This plugin doesn't work with Cypress version >= 13
- When cy.lighthouse() command is run, Cypress opens a new browser tab HOT 1
- Typescript: compilation error when using plugin with and Cypress >= 13.5.1 (no exported member BrowserLaunchOptions)
- 3rd party authentication scenario: lighthouse runs the login page on a separate new tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-audit.