mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[CL-524] Ignore flaky elements in Chromatic tests (#12561)
This commit is contained in:
@@ -41,7 +41,7 @@ class ExtensionContainerComponent {}
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "vault-placeholder",
|
selector: "vault-placeholder",
|
||||||
template: `
|
template: /*html*/ `
|
||||||
<bit-section>
|
<bit-section>
|
||||||
<bit-item-group aria-label="Mock Vault Items">
|
<bit-item-group aria-label="Mock Vault Items">
|
||||||
<bit-item *ngFor="let item of data; index as i">
|
<bit-item *ngFor="let item of data; index as i">
|
||||||
@@ -53,7 +53,7 @@ class ExtensionContainerComponent {}
|
|||||||
|
|
||||||
<ng-container slot="end">
|
<ng-container slot="end">
|
||||||
<bit-item-action>
|
<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>
|
||||||
<bit-item-action>
|
<bit-item-action>
|
||||||
<button type="button" bitIconButton="bwi-clone" aria-label="Copy item"></button>
|
<button type="button" bitIconButton="bwi-clone" aria-label="Copy item"></button>
|
||||||
@@ -301,6 +301,12 @@ class MockVaultSubpageComponent {}
|
|||||||
export default {
|
export default {
|
||||||
title: "Browser/Popup Layout",
|
title: "Browser/Popup Layout",
|
||||||
component: PopupPageComponent,
|
component: PopupPageComponent,
|
||||||
|
parameters: {
|
||||||
|
chromatic: {
|
||||||
|
// Disable tests while we troubleshoot their flaky-ness
|
||||||
|
disableSnapshot: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
decorators: [
|
decorators: [
|
||||||
moduleMetadata({
|
moduleMetadata({
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export class MenuTriggerForDirective implements OnDestroy {
|
|||||||
private defaultMenuConfig: OverlayConfig = {
|
private defaultMenuConfig: OverlayConfig = {
|
||||||
panelClass: "bit-menu-panel",
|
panelClass: "bit-menu-panel",
|
||||||
hasBackdrop: true,
|
hasBackdrop: true,
|
||||||
backdropClass: "cdk-overlay-transparent-backdrop",
|
backdropClass: ["cdk-overlay-transparent-backdrop", "bit-menu-panel-backdrop"],
|
||||||
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
||||||
positionStrategy: this.overlay
|
positionStrategy: this.overlay
|
||||||
.position()
|
.position()
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import { TableDataSource, TableModule } from "../../../table";
|
|||||||
selector: "dialog-virtual-scroll-block",
|
selector: "dialog-virtual-scroll-block",
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [DialogModule, IconButtonModule, SectionComponent, TableModule, ScrollingModule],
|
imports: [DialogModule, IconButtonModule, SectionComponent, TableModule, ScrollingModule],
|
||||||
template: ` <bit-section>
|
template: /*html*/ `<bit-section>
|
||||||
<cdk-virtual-scroll-viewport scrollWindow itemSize="47">
|
<cdk-virtual-scroll-viewport scrollWindow itemSize="47">
|
||||||
<bit-table [dataSource]="dataSource">
|
<bit-table [dataSource]="dataSource" data-chromatic="ignore">
|
||||||
<ng-container header>
|
<ng-container header>
|
||||||
<tr>
|
<tr>
|
||||||
<th bitCell bitSortable="id" default>Id</th>
|
<th bitCell bitSortable="id" default>Id</th>
|
||||||
|
|||||||
@@ -130,6 +130,9 @@ export const MenuOpen: Story = {
|
|||||||
const menuButton = getAllByRole(table, "button")[0];
|
const menuButton = getAllByRole(table, "button")[0];
|
||||||
await userEvent.click(menuButton);
|
await userEvent.click(menuButton);
|
||||||
},
|
},
|
||||||
|
parameters: {
|
||||||
|
chromatic: { ignoreSelectors: [".bit-menu-panel-backdrop"] },
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DefaultDialogOpen: Story = {
|
export const DefaultDialogOpen: Story = {
|
||||||
|
|||||||
Reference in New Issue
Block a user