Skip to content

Conversation

rodja
Copy link
Member

@rodja rodja commented Sep 16, 2025

Motivation

As @evnchn discovered in #5143, current screen tests let javascript errors slide.

Implementation

Simple addition to the teardown of screen which checks for javascript errors.

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • The implementation is complete.
    • fix tests which have js errors (if any)
  • More Pytests are not necessary.
  • Documentation is not necessary

@evnchn
Copy link
Collaborator

evnchn commented Sep 16, 2025

Need to merge #5143 first. The logs are crazy right now.

But we still have 2 other errors:

2025-09-16T08:55:00.0333110Z ERROR tests/test_echart.py::test_update - Failed: JavaScript console errors:
2025-09-16T08:55:00.0334500Z [{'level': 'SEVERE', 'message': "http://localhost:3392/_nicegui/2.24.1.dev0/static/vue.global.prod.js 4:16598 TypeError: Cannot read properties of undefined (reading 'length')\n    at Proxy.update_chart (http://localhost:3392/_nicegui/2.24.1.dev0/components/2d17e85f29692e468dca813727906fdd/echart.js:97:111)\n    at Proxy.mounted (http://localhost:3392/_nicegui/2.24.1.dev0/components/2d17e85f29692e468dca813727906fdd/echart.js:82:10)", 'source': 'console-api', 'timestamp': 1758012718754}]
2025-09-16T08:55:00.0334708Z ERROR tests/test_element.py::test_invalid_tags - Failed: JavaScript console errors:
2025-09-16T08:55:00.0336004Z [{'level': 'SEVERE', 'message': "http://localhost:3392/_nicegui/2.24.1.dev0/static/vue.global.prod.js 4:74775 Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('🙂') is not a valid name.", 'source': 'javascript', 'timestamp': 1758012748132}]

@evnchn
Copy link
Collaborator

evnchn commented Sep 17, 2025

hmm. Flaky test?

@evnchn
Copy link
Collaborator

evnchn commented Sep 19, 2025

Maybe re-run the test? Hmm I still don't get why all fails so disasterously.

Also maybe in alignment with #5153 we can target 3.0? "Unfair" if we rid all pytest warnings but not all JS errors?

@rodja rodja added this to the 3.x milestone Sep 19, 2025
@evnchn
Copy link
Collaborator

evnchn commented Oct 15, 2025

It's been a month and we have #5225 which you can write to.

@evnchn evnchn closed this Oct 15, 2025
@falkoschindler falkoschindler removed this from the 3.x milestone Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants