Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@heartlandone/vega
Advanced tools
Readme
This package is mainly for creating custom web components built with stencil.js.
vega-stencil is using eslint (config: .eslintrc.js
) along with prettier (config: .prettierrc.js
).
Make sure both tools have been set up properly in your IDE.
design token was originally stored at ../vega-design
package which is also responsible for generating corresponding CSS/JS file used by other clients including vega-stencil
.
Hence, if you want to test some change of design token and want to integrate them into vega-stencil, you need to re-run the consume command to fetch the CSS/JS files from vega-design
to vega-stencil
:
> npm run consume-design-token
Install node dependencies
> npm install
To generate a new stencil component
> npm run generate <element_tag>
Start local server to host preview your change for stencil components
> npm run start
# or
> npm run debug # no cache
To view the change in storybook
> npm run storybook
Currently, vega-stencil has two testing environments:
vega-badge.spec.tsx
).MockHTMLElement
vega-badge.e2e.ts
)vaga-date-picker.visual.e2e.ts
)'wcag2a', 'wcag2aa','wcag21a', 'wcag21aa'
(e.g. vega-date-picker.ada.e2e.ts
)The command to run both <1> and <2> is
> npm run test:base:coverage
# or
> npm run test:base:watch-all # this command will re-run when src files are changed
The command to run visual regression test only is
> npm run test:visual
> npm run test:single-suite <suite_file_name>
Example: npm run test:single-suite vega-modal.spec
> npm run test:single-case <test_case_name_regex>
Which will run only tests with a name that matches the regex. Example: npm run test:single-case "should render proper css of modal when open modal"
> npm run test:single-suite -- --testNamePattern <test_case_name_regex>
1.<3> 2.node scripts/visual-test-screenshot-handle.js
1.install Live Server extension 2.open screenshot/compare.html by open with Live Server 3.choose All Screenshots on right top 4.click blank area under left side if the stand pic not show ,and manuel compare it
For e2e test to disable a featureflag:
describe('vega-input', () => {
let page: E2EPage;
beforeEach(async () => {
page = await newE2EPage();
await page.evaluateOnNewDocument(() => {
window['VegaDisabledFeatureKeys'] = ['VEGA_FORM.FORM_FIELD_CONTROLLER_VALIDATION'];
});
});
For spec test to disable a featureflag:
describe('vega-input', () => {
beforeAll(() => {
FeatureFlag.disable('VEGA_FORM.FORM_FIELD_CONTROLLER_VALIDATION');
});
Note:
stencil
is not behave the exact same as running it with jest
CLI directly (especially for non-component test suite), this is because stencil is mocking most of the html element by using its own test runtime component, hence we would suggest avoiding using jest
CLI directly to run unit tests as you might see different testing result when run it in Github pipeline.vega-stencil/src/components/vega-carousel/vega-carousel.tsx
// ...
/**
* The below method is e2e-test covered in
* @see{module:vega-carousel-e2e-render}
*/
/* istanbul ignore next */
@Watch('perPage')
onPerPagePropsChange(): void {
this.resizeWindowHelper();
this.applySpacingHelper();
}
// ...
module:vega-carousel-e2e-render
is defined in vega-stencil/src/components/vega-carousel/test/vega-carousel.e2e.ts
describe('vega-carousel', () => {
/** @module vega-carousel-e2e-render */
it('renders', async () => {
const page: E2EPage = await newE2EPage();
await page.setContent('<vega-carousel></vega-carousel>');
const element: E2EElement = await page.find('vega-carousel');
expect(element).toHaveClass('hydrated');
});
});
Make sure you have passed the necessary pre commit check by running
> npm run pre-release
Once the above command succeeded, run this command to build the artifacts for releasing
> npm run release
This is because the current stencil build in your workspace is staled and you need to re-build the artifacts by running yarn run release
.
FAQs
Vega - the design system of Heartland Payment Systems
The npm package @heartlandone/vega receives a total of 5,112 weekly downloads. As such, @heartlandone/vega popularity was classified as popular.
We found that @heartlandone/vega demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.