1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/main
Iku-turso a277cfcf02
Technical requirements for behavioural unit tests (#5084)
* Implement a lot of technical requirements for behavioural unit tests

Note: the crux of this was to make routing env-agnostic, and not based on URLs as magic strings, but instead something type-enforced.

Note: extension-based routes comply to same exact interface by "late-registering" their routes when installed. Routes are just injectables.

Note: another chunk of global shared state is no more.

Note: a lot of explicit side effects have been cornered to injectables.

Note: a lot of stuff has become reactive as part if this.

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make a directory commonly available

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Require id for <Select /> to prevent non-deterministic renders

This was caused by global state in a 3rd party lib: "react-select".

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Specify id for all <Select /> to satisfy previous commit

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Prevent explicit side effect in component by using existing dependency instead

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Extract instantiation of "conf" as injectables for causing side effects

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Introduce a legacy-helper to make gradual refactoring of inheritors of Singleton easier

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Make legacy unit tests for hotbar green and more simple by using the new legacy helper

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Temporarily kludge all unit tests green with a disclaimer about allowing side-effects

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Remove kludge in previous commit by explicitly permitting specific side effects where old unit tests require it

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Prevent old unit test with side effects from accessing file system

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Migrate to actual typing for di.permitSideEffects

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Prevent unit tests from failing because of non-standard method of HTML-element not present in js-dom

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Adapt integration tests to recent changes

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Fix code style

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Fix artifact from bad rebase

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Add a deprecation from a review comment

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Remove change that is not required

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove redundant comment

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix code style

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove redundant file

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix bad merge

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Improve variable name

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Tweak logger interface to be more descriptive

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make injecting legacy singleton always provide new instance

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove conditional typing when not needed

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Improve naming of variable

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove unnecessary code style changes

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove flag for causing side effects from too broad scope

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Override side-effects in unit test using injectable instead of monkey patching

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Flag some side-effects and add general overrides

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Fix unit tests in CI by removing explicit side-effect

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Remove explicit side-effect from getting default shell

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce abstraction for getting absolute paths

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using abstraction for getting absolute path to control explicit side effect

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce abstraction for joining paths

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Switch to using abstraction for joining paths to control explicit side effect

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix fake implementation for join paths

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix test after removing explicit side effect

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove explicit side effects from kubeconfig-syncs

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix arguments after removing explicit side effect

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make registrators not async for not being needed anymore

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make generalCatalogEntities non-observable, as there is no requirement

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Remove redundant code

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>

* Simplify logic for registering general catalog entity sources

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add TODO

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Replace function for getting application menu items with reactive solution

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix typo in interface name

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove global shared state usages of hot bar store

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove redundant enum

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
2022-03-31 16:57:05 +03:00
..
__test__ Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
app-paths Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
catalog Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
catalog-sources Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
child-process Enable TLS on lens-k8s-proxy (#4941) 2022-03-17 15:07:40 +02:00
cluster-detectors Enforce some naming conventions (#4813) 2022-03-01 13:06:53 -05:00
context-handler TLS cert per cluster for lens-k8s-proxy (#5081) 2022-03-28 08:39:57 -04:00
create-cluster Update injectable library (#4842) 2022-02-25 11:10:13 -05:00
helm Make routes in back-end comply to Open Closed Principle (#4859) 2022-03-11 12:20:00 +02:00
initializers Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
ipc Enforce member-delimiter-style using eslint (#4870) 2022-02-16 14:43:03 -05:00
kube-auth-proxy TLS cert per cluster for lens-k8s-proxy (#5081) 2022-03-28 08:39:57 -04:00
kubeconfig-manager Update injectable library (#4842) 2022-02-25 11:10:13 -05:00
kubectl Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
menu Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
navigate-to-route Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
navigate-to-url Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
prometheus Enforce some naming conventions (#4813) 2022-03-01 13:06:53 -05:00
protocol-handler Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
proxy-functions Enable TLS on lens-k8s-proxy (#4941) 2022-03-17 15:07:40 +02:00
router Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
routes Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
shell-session Bump injectable to 5.1.2 (#5010) 2022-03-17 08:15:21 -04:00
tray Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
utils Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
app-updater.ts Bump electron-updater from 4.6.1 to 4.6.5 (#5125) 2022-03-29 15:20:41 -04:00
catalog-pusher.ts Fix catalog syncer long delay (#4911) 2022-02-23 06:52:43 +02:00
cluster-manager.ts Allow better typings for extending type of KubernetesCluster (#4843) 2022-02-10 15:55:03 -05:00
developer-tools.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
exit-app.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
getDi.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
getDiForUnitTesting.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
index.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
is-auto-update-enabled.injectable.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
k8s-request.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
lens-proxy.ts Bump @types/http-proxy from 1.17.7 to 1.17.8 (#5126) 2022-03-29 15:20:30 -04:00
logger.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
native-theme.ts Add 'Sync with computer' theme option (#4973) 2022-03-09 08:08:24 -05:00
proxy-env.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
resource-applier.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
shell-sync.ts Shorten license header to reduce amount of clutter in top of the files (#4709) 2022-01-18 10:18:10 +02:00
window-manager.injectable.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00
window-manager.ts Technical requirements for behavioural unit tests (#5084) 2022-03-31 16:57:05 +03:00