flagpole icon indicating copy to clipboard operation
flagpole copied to clipboard

waitForHavingText() gives a false positive on the text passed when using suite.extjs

Open FloDanny opened this issue 4 years ago • 2 comments
trafficstars

The was open to https://www.google.com/ The method waitForHavingText() at the bottom of the suite gives a false positive from the actual text passed in the method:

import flagpole from "flagpole";

flagpole('waitforHavingText', async (suite) => {

   suite.scenario("false positive", "browser")
      .open("/")
      .next(async (context) => {
         context.assert(context.response.statusCode).equals(200);
      })
      .next('ABOUT window items is present', async (context) => {
         await context.waitForHavingText('.MV3Tnb', 'Abo');
      });
})

The Flagpole output is as follows: Run Test Suites

============================ waitforHavingText ============================ » Base URL: https://www.google.com/ » Environment: qa » Took 2116ms ✔ Passed (1 scenario)

false positive

✔ Loaded Browser https://www.google.com/ ✔ HTTP Status Code equals 200 ABOUT window items is present ✔ EXISTS .MV3Tnb » Took 1907ms

FloSports@FloSports-3 FlagpoleIssue %

FloDanny avatar Nov 04 '21 16:11 FloDanny

You'll want to remove any company specific things, like app names and take out any extra setup that isn't relevant to the issue. A good micro repro example is "load google and waitForHavingText(foobar)"

johnsickels avatar Nov 04 '21 17:11 johnsickels

Example updated to google.com This error happens with browser and extjs applications

FloDanny avatar Nov 05 '21 00:11 FloDanny