Skip to content

Commit

Permalink
Merge branch 'main' into train-formation-update
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/elements/radio-button/radio-button-panel/readme.md
  • Loading branch information
jeripeierSBB committed Nov 20, 2024
2 parents 09a4332 + 11884da commit 8110e5f
Show file tree
Hide file tree
Showing 96 changed files with 3,265 additions and 1,341 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"lit": "3.2.1"
},
"devDependencies": {
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@commitlint/cli": "19.6.0",
"@commitlint/config-conventional": "19.6.0",
"@custom-elements-manifest/analyzer": "0.10.3",
"@custom-elements-manifest/to-markdown": "0.1.0",
"@eslint/eslintrc": "3.2.0",
Expand Down Expand Up @@ -101,8 +101,8 @@
"@types/mocha": "10.0.9",
"@types/node": "20.17.6",
"@types/react": "18.3.12",
"@typescript-eslint/eslint-plugin": "8.14.0",
"@typescript-eslint/parser": "8.14.0",
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"@web/test-runner": "0.19.0",
"@web/test-runner-commands": "0.9.0",
"@web/test-runner-playwright": "0.11.0",
Expand All @@ -111,17 +111,17 @@
"custom-elements-manifest": "2.1.0",
"date-fns": "4.1.0",
"esbuild": "0.24.0",
"eslint": "9.14.0",
"eslint": "9.15.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.6.3",
"eslint-plugin-import-x": "4.4.2",
"eslint-plugin-lit": "1.15.0",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-storybook": "0.11.0",
"eslint-plugin-storybook": "0.11.1",
"eslint-plugin-yml": "1.15.0",
"glob": "11.0.0",
"globals": "15.12.0",
"husky": "9.1.6",
"husky": "9.1.7",
"lint-staged": "15.2.10",
"lit-analyzer": "2.0.3",
"madge": "8.0.0",
Expand All @@ -142,7 +142,7 @@
"ts-lit-plugin": "2.0.2",
"tslib": "2.8.1",
"typescript": "5.6.3",
"typescript-eslint": "8.14.0",
"typescript-eslint": "8.15.0",
"urlpattern-polyfill": "10.0.0",
"vite": "5.4.11",
"vite-plugin-dts": "4.3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/elements-experimental/timetable-row/timetable-row.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert, expect } from '@open-wc/testing';
import type { SbbCardElement } from '@sbb-esta/lyne-elements/card.js';
import { fixture } from '@sbb-esta/lyne-elements/core/testing/private.js';
import { EventSpy, waitForCondition } from '@sbb-esta/lyne-elements/core/testing.js';
import { EventSpy } from '@sbb-esta/lyne-elements/core/testing.js';
import { html } from 'lit/static-html.js';

import type { ITripItem, Notice, PtSituation } from '../core/timetable/timetable-properties.js';
Expand Down Expand Up @@ -32,7 +32,7 @@ describe(`sbb-timetable-row`, () => {
const changeSpy = new EventSpy('click');

card.click();
await waitForCondition(() => changeSpy.events.length === 1);
await changeSpy.calledOnce();
expect(changeSpy.count).to.be.equal(1);
});
});
Expand Down
18 changes: 9 additions & 9 deletions src/elements/accordion/accordion.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, expect } from '@open-wc/testing';
import { html } from 'lit/static-html.js';

import { fixture } from '../core/testing/private.js';
import { waitForCondition, waitForLitRender, EventSpy } from '../core/testing.js';
import { EventSpy, waitForLitRender } from '../core/testing.js';
import {
SbbExpansionPanelElement,
type SbbExpansionPanelHeaderElement,
Expand Down Expand Up @@ -139,21 +139,21 @@ describe(`sbb-accordion`, () => {
}

headerTwo.click();
await waitForCondition(() => willOpenEventSpy.events.length === 1);
await willOpenEventSpy.calledOnce();
expect(willOpenEventSpy.count).to.be.equal(1);
expect(panelOne.expanded).to.be.equal(false);
expect(panelTwo.expanded).to.be.equal(true);
expect(panelThree.expanded).to.be.equal(false);

headerOne.click();
await waitForCondition(() => willOpenEventSpy.events.length === 2);
await willOpenEventSpy.calledTimes(2);
expect(willOpenEventSpy.count).to.be.equal(2);
expect(panelOne.expanded).to.be.equal(true);
expect(panelTwo.expanded).to.be.equal(false);
expect(panelThree.expanded).to.be.equal(false);

headerThree.click();
await waitForCondition(() => willOpenEventSpy.events.length === 3);
await willOpenEventSpy.calledTimes(3);
expect(willOpenEventSpy.count).to.be.equal(3);
expect(panelOne.expanded).to.be.equal(false);
expect(panelTwo.expanded).to.be.equal(false);
Expand Down Expand Up @@ -182,21 +182,21 @@ describe(`sbb-accordion`, () => {
}

headerTwo.click();
await waitForCondition(() => willOpenEventSpy.events.length === 1);
await willOpenEventSpy.calledOnce();
expect(willOpenEventSpy.count).to.be.equal(1);
expect(panelOne.expanded).to.be.equal(false);
expect(panelTwo.expanded).to.be.equal(true);
expect(panelThree.expanded).to.be.equal(false);

headerOne.click();
await waitForCondition(() => willOpenEventSpy.events.length === 2);
await willOpenEventSpy.calledTimes(2);
expect(willOpenEventSpy.count).to.be.equal(2);
expect(panelOne.expanded).to.be.equal(true);
expect(panelTwo.expanded).to.be.equal(true);
expect(panelThree.expanded).to.be.equal(false);

headerThree.click();
await waitForCondition(() => willOpenEventSpy.events.length === 3);
await willOpenEventSpy.calledTimes(3);
expect(willOpenEventSpy.count).to.be.equal(3);
expect(panelOne.expanded).to.be.equal(true);
expect(panelTwo.expanded).to.be.equal(true);
Expand Down Expand Up @@ -224,12 +224,12 @@ describe(`sbb-accordion`, () => {
const willOpenEventSpy = new EventSpy(SbbExpansionPanelElement.events.willOpen);

headerTwo.click();
await waitForCondition(() => willOpenEventSpy.events.length === 1);
await willOpenEventSpy.calledOnce();
expect(willOpenEventSpy.count).to.be.equal(1);
expect(panelTwo.expanded).to.be.equal(true);

headerThree.click();
await waitForCondition(() => willOpenEventSpy.events.length === 2);
await willOpenEventSpy.calledTimes(2);
expect(willOpenEventSpy.count).to.be.equal(2);
expect(panelThree.expanded).to.be.equal(true);

Expand Down
8 changes: 4 additions & 4 deletions src/elements/alert/alert/alert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, expect } from '@open-wc/testing';
import { html } from 'lit/static-html.js';

import { fixture } from '../../core/testing/private.js';
import { waitForCondition, EventSpy } from '../../core/testing.js';
import { EventSpy } from '../../core/testing.js';

import { SbbAlertElement } from './alert.js';

Expand All @@ -25,17 +25,17 @@ describe(`sbb-alert`, () => {
html`<sbb-alert title-content="disruption">Interruption</sbb-alert>`,
);

await waitForCondition(() => willOpenSpy.events.length === 1);
await willOpenSpy.calledOnce();
expect(willOpenSpy.count).to.be.equal(1);
await waitForCondition(() => didOpenSpy.events.length === 1);
await didOpenSpy.calledOnce();
expect(didOpenSpy.count).to.be.equal(1);

alert.requestDismissal();
expect(dismissalSpy.count).to.be.equal(1);

alert.close();

await waitForCondition(() => didCloseSpy.events.length === 1);
await didCloseSpy.calledOnce();
expect(willCloseSpy.count).to.be.equal(1);
expect(didCloseSpy.count).to.be.equal(1);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assert, expect } from '@open-wc/testing';
import { html } from 'lit/static-html.js';

import { fixture } from '../../core/testing/private.js';
import { EventSpy, waitForCondition, waitForLitRender } from '../../core/testing.js';
import { EventSpy, waitForLitRender } from '../../core/testing.js';

import { SbbAutocompleteGridButtonElement } from './autocomplete-grid-button.js';

Expand All @@ -24,7 +24,7 @@ describe(`sbb-autocomplete-grid-button`, () => {
const clickSpy = new EventSpy('click');

element.click();
await waitForCondition(() => clickSpy.events.length === 1);
await clickSpy.calledOnce();
expect(clickSpy.count).to.be.equal(1);
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/* @web/test-runner snapshot v1 */
export const snapshots = {};

snapshots["sbb-autocomplete-grid Safari DOM"] =
`<sbb-autocomplete-grid
data-state="closed"
id="sbb-autocomplete-grid-1"
role="grid"
>
snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
`<sbb-autocomplete-grid data-state="closed">
<sbb-autocomplete-grid-row
id="sbb-autocomplete-grid-row-1"
role="row"
Expand Down Expand Up @@ -55,9 +51,9 @@ snapshots["sbb-autocomplete-grid Safari DOM"] =
</sbb-autocomplete-grid-row>
</sbb-autocomplete-grid>
`;
/* end snapshot sbb-autocomplete-grid Safari DOM */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox DOM */

snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
`<div class="sbb-autocomplete__gap-fix">
</div>
<div class="sbb-autocomplete__container">
Expand All @@ -79,18 +75,26 @@ snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
</div>
<div class="sbb-autocomplete__panel">
<div class="sbb-autocomplete__wrapper">
<div class="sbb-autocomplete__options">
<div
class="sbb-autocomplete__options"
id="sbb-autocomplete-grid-2"
role="grid"
>
<slot>
</slot>
</div>
</div>
</div>
</div>
`;
/* end snapshot sbb-autocomplete-grid Safari Shadow DOM */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox Shadow DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
`<sbb-autocomplete-grid data-state="closed">
snapshots["sbb-autocomplete-grid Safari DOM"] =
`<sbb-autocomplete-grid
data-state="closed"
id="sbb-autocomplete-grid-1"
role="grid"
>
<sbb-autocomplete-grid-row
id="sbb-autocomplete-grid-row-1"
role="row"
Expand Down Expand Up @@ -139,9 +143,9 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
</sbb-autocomplete-grid-row>
</sbb-autocomplete-grid>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox DOM */
/* end snapshot sbb-autocomplete-grid Safari DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
`<div class="sbb-autocomplete__gap-fix">
</div>
<div class="sbb-autocomplete__container">
Expand All @@ -163,28 +167,24 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
</div>
<div class="sbb-autocomplete__panel">
<div class="sbb-autocomplete__wrapper">
<div
class="sbb-autocomplete__options"
id="sbb-autocomplete-grid-2"
role="grid"
>
<div class="sbb-autocomplete__options">
<slot>
</slot>
</div>
</div>
</div>
</div>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox Shadow DOM */
/* end snapshot sbb-autocomplete-grid Safari Shadow DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
`<p>
{
"role": "WebArea",
"role": "document",
"name": "",
"children": [
{
"role": "text",
"role": "statictext",
"name": "​"
},
{
Expand All @@ -197,16 +197,16 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
}
</p>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox */

snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
`<p>
{
"role": "document",
"role": "WebArea",
"name": "",
"children": [
{
"role": "statictext",
"role": "text",
"name": "​"
},
{
Expand All @@ -219,5 +219,5 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
}
</p>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome */

Loading

0 comments on commit 8110e5f

Please sign in to comment.