Commit Graph

56 Commits

Author SHA1 Message Date
Giuseppe Leo 793f7c6023
Initial migration of Vue3 for compatible fixes (#10858)
* Correct file naming and small TS issues

Correct TS related issues

* Manual replacement of :is on standard HTML tags

* Add missing required in the code dependencies

* Correct SCSS import

* Correct test file naming

* Correct typo in markup

* Use alias for types import
2024-04-23 20:16:46 +02:00
Alexandre Alves 764fa6087d
add e2e tests for #10389 and #9926 (#10745)
* add e2e tests for #10389 and #9926

* disable eslint for massive blueprint schema file

* fix e2e test issue + sneaky improvement for carousel unit test

* uncomment missing e2e test

* simplify schemas data and logic to generate a V2 monitoring on a local cluster for e2e tests

* minor code cleanup
2024-04-10 08:41:18 +01:00
Alexandre Alves 00e4f83c34
code cleanup + fix breaking logic on unit test with non-existance of nodes to clone + add unit test (#10737) 2024-04-02 17:19:29 +01:00
Phillip Rak 6206f9763c
Merge pull request #10716 from rak-phillip/chore/remove-nuxt-link
Replace `nuxt-link` with `router-link`
2024-04-01 08:00:12 -07:00
Neil MacDougall 0770ab76e5
Add unit tests for etcd banner fix (#10692)
* Add unit tests for etcd banner fix

* Fix lint issues
2024-03-28 16:58:39 +00:00
Phillip Rak fdc415d437 Use correct stubs in unit tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-27 14:29:55 -07:00
Phillip Rak 6e9f80c8c2
Merge pull request #10689 from rak-phillip/chore/simple-store
Replace `createNamespace` pattern with a simple store for sharing data
2024-03-27 07:59:46 -07:00
Richard Cox 89d4eab4ca
Merge pull request #10455 from richard-cox/fix-dup-mgmt-setting-requests
Remove duplicate calls to mgmt settings on fresh load
2024-03-27 11:03:21 +00:00
Phillip Rak e5bbf42c52 Mock `dispatch` for unit tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-26 10:38:29 -07:00
Richard Cox 340b7170c5 Fix FixedBanner unit tests 2024-03-25 17:01:01 +00:00
Phillip Rak 5d849775e6 Fix error in AppModal width validator
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-21 15:42:26 -07:00
Phillip Rak 1f02f9e4d2 Fix width for `AppModal.vue`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-07 14:28:47 -07:00
Phillip Rak fa399ee34c Create a new `AppModal` component
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-03-07 10:46:35 -07:00
codyrancher 1dfd3c0c2c
Merge pull request #10333 from codyrancher/title
More informative page titles
2024-02-15 09:43:57 -07:00
Francesco Torchia 4315f41979
Add Yaml keymap box to the storybook; code refactoring; add close button unit test
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-02-13 17:47:26 +01:00
Francesco Torchia 1e585b9469
Add CodeMirror unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-02-13 11:56:04 +01:00
Cody Jackson 36a31a397e More informative page titles 2024-02-12 20:11:45 -07:00
Evgeniya Vashkevich 25618ad4a0
[INT] Replaced vue-clipboard2 library with clipboard-polyfill (#10072)
* [INT] Replaced vue-clipboard2 library with clipboard-polyfill
2023-11-30 16:31:35 -08:00
Evgeniya Vashkevich 92d810399a
[FEAT] Removed all mentions of Pod Security Policies (#9962) 2023-11-01 11:02:43 -07:00
Alexandre Alves a68a49730e
fix issue with project resource quotas fields being cleared + add unit tests (#9808)
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-09-29 12:54:08 +01:00
Bastian Hofmann b6429cfd5c Fix lint
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
Bastian Hofmann dcb8b2542b Fix tests
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
momesgin 17f5bb58aa
filter RKE1 s3 snapshots (#9460)
Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-08-02 09:03:24 -07:00
momesgin 7896059c49
filter failed snapshots (#9390)
* filter failed snapshots

* fixed import

* added one more test case

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2023-07-26 10:28:53 -07:00
Francesco Torchia b2bf86bb08
Merge remote-tracking branch 'upstream/master' into merge-master-to-epinio-dev 2023-06-22 12:58:57 +02:00
richa e7fbf0dfcd
Onenter newline textarea (#9116)
* Added test for preventDefault

* Added test for prevent default event on keypress Enter in CruResource component

* Removed test console log

* Fixed lint

* Added data-testid to form

* Fixed lint

* Add new line on pressing enter

* Test enter new line

* Test textarea Enter button in CruResource form

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>

---------

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
Co-authored-by: Francesco Torchia <francesco.torchia@suse.com>
2023-06-20 15:43:34 +02:00
Richard Cox 48f1114006 Merge remote-tracking branch 'upstream/master' into epinio-dev 2023-06-19 15:40:07 +01:00
richa 65fc1d2dad
Automation preventdefault on press enter (#9088)
* Added test for preventDefault

* Added test for prevent default event on keypress Enter in CruResource component

* Removed test console log

* Fixed lint

* Added data-testid to form

* Fixed lint
2023-06-16 14:16:00 +02:00
Richard Cox d90ba881a6 Merge remote-tracking branch 'upstream/master' into merge-master-2 2023-05-25 16:51:00 +01:00
Richard Cox 936d35bdb1 Fix failing tests 2023-05-18 14:28:28 +01:00
Giuseppe Leo 467a456b1b
Remove previous implementation of hiding PSP check for clusters with K8S 1.25 even if PSP is enabled in charts installation/update (#8553)
* Remove PSP checkbox logic for default charts

* Remove PSP value check for custom charts using shared component
2023-03-31 08:54:56 +02:00
Giuseppe Leo d0eb4f32c2
Custom chart UIs show PSP switch on Kubernetes v1.25 (#8505)
* Formatting test code

* Remove wrapping styles from ChartPsp checkbox

* Add PSP display condition; allow to pass title

* Prevent checkbox to disappear on value change on certain conditions

* Ignore path for given map of charts/keys if k8s >= 1.25 and PSP is disabled

* Changed way to retrieve cluster version to standard method
2023-03-27 18:02:03 +02:00
Phillip Rak 4e21f2338c Mount `clean-html` directive in tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2023-03-22 08:30:17 -07:00
Nancy d9794c375c
add enable psp checkbox to custom chart uis (#8163)
* add enable psp checkbox to custom chart uis

* fix chartpsp checkbox import

* expand chartpsp tests, fix path in chartpsp component
2023-02-17 15:32:08 -07:00
Sorin 00e389d6da
Persistent deployment data (#6852)
* Persists Github deployment data
* Moves GitHub Deployment card to own component
* Fixes/Tweaks
- Add indicator to app detail commits list to show deployed commit
- Add l10n
- hide github description field if there's no description (phantom icon)
- add typing for app env var
- Fix application of app env var (add/remove as appropriate)

---------

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-02-10 15:14:20 +01:00
Giuseppe Leo 0768d82f16
PSA minor changes (#8022)
* Add missing and correct i18n PSA labels

* Correct description size by removing helper

* Add title to Namespace list tooltip if any PSA

* Allow to disable use of checkbox for PSA form

* Change timeout for growl to 5s on Pod warning due PSA

* Add type label for PSA

* Move PSA menu under Advanced

* Replace toggling system label with extending the value within the same

* Emit initial PSA form values con creation if no checkboxes due lack of interactions
2023-01-25 14:02:26 +01:00
Giuseppe Leo 8497f587d7
Add PSA custom resource in Cluster Manager (#7678)
* Add PSA resource model, edit, list, types, config, utils and navigation

* Remove controls sorting from config file in PSA form due unnecessary added logic

* Add missing type to exemptions

* Remove component specific grid alignment styling

* Add meaningful values on PSA form tests

* Add prefix for the namespace PSA form

* Correct PSA form test

* Revert RKE cluster erroneous changes

* Rename all the PSA form values to match specification and avoid issues

* Create function to convert array to dictionary

* Add types and replace function with utility in PSA form

* Trim exemptions values for PSA form

* Correct util test and function

* Enable YAML editor for PSA resource
2023-01-20 16:26:43 +01:00
Richard Cox 2a779a8873
Merge pull request #7797 from richard-cox/improve-ns-filter
Improve performance of NamespaceFilter when there are thousands of entries
2023-01-10 16:49:46 +00:00
Giuseppe Leo 3e31e9f138
Add support for Pod Security Admission in the Namespace resource (#7619)
* Create models, config and utils for PSA

* Create PSA tab form view

* Create custom labels for Namespace

* Add icon option for Namespace detail view

* Add icon for Namespace list

* Add PSA tab for Namespace edit view

* Add i18n for all the PSA parts

* Separate PSA labels between mode and versions

* Filter DetailTop Namespace labels from PSA versions

* Correct unit test

* Correct Namespace tooltips for details, to be created after fetching the resources

* Remove unnecessary model

* Add todo for PSA implementation

* Add TODO for tests with checkbox and select

* Correct namespace list link with model method

* Add TODO

* Move i18n key for PSA

* Align Namespace detail view chips icon to the top

* Restore labels and annotation to the Namespace view

* Merge LabelsPSA features to existing Labels component

* Move all the PSA logic from the view to the model

* Tweaks following review

DetailTop
- Remove PSA specific code from generic component

ResourceDetail
- Remove PSA specific code from generic component
- Remove plumbing for descriptions and icons from parent component to DetailTop

Labels&Annotations component
- Default `show system labels` to off
- Ensure size of `Labels` and `Annotations` titles are the same
- Improve padding
- Remove PSA specific code from generic component
- Removed un-needed margin-bottom

Project/Namespace List
- Improve padlock icon alignment
- Improve spacing around PSA list in tooltip (this will pop up often)

PodSecurtyAdmission settings component
- Improved alignment on PSA checkbox

General Improvements
- Always show Labels&Annotations on Namespace config (view) page

* Changes following testing
- Fix display of show/hide system labels when there are no system labels
- Ensure PSA order shown in project/namespaces list PSA tooltip matches PSA controls in Namespace edit/config page
- Remove two usages of lodash
  - pickBy --> new common pickBy
  - values --> Object.values

* Fix unit tests

Co-authored-by: Richard Cox <richard.cox@suse.com>
2023-01-06 16:01:40 +01:00
Richard Cox c52006b547 Fix typing...
- These are fine in unit test land... but not in e2e (which should probably exclude __test__)
2022-12-23 10:31:29 +00:00
Richard Cox e19c7c043a Fix unit tests
- fix one issue brought in by pr
- fix warning related to namespaceFilterMode
2022-12-23 09:56:38 +00:00
Richard Cox 762b3e4163 Updates following review
- Tweak settings text
- Use new filter icon
- Tweak "too many" text
- Allow only selecting a single namespace when in 'too many' mode
2022-12-02 12:37:35 +00:00
Giuseppe Leo 398dd308d4
Add icon option to Banner and Error component (#7586)
* Add icon option for the Banner

* Add icon option for the Error

* Fix CruResource tests

* Apply @rancher/components linting rules
2022-11-30 18:10:39 +01:00
Alexandre Alves b63c360069
Unit testing components (#7420)
* unit testing asyncbutton and backlink components

* add several unit tests

* minor update to component due to unit tests + add unit test for GrowlManager

* update unit tests

* update unit tests

* update unit tests

* update unit tests

* update unit tests

* add missing test to growlmanager

* update unit tests

* fix growl tests

* fix linting issues on yarn build

* address PR comments

* fix lint issues

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2022-11-25 09:48:17 +00:00
Giuseppe Leo eb5e00a84f
Fix linting issue after rule changes due merge overlapping (#7521) 2022-11-22 17:42:19 +01:00
Sorin e204ce2b3e
Application card test (#7402)
* Application card unit-test
2022-11-22 15:22:05 +01:00
Francesco Torchia f192b9db78
Merge pull request #7456 from torchiaf/fix/7455
unit tests: Collapse, SimpleBox
2022-11-18 13:16:29 +01:00
Giuseppe Leo 8bb5896292
Fix format linting issues (#7494) 2022-11-18 12:05:36 +01:00
Giuseppe Leo cd947db43b
Add unit tests for Namespace filtering in resources (#7465)
* Prevent errors if no resource is retrieved for NamespaceFilter; Add data-testid attributes for testing purposes and ocmments for readability

* Add NamespaceFilter component tests

* Add Workload loading unit tests

* Restore mokcs globally after each test

* Add issue number to TODO comment
2022-11-18 00:05:42 +01:00
Phillip Rak 3d410d0974 Apply linter auto-fixes
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2022-11-16 18:38:20 -07:00