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

Stabilize e2e tests: phishing detection #21150

Closed
chloeYue opened this issue Oct 2, 2023 · 0 comments · Fixed by #21152
Closed

Stabilize e2e tests: phishing detection #21150

chloeYue opened this issue Oct 2, 2023 · 0 comments · Fixed by #21152
Assignees
Labels
release-11.4.0 Issue or pull request that will be included in release 11.4.0 team-extension-platform

Comments

@chloeYue
Copy link
Contributor

chloeYue commented Oct 2, 2023

What is this about?

Several e2e testcases about phishing detection are flaky that need to stabilize.

Screenshot 2023-10-02 at 16 35 54

Scenario

No response

Design

No response

Technical Details

No response

Threat Modeling Framework

No response

Acceptance Criteria

No response

References

No response

@chloeYue chloeYue self-assigned this Oct 2, 2023
@gauthierpetetin gauthierpetetin added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) in-progress and removed ready-for-dev needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Oct 2, 2023
chloeYue added a commit that referenced this issue Oct 3, 2023
## **Description**
Several e2e testcases about phishing detection are flaky.

## **Why they are flaky?**
After investigation, i think because when we open a malicious website,
selenium fetch very quickly all the DOM elements and consider they are
complete. When the page redirects to phishing detection page, it dose
not re-fetch elements so selenium cannot find buttons to click.

## **How i resolve it?**
I explicitly force selenium to switch to the phishing detection page
each time after redirection so it will re-fetch all elements on this
page.

## **Why do i think the fix works**
For each testcase, I ran locally 20 times and they all passed.

Fixes #21150
@metamaskbot metamaskbot added the release-11.4.0 Issue or pull request that will be included in release 11.4.0 label Oct 3, 2023
k-g-j pushed a commit that referenced this issue Nov 1, 2023
## **Description**
Several e2e testcases about phishing detection are flaky.

## **Why they are flaky?**
After investigation, i think because when we open a malicious website,
selenium fetch very quickly all the DOM elements and consider they are
complete. When the page redirects to phishing detection page, it dose
not re-fetch elements so selenium cannot find buttons to click.

## **How i resolve it?**
I explicitly force selenium to switch to the phishing detection page
each time after redirection so it will re-fetch all elements on this
page.

## **Why do i think the fix works**
For each testcase, I ran locally 20 times and they all passed.

Fixes #21150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-11.4.0 Issue or pull request that will be included in release 11.4.0 team-extension-platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants