Commit graph

41 commits

Author SHA1 Message Date
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
springstan
ad102b3840
Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
2020-02-24 17:54:20 -08: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
Ville Skyttä
5216477353
Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Franck Nijhof
4f8663846b Migrate frontend tests from coroutine to async/await (#30386) 2020-01-02 14:23:56 -06:00
Bas Nijholt
ca0fad2cbb Sort imports according to PEP8 for components starting with "F" (#29766) 2019-12-09 14:14:40 +01:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
3a0616c680
Use resource for index routing. (#24223) 2019-05-31 11:27:05 -07:00
Paulus Schoutsen
1a3a38d370 Dynamic panels (#24184)
* Don't require all panel urls to be registered

* Allow removing panels, fire event when panels updated
2019-05-30 13:37:01 +02:00
Paulus Schoutsen
592e99947d
Convert frontend to do client-side modern JS detection (#23618)
* Convert frontend to do client-side async pick

* Further cleanup

* Updated frontend to 20190502.0

* Fix template caching

* Remove es5 test

* Lint

* Update description
2019-05-02 13:59:24 -07:00
Paulus Schoutsen
6b0180f753
Fix demo (#23087)
* Fix demo

* Fix types

* Fix all the things

* Fix type

* Fix test

* Lint
2019-04-14 16:59:06 -07:00
Rohan Kapoor
6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current REQUIREMENTS and DEPENDENCIES (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Paulus Schoutsen
f1a0ad9e4a
Frontend indicate require admin (#22272)
* Allow panels to indicate they are meant for admins

* Panels to indicate when they require admin access

* Do not return admin-only panels to non-admin users

* Fix flake8
2019-03-25 10:04:35 -07:00
Paulus Schoutsen
00b8d57cd0 Add frontend storage (#20880)
* Add frontend storage

* Update storage.py
2019-02-12 16:38:19 +01:00
Bram Kragten
0ef9882e2e Fix map icons 2019-01-30 17:09:56 +01:00
Paulus Schoutsen
d1a621601d No more opt-out auth (#18854)
* No more opt-out auth

* Fix var
2018-12-02 16:32:53 +01:00
Paulus Schoutsen
22a80cf733
Break up websocket component (#17003)
* Break up websocket component

* Lint
2018-10-01 11:21:00 +02:00
Paulus Schoutsen
81e21b90c9 Fix auth redirect (#16914)
* Fix auth redirect

* Remove old test
2018-09-27 09:02:50 -07:00
Paulus Schoutsen
e78f4d1b65
Extract lovelace to it's own component (#16816)
* Extract lovelace to it's own component

* Lint

* Update comment

* Lint

* Lint
2018-09-25 08:39:35 +02:00
Paulus Schoutsen
99c4c65f69
Add auth/authorize endpoint (#15887) 2018-08-09 09:27:54 +02:00
Paulus Schoutsen
974fe4d923 Fix frontend tests 2018-07-26 10:25:57 +02:00
Jason Hu
33f1577dac Frontend component should auto load auth coomponent (#15606) 2018-07-22 09:49:58 +02:00
Paulus Schoutsen
895306f822
Rename experimental UI to lovelace (#15065)
* Rename experimental UI to lovelace

* Bump frontend to 20180620.0
2018-06-20 15:13:08 -04:00