Commit Graph

63 Commits

Author SHA1 Message Date
Alexandre Alves 88cbee575b
fix bug with Unit Input component not updating correctly (#13780)
* test fix

* working on unit tests

* remove console log

* bump shell version

* fix broken unit inputs

* fix unit test
2025-03-18 18:17:29 +00:00
cnotv ecd8322322 Update tests for ArrayList component 2025-03-06 17:32:40 +01:00
Francesco Torchia 5bca2af24c
[unit tests]: Add SelectOrCreateAuthSecret.test.ts
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-20 13:13:22 +01:00
Francesco Torchia 04026144c7
Add LabeledSelect unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-18 14:45:56 +01:00
Francesco Torchia 31830df000
Add unit-tests: KnownHostsEditDialog.test.ts, SSHKnownHosts.test.ts
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-02-12 16:30:46 +01:00
Yonas Berhe 23ba8dde87 automation: services tests 2025-01-31 15:26:56 -08:00
Francesco Torchia cd73a687a4
Lint
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-01-02 12:29:38 +01:00
Francesco Torchia 55cf3b3a7c
Implement NodeScheduling.test
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2025-01-02 12:04:15 +01:00
Cody Jackson c77ee88b01 Adding `emits` to all rancher-components to fix linting rules 2024-12-04 09:04:19 -07:00
Francesco Torchia eac3deaa4b
Add harvester features
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 15:38:36 +01:00
Phillip Rak d63e3bd045 Add disabled prop to `ColorInput.vue`
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-10-17 10:21:52 -07:00
Alexandre Alves 24568dc109
fix bug with LabeledSelect with "multiple" attribute (#12129)
* fix issue with labeledSelect in mode multiple by allowing the binding of the attribute to the element v-select

* Add test for component to emit the correct value as array

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2024-10-04 16:33:32 +01:00
Nancy 5607114e5d
update all instances of LabeledInput using v-model.number to use v-model:value.number (#11902)
* update all instances of LabeledInput using v-model.number

* add probe http headers unit test

* add hookoption test

* remove codemirror focus change
2024-09-19 14:46:37 -07:00
Giuseppe Leo 519e2e3ebd
Feature/11881 unit input type fix (#11939)
* Add container resource limit tests

Add real case scenario for unit input component

Add input test for container resource limit

Add base unit to unit input test

Add blur test for container resource limit and unit input

Extend input tests to all cases

Add test case with parent passing value and update on emission

Update tests

Update tests to match emitters

* Add emitters for unit input

* Accept ID pairing with data suggestion fix

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>

* Enable tests after fix

---------

Co-authored-by: Phillip Rak <rak.phillip@gmail.com>
2024-09-18 17:02:28 +02:00
Nancy 85c5c28c22
Vue3 fix unit tests (#11776)
* remove $set from AKS validators

* fix cruGKE not rendering

* fix most aks unit tests

* fix crueks and eks config unit tests

* fix eks networking and nodegroup unit tests

* fix gke unit tests

* fix consumption gauge test

* fix namespacefilter tests

* fix command and taints unit tests

* fix questions unit tests

* fix hpa and service unit tests

* fix registryconfigs unit tests

* fix job unit tests

* fix longhorn unit tests

* fix addextensionsrepos unit tests

* fix rke2 basics unit tests

* fix container shell unit tests

* fix last aks pool test

* fix mount tests

* fix namespace and pv unit tests

* fix codemirror unit tests

* clean up aks, boolean, namespacefilter unit tests

* fix namespacefilter test

* remove redundant test case
2024-09-10 08:07:21 -07:00
Phillip Rak 84a617c424 Add unit tests for InputWithSelect, Select, & ServiceNameSelect
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-27 14:37:26 -07:00
Cody Jackson 8d59cd5914 Skipping all failing unit tests for the Vue3 merge. 2024-08-22 21:12:40 -07:00
Phillip Rak a71857ce7d Unit test updates - partially fixed
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:56 -07:00
Phillip Rak 0fb02f5b2d Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:56 -07:00
Cody Jackson fe4fc0cd63 Rebase fixes 2024-08-22 16:09:56 -07:00
Phillip Rak 9793716efd Unit test updates
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Phillip Rak 97b58ca4f0 Update unit tests
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
Phillip Rak e39ce7899f Resolve a batch of unit test failures
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-08-22 16:09:54 -07:00
cnotv ff08d80e0e Lint: Manually fixed issues related to vueApp variable added by the script 2024-08-22 16:07:03 -07:00
cnotv 78d70353c5 Unit test: Migrate unit tests with the script 2024-08-22 16:07:03 -07:00
Nancy f4fbf0068c
GKE: fix node pool taint effect options (#11339)
* update gke node pools to use NO_SCHEDULE PREFER_NO_SCHEDULE and NO_EXECUTE as taint effect options

* fix gke node pool test

* fix taints default add value and tests
2024-07-03 07:20:37 -07:00
Francesco Torchia e477c681a8
Add Banners unit tests
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-05-24 00:11:50 +02:00
Evgeniya Vashkevich 6bd67ba3ff
[INT] Refactored some of the plugins - 3 (#10946)
[INT] Refactored some of the plugins - 3
2024-05-08 15:10:27 -07:00
Phillip Rak 6940a250b8 Remove uneeded directives
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2024-04-25 08:18:55 -07:00
Nancy 86001e4532
Fix KeyValue behaviour when parent component updates value prop (#10643)
* remove legacy items except for project config-maps and secrets

* add kv test

* add a watcher to keyvalue to ensure that it updates when the parent component changes the value being displayed

* add keyvalue unit tests to cover add and remove buttons

* remove testing code

* remove more test code

* use isequal instead of json stringify

---------

Co-authored-by: Mo Mesgin <mmesgin@Mos-M2-MacBook-Pro.local>
2024-03-26 10:52:41 -07:00
Nancy 13f2e5fe00
Improve LabeledSelect performance (#10650)
* remove labeledselect ability to detect stale option labels in order to improve performance

* add key rerender hack to fix psa dropdown option labels not refreshing

* fix lint
2024-03-20 08:04:44 -07:00
Sorin a54edec8b6
Merge pull request #10522 from scures/9810/incorrect-abbreviation
9810/incorrect-cluster-name-abbreviation
2024-03-12 14:44:30 +01:00
scures 27889b0dbf
feat: cluster abbreviation to 3 chars, shows customisation on cluster creation 2024-03-11 14:43:28 +01:00
Mo Mesgin c216c976eb fix unit test 2024-03-05 18:08:31 -08:00
Giuseppe Leo cb6f806274
Correct issue with TS after tsconfig split with unit tests (#9686)
* Correct file test naming

* Correct test files import and names

* Restructure TS configuration with shared path

* Copied TS configuration for shell due current architecture state
2023-12-12 11:35:38 +01:00
Giuseppe Leo fb9728e293
Cannot paste into textboxes under Advanced section (#9824)
* Remove duplication in Editor story, preventing to be loaded

* Add all ArrayList cases

* Correct percentage typo

* Allow to past single line in array list input; Create related tests

* Add slot cases for ArrayList

* Add values to display disabled add/remove buttons

* Remove focused tests
2023-10-04 16:55:40 +02:00
Mo Mesgin c453356ea1 fixed unit tests warnings 2023-09-20 15:49:53 -07:00
Nancy 371524f732
Reduce performance impact of LabeledSelect getOptionLabel (#9689)
* imrpove labeledSelect getOptionLabel performance when options are strings

* refactor labeledselect getOptionLabel and write test

* remove redundant if block in ls getOPtionLabel

* refactor getUpdatedOption
2023-09-12 12:58:02 -07:00
Bastian Hofmann dcb8b2542b Fix tests
Signed-off-by: Bastian Hofmann <mail@bastianhofmann.de>
2023-08-24 13:58:29 +01:00
Alexandre Alves 5c17900425
Resource Quota up-and-down input doesn't update the value on the request quota object to be sent (#9577)
* add @change event to capture arrow presses on firefox

* address pr comments

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-08-23 09:25:08 +01:00
Evgeniya Vashkevich ebfd4ccd51
Changed navlink page and improved error handling for FileImageUpload (#9411) 2023-07-27 14:03:43 -07:00
Dai Yuzeng 71e73cb605
HARVESTER: only change priority by select component (#9266)
* HARVESTER: only change priority by select component

* apply weight input fix to node affinity and add unit tests

* fix node affinity unit test name

---------

Co-authored-by: Nancy Butler <42977925+mantis-toboggan-md@users.noreply.github.com>
2023-07-06 15:29:08 -07:00
Giuseppe Leo 01eeb0548f
Add recommended lint rules globally (#8997)
* Update configuration

* Create default config for eslint

* Restore plugin:vue/recommended

* Add exceptions and overrides

* Correct manually remaining issues

* Adding further picked exceptions groupped up

* Fix or disable specific cases manually and singularly

* Add naming linting exception

* Remove unused variable in component

* Move rules to default

* Autocorrect rancher/components linting issues

* Configure VSCode to use multiple files, to display linting for rancher components

* Disable jest lint hook restriction for string list component

* Autofix
2023-06-23 17:02:55 +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
Francesco Torchia 646f2a1159
Merge pull request #8853 from torchiaf/fix/8655
Test automation around YAML chomping
2023-05-16 10:34:02 +02:00
Francesco Torchia 7653bc3ca6
[KeyValue] test multiline field
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-11 17:13:13 +02:00
Alexandre Alves c876a2ecf6
Agent configuration RKE2 (#8643)
* porting Neils poc work

* add all namespaces to pod affinity ui + add banners to for windows warning and no defaults for limits area + set namespaces as input as default for agent configuration + add node selector to agent configuration

* update banner copy in affinity section for windows + add visual separator between node and pod affinity

* added weight input for node affinity - preferred + made weight input for pod affinity appear only for preferred + changed MatchExpressions component to cover matchFields and matchExpressions  in node affinityupdate banner copy in affinity section for windows + add visual separator between node and pod affinity

* fix lint errors

* working on e2e tests for agent configuration on rke2

* e2e tests work in progress

* working on e2e tests

* fix issue with Tolerations component where data wasnt being propagated because some inputs were missing a connection with the update method

* finish missing bits of e2e tests + fix height of inputs + revert back default affinity fetch

* disable no arbitrary waits in cypress

* fix broken e2e and unit tests

* fix e2e tests again

* fix lint issue

* set timeout for intercepting request to 10 seconds

* update path for default setting in agent configuration

* fix issue in dark mode in group panel + update strings to match rke1 interface + remove label from namespace input on pod affinity + clean up agent config data on save and restore it if it fails + change order of ui blocks in agent config interface

* address low hanging fruit PR comments

* remove console log

* move agent config po to components folder

* remove select.po in favour of labeledselect.po + fix data-testid in arrayList component and also its unit tests + make unit-input po leverage the use of LabeledInputPo + fix title assertion

* address final comments on e2e tests

* fix issues with PodAffinity component + update e2e test payload check

* final PR fixes

* addressing PR comments

* remove log

* reverting changes to ClusterManagerCreateRke2CustomPagePo as it was impacting other tests + add a method to go to custom cluster creation page

* e2e test updates

* updating banners copy

---------

Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MBP.lan>
2023-05-11 12:00:22 +01:00
cnotv 55a1c660c7 Update name according to latest change to options and add tests related to creation 2023-04-11 09:54:27 +02:00
Giuseppe Leo 6f102d0bff
When creating a resource, limit the namespace options based on filters in top nav (#8308)
* Add tests to namespace picker for resources

* Get namespaces from state and map to options

* Add comment to the Namespace getter logic in the store

* Hide Rancher System namespaces

* Update existing test

* Add tests for namespaces getter

* Create getter to retrieve readonly namespaces

* Split active namespaces function

* Add fleet filtering logic

* Correct mode for NS component

* Add comment information about restriction for read only
2023-03-23 18:08:49 +01:00
Nancy 21167e1dc9
fix labeledselect getOptionLabel to use reduce prop when labels change (#8176)
* fix labeledselect getOptionLabel to use reduce prop when labels change

* Add unit tests

---------

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2023-02-15 09:19:48 -07:00