Skip to content

Commit

Permalink
[CL-524] Ignore flaky elements in Chromatic tests (#12561)
Browse files Browse the repository at this point in the history
  • Loading branch information
vleague2 authored Dec 30, 2024
1 parent 6539f06 commit a95427e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
10 changes: 8 additions & 2 deletions apps/browser/src/platform/popup/layout/popup-layout.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ExtensionContainerComponent {}

@Component({
selector: "vault-placeholder",
template: `
template: /*html*/ `
<bit-section>
<bit-item-group aria-label="Mock Vault Items">
<bit-item *ngFor="let item of data; index as i">
Expand All @@ -53,7 +53,7 @@ class ExtensionContainerComponent {}
<ng-container slot="end">
<bit-item-action>
<button type="button" bitBadge variant="primary">Auto-fill</button>
<button type="button" bitBadge variant="primary">Fill</button>
</bit-item-action>
<bit-item-action>
<button type="button" bitIconButton="bwi-clone" aria-label="Copy item"></button>
Expand Down Expand Up @@ -301,6 +301,12 @@ class MockVaultSubpageComponent {}
export default {
title: "Browser/Popup Layout",
component: PopupPageComponent,
parameters: {
chromatic: {
// Disable tests while we troubleshoot their flaky-ness
disableSnapshot: true,
},
},
decorators: [
moduleMetadata({
imports: [
Expand Down
2 changes: 1 addition & 1 deletion libs/components/src/menu/menu-trigger-for.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class MenuTriggerForDirective implements OnDestroy {
private defaultMenuConfig: OverlayConfig = {
panelClass: "bit-menu-panel",
hasBackdrop: true,
backdropClass: "cdk-overlay-transparent-backdrop",
backdropClass: ["cdk-overlay-transparent-backdrop", "bit-menu-panel-backdrop"],
scrollStrategy: this.overlay.scrollStrategies.reposition(),
positionStrategy: this.overlay
.position()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { TableDataSource, TableModule } from "../../../table";
selector: "dialog-virtual-scroll-block",
standalone: true,
imports: [DialogModule, IconButtonModule, SectionComponent, TableModule, ScrollingModule],
template: ` <bit-section>
template: /*html*/ `<bit-section>
<cdk-virtual-scroll-viewport scrollWindow itemSize="47">
<bit-table [dataSource]="dataSource">
<bit-table [dataSource]="dataSource" data-chromatic="ignore">
<ng-container header>
<tr>
<th bitCell bitSortable="id" default>Id</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export const MenuOpen: Story = {
const menuButton = getAllByRole(table, "button")[0];
await userEvent.click(menuButton);
},
parameters: {
chromatic: { ignoreSelectors: [".bit-menu-panel-backdrop"] },
},
};

export const DefaultDialogOpen: Story = {
Expand Down

0 comments on commit a95427e

Please sign in to comment.