Skip to content

Commit

Permalink
test(option-group): fix (#8811)
Browse files Browse the repository at this point in the history
**Related Issue:** #7180

## Summary

The previous selector included the component’s style tag. This allows
the test to pass.
  • Loading branch information
alisonailea authored Feb 22, 2024
1 parent 49838b7 commit 1272f1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 87 deletions.
84 changes: 0 additions & 84 deletions packages/calcite-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,36 +779,6 @@ export namespace Components {
*/
"thumbnailPosition": LogicalFlowPosition;
}
interface CalciteCardGroup {
/**
* When `true`, interaction is prevented and the component is displayed with lower opacity.
*/
"disabled": boolean;
/**
* Accessible name for the component.
*/
"label": string;
/**
* Specifies the size of the component. Child `calcite-card`s inherit the component's value.
*/
"scale": Scale;
/**
* Specifies the component's selected items.
* @readonly
*/
"selectedItems": HTMLCalciteCardElement[];
/**
* Specifies the selection mode of the component.
*/
"selectionMode": Extract<
"multiple" | "single" | "single-persist" | "none",
SelectionMode
>;
/**
* Sets focus on the component's first focusable element.
*/
"setFocus": () => Promise<void>;
}
interface CalciteCheckbox {
/**
* When `true`, the component is checked.
Expand Down Expand Up @@ -5451,10 +5421,6 @@ export interface CalciteCardCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLCalciteCardElement;
}
export interface CalciteCardGroupCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLCalciteCardGroupElement;
}
export interface CalciteCheckboxCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLCalciteCheckboxElement;
Expand Down Expand Up @@ -5915,23 +5881,6 @@ declare global {
prototype: HTMLCalciteCardElement;
new (): HTMLCalciteCardElement;
};
interface HTMLCalciteCardGroupElementEventMap {
"calciteCardGroupSelect": void;
}
interface HTMLCalciteCardGroupElement extends Components.CalciteCardGroup, HTMLStencilElement {
addEventListener<K extends keyof HTMLCalciteCardGroupElementEventMap>(type: K, listener: (this: HTMLCalciteCardGroupElement, ev: CalciteCardGroupCustomEvent<HTMLCalciteCardGroupElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLCalciteCardGroupElementEventMap>(type: K, listener: (this: HTMLCalciteCardGroupElement, ev: CalciteCardGroupCustomEvent<HTMLCalciteCardGroupElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
}
var HTMLCalciteCardGroupElement: {
prototype: HTMLCalciteCardGroupElement;
new (): HTMLCalciteCardGroupElement;
};
interface HTMLCalciteCheckboxElementEventMap {
"calciteInternalCheckboxBlur": boolean;
"calciteCheckboxChange": void;
Expand Down Expand Up @@ -7412,7 +7361,6 @@ declare global {
"calcite-block-section": HTMLCalciteBlockSectionElement;
"calcite-button": HTMLCalciteButtonElement;
"calcite-card": HTMLCalciteCardElement;
"calcite-card-group": HTMLCalciteCardGroupElement;
"calcite-checkbox": HTMLCalciteCheckboxElement;
"calcite-chip": HTMLCalciteChipElement;
"calcite-chip-group": HTMLCalciteChipGroupElement;
Expand Down Expand Up @@ -8137,36 +8085,6 @@ declare namespace LocalJSX {
*/
"thumbnailPosition"?: LogicalFlowPosition;
}
interface CalciteCardGroup {
/**
* When `true`, interaction is prevented and the component is displayed with lower opacity.
*/
"disabled"?: boolean;
/**
* Accessible name for the component.
*/
"label": string;
/**
* Emits when the component's selection changes and the selectionMode is not `none`.
*/
"onCalciteCardGroupSelect"?: (event: CalciteCardGroupCustomEvent<void>) => void;
/**
* Specifies the size of the component. Child `calcite-card`s inherit the component's value.
*/
"scale"?: Scale;
/**
* Specifies the component's selected items.
* @readonly
*/
"selectedItems"?: HTMLCalciteCardElement[];
/**
* Specifies the selection mode of the component.
*/
"selectionMode"?: Extract<
"multiple" | "single" | "single-persist" | "none",
SelectionMode
>;
}
interface CalciteCheckbox {
/**
* When `true`, the component is checked.
Expand Down Expand Up @@ -13029,7 +12947,6 @@ declare namespace LocalJSX {
"calcite-block-section": CalciteBlockSection;
"calcite-button": CalciteButton;
"calcite-card": CalciteCard;
"calcite-card-group": CalciteCardGroup;
"calcite-checkbox": CalciteCheckbox;
"calcite-chip": CalciteChip;
"calcite-chip-group": CalciteChipGroup;
Expand Down Expand Up @@ -13143,7 +13060,6 @@ declare module "@stencil/core" {
"calcite-block-section": LocalJSX.CalciteBlockSection & JSXBase.HTMLAttributes<HTMLCalciteBlockSectionElement>;
"calcite-button": LocalJSX.CalciteButton & JSXBase.HTMLAttributes<HTMLCalciteButtonElement>;
"calcite-card": LocalJSX.CalciteCard & JSXBase.HTMLAttributes<HTMLCalciteCardElement>;
"calcite-card-group": LocalJSX.CalciteCardGroup & JSXBase.HTMLAttributes<HTMLCalciteCardGroupElement>;
"calcite-checkbox": LocalJSX.CalciteCheckbox & JSXBase.HTMLAttributes<HTMLCalciteCheckboxElement>;
"calcite-chip": LocalJSX.CalciteChip & JSXBase.HTMLAttributes<HTMLCalciteChipElement>;
"calcite-chip-group": LocalJSX.CalciteChipGroup & JSXBase.HTMLAttributes<HTMLCalciteChipGroupElement>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ describe("calcite-option-group", () => {
const page = await newE2EPage({
html: `<calcite-option-group label="test-group"></calcite-option-group>`,
});

const group = await page.find("calcite-option-group");
expect(group.shadowRoot.textContent).toBe("test-group");
const el = await page.find("calcite-option-group >>> div");
expect(el.textContent).toBe("test-group");
});
});

0 comments on commit 1272f1f

Please sign in to comment.