-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
- 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 = |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Pretty big PR to add new components, mainly
SimpleDialog
andFormDialog
.SimpleDialog
componentFormDialog
componentRadioTable
componentRadioInput
componentSelectInput
componentTextField
component (wraps Connect UI Toolkit textfield)VerticalTabs
componentwebComponents
utilsvalidation
utilsMainPage
component to listen to the"fullscreenSize"
event from the Connect PortalCOLORS_DICT
constant