Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix root cause(s) of flaky Adjust Post specs #20104

@dukegreene

Description

@dukegreene

We have encountered some flakiness around the relatively recent 'Adjust post tags' e2e specs.

From https://forem-team.slack.com/archives/C7GE84DEJ/p1694620468728569:

we ran into instances where the JS was sometimes not loaded before we clicked on the iframe. It was difficult to test it without adding a manual wait which felt like a code smell and so we didn’t. 

Instead we added a workaround for reloading the page but it seems like its not working if its flakey.

Enabling the specs commented out in this PR and running yarn e2e locally (or pushing changes up and letting cypress run in CI/CD) will likely surface flaky failures as things time out after 10s or as clicking/finding elements revealed by prior clicks return failures.

Latter issue likely stems from JS not loading in time after a page reload, which leaves the interactive elements unresponsive. kind of a reverse of the race condition "$document.ready()" was built to address

Expected behavior

End to end tests running reliably, reflecting how the page behaves from a user's perspective each time without needing to 'retry from failed' as a workaround.

Screenshots

error screenshot showing multiple timeouts and an ActionController routing error as a font fails to load

Desktop (please complete the following information):

  • OS, version: MacOS Ventura
  • Browser, version: Chrome Version 116.0.5845.187

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugalways open for contribution

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions