We almost forgot to test this, because we started without TDD.
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
Note: in this case, the behavior is even asynchronous, and thus a tool "asyncFn" is used to keep the test as simple as possible.
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
This is a kludge because extraction of segregated interface for KubeObject is very difficult. This commit uses actual instance of KubeObject instead as a fake.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
Key changes were:
- Introduction of dependencies as interfaces to permit stubbing in general (Dependency Inversion Principle)
- Introduction of segregated interfaces to only require stubbing of minimal stuff (Interface Segregation Principle)
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
Notice how interface is in fact segregated, i.e. it only advertises the minimal properties currently required.
With this we satisfy Interface Segregation Principle and thus permit e.g. minimal requirement for stubbing in future unit tests.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
This is to make a step towards satisfaction of Dependency Inversion Principle. It's not fully satisfied because we still depend on concrete instances of classes instead of interfaces.
This will start chain of thought to pursue warm and friendly unit testing and introduction of SOLID principles.
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
This was done in a naive way by disregarding stuff such as:
- Avoidance of shared global state (dependency inversion principle)
- Unit testing
- Minimal implementation over defensive code (elvis, just in case)
- Full understanding for use cases of all different kube objects
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
* Remove what-input dependency
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Use focus-visible prop and color fix in Icon
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix detail views not watching child components
- Add subscribeStores calls to all relavent details
- Add support for tracking overlapping subscribes as an optimization
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Resolve PR comments
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Detect the adding of a namespace when selected namespaces change
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update debug log
Signed-off-by: Sebastian Malton <sebastian@malton.name>