Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LITE-29279: Add new components #31

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

arnaugiralt
Copy link
Member

Pretty big PR to add new components, mainly SimpleDialog and FormDialog.


  • Create SimpleDialog component
  • Create FormDialog component
  • Create RadioTable component
  • Create RadioInput component
  • Create SelectInput component
  • Create TextField component (wraps Connect UI Toolkit textfield)
  • Create VerticalTabs component
  • Create webComponents utils
  • Create validation utils
  • Create generic utils
  • Update MainPage component to listen to the "fullscreenSize" event from the Connect Portal
  • Update views to inherit height styles
  • Added more colors to COLORS_DICT constant

- Create SimpleDialog component
- Create FormDialog component
- Create RadioTable component
- Create RadioInput component
- Create SelectInput component
- Create TextField component (wraps Connect UI Toolkit textfield)
- Create VerticalTabs component
- Create webComponents utils
- Create validation utils
- Create generic utils
- Update MainPage component to listen to "fullscreenSize" event from the Connect Portal
- Update views to inherit height styles
- Added more colors to COLORS_DICT constant
- Move all tests to /ui/tests directory
- Create "createFactory" function to ease testing Vue components
- Refactor confusing usages of vi.doMock for regular vi.mock
import { mount, shallowMount } from '@vue/test-utils';
import merge from 'lodash.merge';

export const createFactory =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would be the goal of this factory?, it is mounting and setting options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a way to simplify component setup. When you need to set up lots of properties for a component, like in the FormDialog test, you need to repeat that in each point where you mount the component, which is very painful.

This is a pattern that I've used in the past with Vue Test Utils, it works quite well for medium-to-large components, or just small components that need lots of stubs.

I am not sure if this is the best option to use as a standard for our extension tests, but I'd keep it for now since it solves an issue, and we can figure out if we like it or not during development. Wdyt?

@arnaugiralt arnaugiralt marked this pull request as ready for review March 1, 2024 09:06
@arnaugiralt arnaugiralt merged commit 1885a72 into master Mar 1, 2024
2 checks passed
@arnaugiralt arnaugiralt deleted the feat/LITE-29279-add-dialog-components branch March 1, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants