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

⚡ perf: update stencil #1504

Merged
merged 13 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/small-yaks-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': patch
---

**core**: update stencil to 4.22.2
37 changes: 19 additions & 18 deletions e2e/cypress/component/bal-dropdown.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('bal-dropdown', () => {

cy.getByPlaceholder('Pick a color').click()
cy.getByRole('option', { name: 'Red' }).click()
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vRed')
cy.getByPlaceholder('Pick a color').should('have.value', 'Red')
})
Expand All @@ -57,9 +57,9 @@ describe('bal-dropdown', () => {
cy.getByPlaceholder('Pick a color').click()
cy.getByRole('option', { name: 'Red' }).click()
cy.getByRole('option', { name: 'Purple' }).click()
cy.get('@balChange').should('have.been.calledTwice')
cy.get('@balChange').shouldHaveEventDetail(['vRed'])
cy.get('@balChange').shouldHaveEventDetail(['vRed', 'vPurple'], 1)
cy.get('@balChange').should('have.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail(['vRed'], 0)
cy.get('@balChange').shouldHaveEventDetail(['vRed', 'vPurple'], 2)
cy.getByPlaceholder('Pick a color').should('have.value', ['Red', 'Purple'])
})

Expand Down Expand Up @@ -89,7 +89,7 @@ describe('bal-dropdown', () => {
})

cy.getByRole('button', { name: 'Löschen' }).click()
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 1)
cy.get('@balChange').shouldHaveEventDetail(null)
cy.getByPlaceholder('Pick a color').should('have.value', '')
})
Expand All @@ -107,7 +107,7 @@ describe('bal-dropdown', () => {

cy.getByPlaceholder('Pick a color').click()
cy.getByRole('option', { name: 'Red' }).click()
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vRed')
cy.getByPlaceholder('Pick a color').should('have.value', 'Red')
})
Expand All @@ -125,9 +125,9 @@ describe('bal-dropdown', () => {
cy.getByPlaceholder('Pick a color').click()
cy.getByRole('option', { name: 'Red' }).click()
cy.getByRole('option', { name: 'Purple' }).click()
cy.get('@balChange').should('have.been.calledTwice')
cy.get('@balChange').should('have.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail(['vRed'])
cy.get('@balChange').shouldHaveEventDetail(['vRed', 'vPurple'], 1)
cy.get('@balChange').shouldHaveEventDetail(['vRed', 'vPurple'], 2)
cy.getByPlaceholder('Pick a color').should('have.value', ['Red', 'Purple'])
})

Expand Down Expand Up @@ -159,7 +159,7 @@ describe('bal-dropdown', () => {
})

cy.getByRole('button', { name: 'Löschen' }).click()
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 1)
cy.get('@balChange').shouldHaveEventDetail(null)
cy.getByPlaceholder('Pick a color').should('have.value', '')
})
Expand All @@ -182,7 +182,7 @@ describe('bal-dropdown', () => {
cy.getByPlaceholder('Pick a color').should('have.value', 'Red').click()
cy.getByRole('option', { name: 'Red' }).click()

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vRed')
})

Expand Down Expand Up @@ -248,7 +248,7 @@ describe('bal-dropdown', () => {
})

