Skip to content

Logging in to Gmail results in a JS error, halts rest of the test #4857

@di5ko

Description

@di5ko

As part of a 'forgot password functionality' test, I want to login go Gmail and fetch the latest e-mail. The Google/Gmail login interface renders a JS error with Testcafe.

What is your Test Scenario?

  1. Navigate to mail.google.com
  2. Fill in email field
  3. Click next button
  4. Attempt to fill in password field (and login)

What is the Current behavior?

Step 3 renders a JS error, and step 4 will not work (the .typeText function will not do anything to insert text in the password field).

$ npx testcafe firefox gmail.test.js 
 Running tests in:
 - Firefox 73.0 / Linux 0.0

 Gmail login test
 ✖ Trigger JS error when logging in to Gmail

   1) A JavaScript error occurred on

   "https://accounts.google.com/signin/v2/sl/pwd?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F&ss=1&scc=1<mpl=default<mplcache=2&emr=1&osid=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin&cid=1&navigationDirection=forward".
      Repeat test actions in the browser and check the console for errors.
      If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript errors in TestCafe. To do the latter, enable the "--skip-js-errors" option.
      If this error does not occur, please write a new issue at:
      "https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
      
      JavaScript error details:
      ResizeObserver loop completed with undelivered notifications.:
          No stack trace available

What is the Expected behavior?

Being able to continue to populate the password field with .typeText.

How would you reproduce the current behavior?

Test code:

import { Selector } from "testcafe";

// Constants
const gmailEmailInput       = Selector("#identifierId");
const gmailNextButton       = Selector(".CwaK9");
const gmailPasswordInput    = Selector("input[type='password']");

fixture("Gmail login test");

test("Trigger JS error when logging in to Gmail", async testController => {

    await testController
        .navigateTo("https://mail.google.com")
        .typeText(gmailEmailInput, "[email protected]")
        .click(gmailNextButton) // triggers JS error
        .typeText(gmailPasswordInput, "password") // does not work

});

Environment details

  • testcafe version: 1.8.2
  • node.js version: v12.16.1
  • command-line arguments: testcafe firefox gmail.test.js
  • browser name and version: Firefox 73.0
  • platform and version: Linux Ubuntu 18.04.4 LTS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions