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

Bug: Codeception tests are failing because of rendering issue in the headless browser #375

Open
9 of 23 tasks
mikelittle opened this issue Nov 29, 2024 · 2 comments
Open
9 of 23 tasks
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now
Milestone

Comments

@mikelittle
Copy link
Contributor

mikelittle commented Nov 29, 2024

The codeception tests for Audit trail are failing because of rendering issue in the headless browser. The button to publish is being overlapped by the sidebar. Codeception could not publish the test post.

Steps to reproduce:

  1. Run the codeception tests for altiis/security composer dev-tools codecept -p packages/security/tests/ run
  2. Observe that the tests fail.

Note the second test fails because the first one did.

I expect all the tests to pass.

The test output:

1) AuditLogCest: Test create post for audit log
 Test  ../packages/security/tests/acceptance/AuditLogCest.php:testCreatePostForAuditLog

  [Facebook\WebDriver\Exception\ElementClickInterceptedException] Element <button class="components-button editor-post-publish-button editor-post-publish-button__button is-primary is-compact" type="button"> is not clickable at point (1835,96) because another element <div class="components-panel__header interface-complementary-area-header editor-sidebar__panel-tabs"> obscures it

Here is the screenshot the testing rig saves.

AuditLogCest.testCreatePostForAuditLog.chrome.fail.png

Note, the Publish button is obscured by the sidebar.

I also tried it using Firefox, with the same result:
AuditLogCest.testCreatePostForAuditLog.firefox.fail.png

Also note, by default the tests run on a simulated 800x600 screen, which I initially thought was the cause for the sidebar to render over the button. But changing to run at 1080p (as in the screenshots) still gave the same results.

Acceptance criteria:

  • Verify source of bug
    • Gutenberg
    • Statistics consent popup that renders even on the block editor page. This may mess up the rendering in the headless browser.
    • Headless Browser
  • The codeception tests should complete successfully.

For Altis Team Use

Ready for Work Checklist

Is this ticket ready to be worked on? See
the Play Book Definition of Ready

  • Is the title clear?
  • Is the description clear and detailed enough?
  • Are acceptance criteria listed?
  • Have any dependencies been identified? (Optional)
  • Have any documentation/playbook changes been identified? (Optional)
  • Is an estimate or time box assigned?
  • Is a priority label assigned?
  • Is this ticket added to a milestone?
  • Is this ticket added to an epic? (Optional)

Completion Checklist

Is this ticket done? See
the Play Book Definition of Done

  • Has the acceptance criteria been met?
  • Is the documentation updated (including README)?
  • Do any code/documentation changes meet project standards?
  • Are automatic tests in place to verify the fix or new functionality?
    • Or are manual tests documented (at least on this ticket)?
  • Are any Playbook/Handbook pages updated?
  • Has a new module release (patch/minor) been created/scheduled?
  • Have the appropriate backport labels been added to the PR?
  • Is there a roll-out (and roll-back) plan if required?
@mikelittle mikelittle added bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now labels Nov 29, 2024
@jerico jerico changed the title Codeception tests are failing Codeception tests are failing because of rendering issue in the headless browser Dec 4, 2024
@mikelittle
Copy link
Contributor Author

mikelittle commented Dec 4, 2024

This rendering issue may be caused by the statistics consent popup that renders even on the block editor page. Potentially, this may mess up the rendering in the headless browser

This is the original bug raised about the consent popup humanmade/altis-core#456

@jerico jerico changed the title Codeception tests are failing because of rendering issue in the headless browser Bug: Codeception tests are failing because of rendering issue in the headless browser Dec 4, 2024
@jerico
Copy link
Contributor

jerico commented Dec 4, 2024

Hey team! Please add your planning poker estimate with Zenhub @wisyhambolu @ferschubert-hm @mikelittle

@jerico jerico added this to the Altis v22 milestone Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now
Projects
None yet
Development

No branches or pull requests

2 participants