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

Error with FAST button #6785

Closed
mollykreis opened this issue Dec 20, 2021 · 4 comments
Closed

Error with FAST button #6785

mollykreis opened this issue Dec 20, 2021 · 4 comments
Labels
FREQUENCY: level 1 SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@mollykreis
Copy link

What is your Scenario?

There is an error with TestCafe when a site contains a fast-button element from Microsoft's FAST components.

When I run tests with TestCafe, I get the following error:

JavaScript error details:
Error: Failed to execute 'removeAttributeNode' on 'Element': The node provided is owned by another element.

I see the same error using the Hammerhead playground from master here.

What is the Current behavior?

An exception occurs when a page containing a fast-button is run using TestCafe. The error does not occur normally on the page.

From my debugging, it seems the error occurs here in the compilation of the fast-button. It appears that attributes does not get updated to reflect that an attribute was removed during the call to removeAttributeNode, so in the next iteration of the for-loop, the same attribute is attempted to be removed again, causing the exception.

Note: I did not try every FAST component, so the issue may occur with more than just the button.

What is the Expected behavior?

The page should load successfully.

What is your public website URL? (or attach your complete example)

Public website: https://explore.fast.design/components/fast-button

I've also attached a simple Angular app containing only a fast-button.
TestCafeError.zip

What is your TestCafe test code?

Not relevant. I reproduced this directly using the Hammerhead playground.

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

To reproduce using public site:

  1. Run Hammerhead playground as described in testcafe-hammerhead readme
  2. Enter https://explore.fast.design/components/fast-button in the text box and click "Proxy"
  3. Notice all the exceptions in the console
  4. Notice that the main example button on the page doesn't appear

To reproduce using the attached app:

  1. Open the attached project
  2. Install dependencies using npm install
  3. Run the app using npm run start and see a page with a button open to localhost:4200
  4. Run Hammerhead playground as described in testcafe-hammerhead readme
  5. Enter http://localhost:4200 in the text box and click "Proxy"
  6. Notice the exception in the console
  7. Notice that the button does not appear on the page

TestCafe version

testcafe-hammerhead version 24.5.9

Node.js version

16.13.0

Command-line arguments

N/A

Browser name(s) and version(s)

Chrome: Version 96.0.4664.45 (Official Build) (64-bit)

Platform(s) and version(s)

Windows

Other

No response

@mollykreis mollykreis added the TYPE: bug The described behavior is considered as wrong (bug). label Dec 20, 2021
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Dec 20, 2021
@Dmitry-Ostashev
Copy link
Contributor

Thank you for your report. I reproduced the issue. We will research it and update this thread once we have any news.

@TrevorKarjanis
Copy link

Support for HTMLElement.removeAttributeNode has been merged and released in testcafe-hammerhead@25.5.15. We're waiting for the root testcafe package to uptake the version before validation can be completed.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 21, 2022
@miherlosev
Copy link
Collaborator

Hi @TrevorKarjanis

The fix will be available in the next TestCafe version.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 22, 2022
@miherlosev
Copy link
Collaborator

Fixed in DevExpress/testcafe-hammerhead#2742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 1 SYSTEM: hammerhead TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

4 participants