cy.getByRole('button', { name: 'Schliessen' }).first().click({ force: true })
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 1)
cy.get('@balChange').shouldHaveEventDetail(['vPurple'])
cy.getByPlaceholder('Pick a color').should('have.value', ['Purple'])
})
Expand All @@ -266,7 +266,7 @@ describe('bal-dropdown', () => {

cy.getByPlaceholder('Pick a color').click().type('{downArrow}').type('{enter}')

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vRed')
cy.getByPlaceholder('Pick a color').should('have.value', 'Red')
})
Expand All @@ -290,9 +290,9 @@ describe('bal-dropdown', () => {
.type('{upArrow}')
.type('{enter}')

cy.get('@balChange').should('have.been.calledTwice')
cy.get('@balChange').should('have.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail(['vYellow'])
cy.get('@balChange').shouldHaveEventDetail(['vPurple', 'vYellow'], 1)
cy.get('@balChange').shouldHaveEventDetail(['vPurple', 'vYellow'], 2)
cy.getByPlaceholder('Pick a color').should('have.value', ['Purple', 'Yellow'])
})

Expand All @@ -307,7 +307,7 @@ describe('bal-dropdown', () => {

cy.getByPlaceholder('Pick a color').click().type('{Y}').wait(200).type('{enter}')

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vYellow')
cy.getByPlaceholder('Pick a color').should('have.value', 'Yellow')
})
Expand All @@ -323,7 +323,7 @@ describe('bal-dropdown', () => {

cy.getByPlaceholder('Pick a color').focus().type('{Y}').wait(200).blur()

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vYellow')
cy.getByPlaceholder('Pick a color').should('have.value', 'Yellow')
})
Expand Down Expand Up @@ -390,7 +390,7 @@ describe('bal-dropdown', () => {

cy.get('.bal-dropdown__root__content').contains('Banana')
cy.getByPlaceholder('Pick a color').should('have.value', 'Banana')
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail('vBanana')
})
})
Expand All @@ -415,7 +415,7 @@ describe('bal-dropdown', () => {

cy.getByLabelText('Color').click()
cy.getByRole('option', { name: 'Green' }).click()
cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').should('have.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail('vGreen')
cy.getByPlaceholder('Pick a color').should('have.value', 'Green')
})
Expand Down Expand Up @@ -478,6 +478,7 @@ describe('bal-dropdown', () => {
cy.getByLabelText('Country').click()
cy.getByRole('option', { name: 'Italy' }).click()
cy.getByRole('input', { name: 'Reset' }).click()
cy.waitAfterIdleCallback()
cy.getByLabelText('Country').should('have.value', 'Germany')
})
})
Expand Down
21 changes: 10 additions & 11 deletions e2e/cypress/component/bal-select.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ describe('bal-select', () => {

it('should select option with the key entry plus enter', () => {
cy.get('bal-select').find('.bal-select__control__input').click()
cy.get('bal-select').type('Cypress.io{downArrow}').type('Cypress.io{enter}')
cy.get('bal-select').type('{downArrow}').type('{enter}')

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').shouldHaveEventDetail('v1995')
cy.get('@balChange').shouldHaveEventDetail('v1996')
})

it('should not fire a click event, because the select is disabled', () => {
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('bal-select', () => {
cy.get('bal-select').type('{downArrow}').type('{enter}').blur({ force: true })

cy.get('@balChange').should('have.been.calledOnce')
cy.get('@balChange').shouldHaveEventDetail('v1995')
cy.get('@balChange').shouldHaveEventDetail('v1996')
cy.get('@balBlur').should('have.been.calledOnce')
})

Expand All @@ -133,9 +133,8 @@ describe('bal-select', () => {
cy.get('bal-select').type('{downArrow}').type('{enter}')
cy.get('bal-select').type('{downArrow}').type('{enter}')

cy.get('@balChange').should('have.been.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail(['v1995'], 0)
cy.get('@balChange').shouldHaveEventDetail(['v1995', 'v1996'], 1)
cy.get('@balChange').should('have.been.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail(['v1996'], 0)
})

it('multiple should fire a balBlur when leaving the control (multiple)', () => {
Expand Down Expand Up @@ -174,9 +173,9 @@ describe('bal-select', () => {
cy.get('bal-select').type('{downArrow}').type('{enter}')
cy.get('bal-select').type('{downArrow}').type('{enter}')

cy.get('@balChange').should('have.been.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail(['v1995'], 0)
cy.get('@balChange').shouldHaveEventDetail(['v1995', 'v1996'], 1)
cy.get('@balChange').should('have.been.callCount', 4)
cy.get('@balChange').shouldHaveEventDetail(['v1996'], 0)
// cy.get('@balChange').shouldHaveEventDetail(['v1996', 'v1998'], 2)
})

it('should fire balInput and balChange event after value change (typeahead + multiple)', () => {
Expand Down Expand Up @@ -213,8 +212,8 @@ describe('bal-select', () => {
cy.get('bal-select').find('.bal-select__control__input').type('{1}').type('{9}').type('{9}')
cy.get('bal-select').type('{downArrow}').type('{enter}')

cy.get('@balChange').should('have.been.callCount', 1)
cy.get('@balChange').shouldHaveEventDetail(['v1995'])
cy.get('@balChange').should('have.been.callCount', 2)
cy.get('@balChange').shouldHaveEventDetail(['v1996'])
})

it('should fire a balBlur when leaving the control (typeahead + remote)', () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion e2e/cypress/support/component-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
<link rel="stylesheet" type="text/css" href="generated/www/assets/baloise-design-system.css" />
<link rel="stylesheet" type="text/css" href="generated/www/assets/all.css" />
</head>
<body style="padding: 1rem">
<main data-cy-root></main>
Expand Down
2 changes: 1 addition & 1 deletion libs/output-target-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"@stencil/core": "~4.11.0",
"@stencil/core": "~4.22.2",
"tslib": "~2.3.0"
},
"type": "commonjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ function copyResources(config: Config, resourcesFilesToCopy: string[], directory
const copyTasks = resourcesFilesToCopy.map(rf => {
return {
src: join(__dirname, '../../../resources/control-value-accessors/', rf),
dest: join(directory, rf),
dest: join(directory),
keepDirStructure: false,
warn: false,
ignore: [],
}
})
return config.sys.copy(copyTasks, join(directory))
Expand Down
3 changes: 2 additions & 1 deletion libs/output-target-angular/src/lib/output-angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ async function copyResources(config: Config, outputTarget: OutputTargetAngular)
{
src: srcDirectory,
dest: destDirectory,
keepDirStructure: false,
keepDirStructure: true,
warn: false,
ignore: [],
},
],
srcDirectory,
Expand Down
2 changes: 1 addition & 1 deletion libs/output-target-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"tslib": "~2.3.0",
"@stencil/core": "~4.11.0"
"@stencil/core": "~4.22.2"
},
"peerDependencies": {
"react": "~18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion libs/output-target-react/src/lib/output-react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ async function copyResources(config: Config, outputTarget: OutputTargetReact): P
{
src: srcDirectory,
dest: destDirectory,
keepDirStructure: false,
keepDirStructure: true,
warn: false,
ignore: [],
},
],
srcDirectory,
Expand Down
2 changes: 1 addition & 1 deletion libs/output-target-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"tslib": "~2.3.0",
"@stencil/core": "~4.11.0"
"@stencil/core": "~4.22.2"
},
"type": "commonjs",
"main": "./dist/src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion libs/output-target-vue/src/lib/output-vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ async function copyResources(config: Config, outputTarget: OutputTargetVue) {
{
src: srcDirectory,
dest: destDirectory,
keepDirStructure: false,
keepDirStructure: true,
warn: false,
ignore: [],
},
],
srcDirectory,
Expand Down
2 changes: 1 addition & 1 deletion libs/output-target-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"tslib": "~2.3.0",
"@stencil/core": "~4.11.0",
"@stencil/core": "~4.22.2",
"fs-extra": "11.2.0",
"replace-in-file": "~7.1.0"
},
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading