Commit Graph

24 Commits

Author SHA1 Message Date
Neil MacDougall 0df4379238
Dynamic content (Part 1) (#15343)
* Initial version

* Fix lint issues

* Tidy ups and lint fixes

* Add some notes

* Localisations

* Avoid using general 'actions' class name

* Further fixes

* Remove test code

* Address feedback from walk through

* Add test ids and updated e2e tests, fix lint

* Work around version issues

* Update .gitignore

* Remove dev readme file

* Add simple developer docs, update type comments, bump icon package version number

* Address PR feedback

* Address PR feedback 2nd round

* Fix lint

* Use user id hash in the local storage key

* FIrst version of dynamic content

* Revert merge errors

* Fix merge errors

* Fix bad merge

* Proper merge revert

* Factor out system info for clearer code

* Tweak

* Tweaks to config

* Fix lint

* Tidy ups, better types and more documentation

* Add support for settings

* Improve docs

* Remove unnecessary try catches around window.localStorage

* Tidy up config and settings types

* Update config to allow us to test this, off by default

* Addm LTS, remove debug content (will do this differently)

* Add unit tests

* Update unis tests

* Fix unit tests

* Tidy ups

* Add check for release info being an array

* Use CDN endpoint

* Update to use final endpoint and updates comments for yaml or json

* Add server version type

* Fix first round of PR feedback and update tests

* Address PR feedback

* Ensure content is always returned as text

* Address PR feedback

* Unit test updates
2025-10-22 11:05:46 +01:00
Giuseppe Leo e10f19e54d
Implement CRD logic for SCC registration online (#14615)
* Create registration composable

* Add logic to create registration CRD schema and fetch resource with WS

* Convert Registration list to single element

* Updating logic with real case data

* Update UX to display also invalid registrations; Add Types; Update displayed values for the registration

* Update registration values given new specifications: expiration, product name

* Map condition errors from registration to banner

* Code cleanup, removed duplications

* Abstract date and time formatting as it's app standard; convert file to TS

* Add unit test for time

* Prevent logic to register without code; Reset values with null

* Corrent async button bug which has default error

* Move tests to isolate composable and ensure quality

* Abstract initialization

* Add tests and correct found issues

* Add loading status

* Separate data fetching and mapping; Pool registration till hash is changed

* Correct async button callback

* Add missing registration value assignment after refactoring

* Fix asyncbutton wordings and colors not matching standards

* Fix tests: import and fake times

* Fix issue with timezone testing in CI

* Catch namespace creation issue
2025-07-03 17:13:21 +02:00
Cody Jackson 54874e0262 Add the card components necessary for the new detail page
This change will not affect any rendering currently in master
2025-06-12 17:14:56 -07:00
Phillip Rak c847fe3bd0 Resolve issue with vue-jest and vue3 interface features
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
2025-02-14 09:08:17 -07:00
Cody Jackson d5ce4fff2e Run the vue3 migration script
Commands run:

➤ yarn migrate
➤ git clean -fdx
➤ nvm use 20
➤ yarn
2024-08-22 16:05:36 -07:00
Giuseppe Leo c36b071e40
Remove every reference to .nuxt global option (#11265)
* Remove unused rehydratation plugin

* Remove any reference to the .nuxt folders

* Remove globalApp nuxt and any reference or use case to nuxt.error

* Replace errors handling with existing fail-whale logic
2024-06-21 11:15:05 +02:00
richa 5770637a4c
Disable rke1 UI (#10056)
* Added test file

* Added test in cluster create test

* Added fix for test svg

* Fixed test

* untrack file fix

* Removed unused code

* Fixed lint

* Remove blank line

* revert change to set up of isElementalActive const

* fix unit test

---------

Co-authored-by: Neil MacDougall <nmacdougall@suse.com>
Co-authored-by: Alexandre Alves <aalves@Alexandres-MacBook-Pro.local>
2023-12-27 12:05:25 +00: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 479125264f
Vue files are not correctly instrumented by the tests (#7166)
* Remove merge to master on PR tests due coverage issue

* Update GI action versions from 2 to 3

* Re-enable HTMl coverage for tests

* Remove deprecated nyc in package configuration from merge conflict; Ignore further folders from coverage

* Change tests checkout and print changed files on test during coverage job

* Add codecov configuration

* Add coverage if instrumented

* Remove changed files steps

* Increase memory for unit test

* Add .vue extension to unit test instrumentation

Add .vue extension to unit test instrumentation

* Remove HTML coverage due 'file:' issue

* Remove HTML report and add .vue files

* Restore GHA fetch to 1 for last commit
2023-09-01 10:02:51 +02:00
Evgeniya Vashkevich ebfd4ccd51
Changed navlink page and improved error handling for FileImageUpload (#9411) 2023-07-27 14:03:43 -07:00
Giuseppe Leo 07c2b36eb5
Exclude Jest unit test from TSConfig (#9168)
* Isolate tsconfig for jest unit tests

* Correct tsconfig path, exclude and imports

* Correct config case change mentioned in warning
2023-06-23 09:37:20 +02:00
Francesco Torchia ca6bda0531
Explicitly avoid "__tests__/utils folder from jest tests"
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2023-05-16 16:02:59 +02:00
n313893254 d28ec81a01 HARVESTER: Fix build harvester pkg 2022-12-20 17:04:03 +08: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
Giuseppe Leo 1c6b5ac666
Generate coverage value for both unit and E2E tests (#6690)
* Correct Jest coverage configuration

* Add coverage upload

* Exclude operationsl scripts from linting

* Rephrase title based on pull request title, run and attempt, with fallback for commits

* Add instrumentation for E2E coverage report

* Add merge logic to the coverage files

* Add instrumentalization for Cypress to generate coverage for E2E

* Download artifacts before merge coverage in CI

* Merge fix

* Copy coverage files before artifact upload

* Add summary after running tests

* Change restriction rules about coverage for pull_request and push

* Add documentation for the coverage

* Correct test documentation folder restructuring

* Add inclusion list for Cypress coverage; add scripts as exclusion

* Extend ignored path to be parsed for Jest to improve performances

* Workflow cleanup

* Checkout current branch head on test runs

* Submit separated coverage with different flags
2022-09-30 10:36:36 +02:00
Giuseppe Leo 5d4e32e855
Create unit test and linting jobs with GitHub Actions (#6562)
* Add GitHub Actions on push to run lint and unit test

* Store unit test coverage as artifact

* Correct unit tests coverage path collection

* Add i18n linting on CI

* Correct rancher-component path

* Remove pull request trigger from Drone

* Fix linting from master

Co-authored-by: Richard Cox <richard.cox@suse.com>
2022-08-01 16:25:20 +01:00
Neil MacDougall dee0bca367
Unit tests: Collect coverage for unit tests and components (#6381)
* Unit tests: Collect coverage for unit tests

* Fix lint issue
2022-07-15 14:50:09 +01:00
Phillip Rak 72b36cb360
Create Rancher Component Library (#5504)
This adds a new project for Rancher Components under `pkg/rancher-components` and replaces components used throughout dashboard with the versions used here. All imports for the following components have been updated:

```
  |- BadgeState.vue
  |- Banner.vue
  |- Card.vue
  |- Form
    |- Checkbox.vue
    |- LabeledInput.vue
    |- LabeledTooltip.vue
    |- RadioButton.vue
    |- RadioGroup.vue
    |- TextAreaAutoGrow.vue
```
2022-05-24 15:09:53 -07:00
Richard Cox 3a04cf7b1a Plugins: Initial codebase refactor and plugin support (#4779)
* Doc

* v0.7.0

* v0.7.1

* v0.7.2

* Add creators

* v0.1.14

* v0.1.17

* Add Yarn link

* Tidy ups and typos

* Allow models to be loaded from plugins

* v0.1.15

* v0.1.18

* v0.6.6

* Improve readme, fix cyperss log msg

* v0.1.17

* v0.1.19

* v0.6.7

* v0.6.8

* Fix logo ref when in shell

* Fix lint issues

* Fix error in example

* Fix script to work on linux

* Add ability to revert moves without losing changes

* Fix bug with custom models in a plugin

* Fix build of UI packages

* Add dist-pkg to .eslintignore

* Pull out util from extend-router to prevent router being pulled in UI packages

* Update PLUGINS.md

* Remove duplicate dependency

* Reduce size of built UI packages

* Share codemirror. Other tidy ups

* Further improvements

* Tidy ups to support i18n in plugins

* Clen up add comments

* More clean-ups and comments added

* Rename from extension to plugin

* Missed file in rename

* v0.6.9

* TIdy ups following rename

* v0.1.20

* v0.1.21

* More refactor and tidy up

* v0.1.22

* v0.1.18

* v0.1.19

* v0.1.23

* v0.6.10

* Version Packages. Improve naming. Unload.

* v0.6.11

* v0.1.20

* v0.1.21

* v0.1.24

* v0.6.12

* v0.1.25

* v0.1.22

* v0.6.13

* Fix issues when plugin is builtin

* Add missing files

* Fix lint issues and watcher ignores

* Fixes following review

* v0.1.28

* v0.1.31

* v0.6.20

* Fix coer.js version

* Fix bug where plugins included via npm don't work

* Changes post merge

* Move plugins doc to dev guide, add note at top of README

* Update cypress version

* Add note about the reset --hard in rejig -d

* Fixes post merge

* Rename @ranch to @rancher and ad plugins

* Improve routes support, add package assets support

* Add uninstall hooks and pass interal opts

* Fix rejig script

* Minor fixes

* Routing tweaks
- attempted to improve `addRoutes` typing, failed a lot
- improved typings in plugins.ts
- added "@pkg/*" entry and vue-shim (for importing components) to the pkg creator
- fixed some linting
- safely fail when Verdaccio isn't running
- fixed some typos

* Remove frontmatter-markdown-loader reference from nuxt-config

* Revert "Remove frontmatter-markdown-loader reference from nuxt-config"

This reverts commit 29ef6f2f7b.

* Exclude creators from dashboard build

* Revert "Exclude creators from dashboard build"

This reverts commit 8ede93ee7c.

* Ingore creators via tsconfig
- We're still susceptible with vue shims in multiple packages
- Need to determine why packages can't use shim from route
- Probably need to move `./vue-shim.d.ts` in to `./shell`. Needs testing with a pkg that imports a component

Co-authored-by: Richard Cox <richard.cox@suse.com>
# Conflicts:
#	components/nav/Header.vue
#	nuxt.config.js
#	package.json
#	yarn.lock
2022-05-10 10:00:39 +01:00
Giuseppe Leo 5800b2147b
Enable unit tests with Jest for Typescript components (#5779)
* Correct configuration to use correct vue/jest version based on jest version

* Add cusom command test for cluster configuration

* Add Banner tests

* Add global configuration for Jest

* Mock globally i18n getters for unit tests

* Add global directives for unit tests in Jest

* Add unit test case for tooltip directive and copy clipboard plugin

* Add test for custom command generated from tokens

* Add unit tests for CruResource component
2022-05-02 17:46:09 +02:00
Nancy 20976a70d4
Unit test jest (#3405)
* initial setup; unitinput simple example tests

* add coverage report

* testing info in docs

* rm unused babel config options

fix jest typescript

update unitinput unit tests

* Correct tsconfig Jest/Cypress conflicts; update libraries version; remove unnecessary Mocha/Chai

* Update unit input tests

* Ignore new rules from eslint

* Add local unit test script; Disable unit test coverage

* Add babel plugin definitions to avoid warning spam on build

* Pin @babel/preset-env to avoid issues with missing utils;  Merge yarn config from master; Moved packages to devDependencies as not required after build

* Remove file exclusion from editor settings

* Add Lodash types

* Add types to array utility

* Update ESlint rules to allow overload types declarations

* Create Jest tests from existing Ava ones

* Add Jest launcher for debugging

* Update Drone test script runner with CI version

* Remove Ava libraries, scripts and configuration

* Add Jest related linting rules

* Move tests within the related code path

Co-authored-by: cnotv <giuseppe.leo@suse.com>
2022-03-23 11:35:26 +01:00
Vincent Fiduccia e81317a609
Sortable table 2019-08-02 13:49:47 -07:00
Vincent Fiduccia d385ef8621
It's a k8s 2019-07-25 04:37:41 -07:00
Vincent Fiduccia e8e994b0d3
Import 2019-07-23 13:57:48 -07:00