Janne Savolainen
7bf16faca0
Rename files for convention
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:52 +02:00
Janne Savolainen
724a571eb0
Revert "Try extracting dependencies to separate files"
...
This reverts commit 8af0e748
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:43 +02:00
Janne Savolainen
5b21c99b9d
Switch to using "container" instead of Inject-component for following reasons:
...
- Conservation of Extension API, as now injection mechanism travels where ever component is used with unchanged interface in place
- Minimize impact on existing code by replacing duplicated Inject-components with usages of single container
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:25 +02:00
Mikko Aspiala
7061aad4f4
Update ogre-tools for a more subtle way of providing components with dependencies
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
2021-12-04 12:22:25 +02:00
Janne Savolainen
fadcadc5b3
Simplify typing of async mock
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:25 +02:00
Janne Savolainen
9cef2f27aa
Try extracting dependencies so separate files
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:15 +02:00
Janne Savolainen
1e257c42cf
Add types for ogre-tools in WebStorm
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:07 +02:00
Janne Savolainen
0f4f8dd8d5
Extract menu items as own dependency
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:22:00 +02:00
Janne Savolainen
667e90ba0e
Make component transient
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:21:46 +02:00
Janne Savolainen
1707a95eef
Fix merge conflicts
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
98d63daef6
Update version of injectable for disambiguous typing
...
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Mikko Aspiala
d203c40c77
Make unit test runs faster and not fail for TypeScript errors/warnings
...
Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
2021-12-04 12:20:42 +02:00
Janne Savolainen
d592848a7f
Try making UI unit testable in Ubuntu by removing usage of component which uses an experimental browser feature
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
550abfcc0d
Organize some interfaces to communicate intent
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
0fc9fe626d
Update snapshots
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
53dc2c853d
Fix incorrect typing in test
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
7938e9c4ef
Demonstrate how InjectNaive could be not naive by using injectables
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
78e1c6357b
Improving typing of mock
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
fbabb32dab
Switch to using testing library queries from screen export
...
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2021-12-04 12:20:42 +02:00
Janne Savolainen
c57473c875
Revert "Try altering cancelIdleCallback stub to see if that makes test deterministic"
...
This reverts commit d5148b6537944525414e918709d862d0593107d0.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:41 +02:00
Janne Savolainen
e793859d82
Try altering cancelIdleCallback stub to see if that makes test deterministic
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Janne Savolainen
4c775256bb
Remove prop from wrong place
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Janne Savolainen
3a124a6393
Increase credibility of some unit tests by using actual instance as stub
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Janne Savolainen
76a9973ab1
Fix code style
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Janne Savolainen
f3ef9c50c9
Remove unused data-attribute
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Janne Savolainen
fbeac80fbc
Switch to non deprecated prop type
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:20:20 +02:00
Mikko Aspiala
bc3a8794cc
Add unit test for missing namespace when removing a kube object
...
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>
2021-12-04 12:20:20 +02:00
Mikko Aspiala
0c53a16971
Update yarn.lock
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:20:05 +02:00
Mikko Aspiala
653958d8f9
Tweak UI in a dialog
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:19:43 +02:00
Mikko Aspiala
293cdb87ec
Simplify dependencies for a component
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:19:29 +02:00
Mikko Aspiala
cfaf5f9402
Bundle dependencies of a component to a composing object
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:19:12 +02:00
Mikko Aspiala
9eda5e9d26
Revert "Try stop linting before running tests"
...
This reverts commit d1fca3c38c4f47625053f4b8a307dca0ec7db528.
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:18:57 +02:00
Mikko Aspiala
e0d5c41b3b
Add todo for unit testing a weird complication without full understanding
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:18:36 +02:00
Mikko Aspiala
78a989a72a
Implement first meaningful unit tests for a complete behavior
...
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>
2021-12-04 12:18:17 +02:00
Mikko Aspiala
90ec6809d7
Try stop linting before running tests
...
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Mikko Aspiala <mikko.aspiala@houston-inc.com>
2021-12-04 12:17:45 +02:00
Janne Savolainen
ec075ad957
Fix code style
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
a2f9a76add
Kludge first unit test with more than minimal data
...
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>
2021-12-04 12:16:33 +02:00
Janne Savolainen
350f07b457
Introduce first unit test made possible because of recently demonstrated changes
...
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>
2021-12-04 12:16:33 +02:00
Janne Savolainen
94d3f6b5fb
Make typing of dependency functions more strict
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
a0f0d3e811
Improve naming of type parameter
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
73e3dd95f4
Make another dependency a segregated interface instead of concrete instance
...
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>
2021-12-04 12:16:33 +02:00
Janne Savolainen
d9e8821d33
Simplify a way of getting cluster name
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
29d0634729
Demonstrate even step further to have an interface as dependency instead of concrete instance
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
91b14ee3fc
Demonstrate a step further to have an interface as dependency instead of concrete instance
...
With this we get yet closer to satisfaction of Dependency Inversion Principle.
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 12:16:33 +02:00
Janne Savolainen
8d0abcc9d5
Demonstrate naive way to make component not responsible of it's dependencies and not use global shared state
...
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>
2021-12-04 12:16:33 +02:00
Janne Savolainen
b07b8dc096
Rename method to not be misleading
...
Signed-off-by: Janne Savolainen <janne.savolainen@houston-inc.com>
2021-12-04 11:55:19 +02:00
Janne Savolainen
10eb95ae67
Implement breadcrumbs for deleting different kube objects
...
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>
2021-12-04 11:55:07 +02:00
Sebastian Malton
304941d397
Fix IngressApi being registered with a wrong new apiBase ( #4485 )
2021-12-03 15:19:01 -05:00
dependabot[bot]
7973f4bce2
Bump @types/webpack from 4.41.31 to 4.41.32 ( #4499 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 14:33:05 -05:00
dependabot[bot]
9aadb721c9
Bump webpack-dev-server from 3.11.2 to 3.11.3 ( #4498 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 12:49:52 -05:00