Commit Graph

69 Commits (03a6eb26bede9086c3fb12bd45f5324c05a404e5)

Author SHA1 Message Date
Bram Kragten 6788c43775
Add static routes for frontend modern and legacy service workers (#120488) (#122174)
* Bump frontend to 20240719.0

* restore #120488
2024-07-19 14:40:50 +02:00
Bram Kragten c28a138dfe
Revert "Add static routes for frontend modern and legacy service workers" (#122172) 2024-07-19 12:55:40 +02:00
Steve Repsher e50802aca3
Add static routes for frontend modern and legacy service workers (#120488) 2024-07-19 10:53:37 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet c7906f90a3
Improve type hints in frontend tests (#120739) 2024-06-28 13:36:26 +02:00
Erik Montnemery a10f9a5f6d
Allow opting out of warnings when removing unknown frontend panel (#119824) 2024-06-21 15:56:22 +02:00
Erik Montnemery 7940303149
Add WS command frontend/subscribe_extra_js (#119833)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-18 16:18:42 +02:00
J. Nick Koston faa55de538
Fix blocking I/O in the event loop when registering static paths (#119629) 2024-06-18 08:18:31 +02:00
Erik Montnemery 8af5748716
Add frontend.remove_extra_js_url (#119831) 2024-06-17 15:15:00 +02:00
Erik Montnemery c0a3b507c0
Add tests of frontend.add_extra_js_url (#119826) 2024-06-17 14:39:07 +02:00
epenet fbaba3753b
Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
epenet 492b158818
Add return type hints in tests (a-i) (#118939) 2024-06-06 12:17:08 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
epenet 461ac1e0bc
Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
epenet a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +02:00
Jan-Philipp Benecke 08529b3806
Remove deprecated `hass.components` from frontend tests (#114011) 2024-03-22 17:35:43 +01:00
Marc Mueller c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston 5b8591ec7e
Avoid reschedule churn in Storage.async_delay_save (#111091)
* Avoid circular import in Storage.async_delay_save

We call Storage.async_delay_save for every entity being added or removed
from the registry. The late import took more time than everything else
in the function.

* Avoid reschedule churn in Storage.async_delay_save

When we are adding or removing entities we will call async_delay_save
quite often which has to add and remove a TimerHandle on the event loop
which can add up when there are a lot of registry items changing.

If the timer handle still has 80% of the time remaining on it
we will avoid resceduling and let it fire at the time the
original async_delay_save call was made. This ensures we
do not force the event loop to rebuild its heapq because
too many timer handlers were cancelled at once

* div0

* add coverage for 0 since we had none

* fix bad conflict

* tweaks

* tweaks

* tweaks

* tweaks

* tweaks

* tweaks

* more test fixes

* mqtt tests rely on event loop overhead
2024-02-24 08:46:00 +01:00
Franck Nijhof 01372024f5
Add icon translations support (#103294)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-01-19 16:56:56 +01:00
Bram Kragten f5a6c88051
Don't load themes in safe mode (#102683) 2023-10-24 23:00:14 +02:00
Erik Montnemery 97cc05d0b4
Make it possible to restart core in safe mode (#102606) 2023-10-24 14:47:58 +02:00
Erik Montnemery e20d4abfe1
Test extra javascript functionality in frontend (#102643) 2023-10-24 11:31:16 +02:00
Erik Montnemery 421832e09c
Remove unused test fixture from frontend tests (#102642) 2023-10-24 11:13:44 +02:00
Erik Montnemery c481fdb7d0
Rename safe mode to recovery mode (#102580) 2023-10-23 20:33:08 +02:00
Ville Skyttä 70c49824d7
Import `util.dt` as `dt_util` in `components/[e-f]*` (#93758) 2023-05-30 00:00:11 +03:00
Paulus Schoutsen 79101b31d5
Fix frontend test again (#90754) 2023-04-04 00:11:20 -04:00
Paulus Schoutsen c5a87addc1
Fix frontend test (#90679) 2023-04-02 14:28:52 -04:00
epenet 1e352b60df
Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
epenet b68f502769
Add type hints to integration tests (part 7) (#87980) 2023-02-13 09:53:09 +01:00
epenet 7a4d15a657
Add type hints to integration tests (f-g) (#87700) 2023-02-08 13:33:52 +01:00
Joakim Plate c576a68d33
Upgrade pytest-aiohttp (#82475)
* Upgrade pytest-aiohttp

* Make sure executors, tasks and timers are closed

Some test will trigger warnings on garbage collect, these warnings
spills over into next test.

Some test trigger tasks that raise errors on shutdown, these spill
over into next test.

This is to mimic older pytest-aiohttp and it's behaviour on test
cleanup.

Discussions on similar changes for pytest-aiohttp are here:
https://github.com/pytest-dev/pytest-asyncio/pull/309

* Replace loop with event_loop

* Make sure time is frozen for tests

* Make sure the ConditionType is not async

  /home-assistant/homeassistant/helpers/template.py:2082: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    def wrapper(*args, **kwargs):
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

* Increase litejet press tests with a factor 10

The times are simulated anyway, and we can't stop the normal
event from occuring.

* Use async handlers for aiohttp

tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_still_image_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_get_stream_from_camera
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
tests/components/motioneye/test_camera.py::test_camera_option_stream_url_template
  /Users/joakim/src/hass/home-assistant/venv/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py:189: DeprecationWarning: Bare functions are deprecated, use async ones
    warnings.warn(

* Switch to freezegun in modbus tests

The tests allowed clock to tick in between steps

* Make sure skybell object are fully mocked

Old tests would trigger attempts to post to could services:

```
DEBUG:aioskybell:HTTP post https://cloud.myskybell.com/api/v3/login/ Request with headers: {'content-type': 'application/json', 'accept': '*/*', 'x-skybell-app-id': 'd2b542c7-a7e4-4e1e-b77d-2b76911c7c46', 'x-skybell-client-id': '1f36a3c0-6dee-4997-a6db-4e1c67338e57'}
```

* Fix sorting that broke after rebase
2022-11-29 22:36:36 +01:00
J. Nick Koston 332cf3cd2d
Resolve and caches paths for CachingStaticResource in the executor (#74474) 2022-07-06 13:49:48 -05:00
J. Nick Koston a614ddca28
Support requesting translations for multiple integrations in a single request (#71979) 2022-05-17 01:23:11 -05:00
Ville Skyttä b1360ffafb
Use http.HTTPStatus in components/f* (#58244) 2021-10-22 22:10:47 +02:00
Erik Montnemery f6682ba99d
Block tests from opening sockets (#55516) 2021-10-05 14:46:09 -10:00
Philip Allgaier d8ff52e55b
Add support for custom themes to use dark mode (#46532) 2021-05-25 13:26:24 +02:00
J. Nick Koston 344717d07d
Reduce time to first byte for frontend index (#49396)
Cache template and manifest.json generation
2021-04-18 21:17:30 -07:00
Paulus Schoutsen 87d40ff815
Do not cache frontend files during dev (#45698) 2021-01-30 00:05:06 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Philip Allgaier 9c1eb78a0f
Adjust safe_theme for better readability (#40223) 2020-09-23 18:57:35 +02:00
Paulus Schoutsen c6cba5ebc8
Remove HTML support from frontend (#39799) 2020-09-08 15:42:50 +02:00
Paulus Schoutsen fbbfd46fb8
Add .well-known/password-change (#39613) 2020-09-03 18:13:33 +02:00
Bram Kragten d66ddeb69e
Allow to set default dark theme and persist frontend default themes (#38548)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-05 17:42:23 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Paulus Schoutsen f436e29a0d
Add frontend version WS command (#34701) 2020-04-25 17:30:15 -07:00
Paulus Schoutsen 98f1548f2d
Allow fetching translations by categories (#34329) 2020-04-18 17:13:13 -07:00
springstan 9a40d5b7ed
Use HTTP_NOT_FOUND constant (#33835) 2020-04-09 00:57:47 +02:00
Bram Kragten 6bd55011a8
Check if panel url used and delay dashboard reg till start (#32771)
* Check if panel url used and delay dashboard reg till start

* move storage_dashboard_changed

* fix tests
2020-03-13 11:55:53 -07:00
Paulus Schoutsen beee1298c5
Extend safe mode (#31927)
* Extend safe mode

* Add safe mode boolean to config JSON output and default Lovelace

* Add safe mode to frontend

* Update accent color
2020-02-18 11:52:38 -08:00
Paulus Schoutsen 5fdc60e067
Add Safe Mode (#30723)
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00