Skip to content

Commit

Permalink
ignore style attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Jun 17, 2022
1 parent 33190c2 commit f1b07c0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/combo-box/test/dom/combo-box.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,29 @@ describe('vaadin-combo-box', () => {
});

describe('opened', () => {
const SNAPSHOT_CONFIG = {
// Some inline CSS styles related to the overlay's position
// may slightly change depending on the environment, so ignore them.
ignoreAttributes: ['style'],
};

beforeEach(async () => {
comboBox.items = ['Item 1', 'Item 2'];
comboBox.open();
await oneEvent(comboBox.$.overlay, 'vaadin-overlay-open');
});

it('default', async () => {
await expect(comboBox).dom.to.equalSnapshot();
await expect(comboBox).dom.to.equalSnapshot(SNAPSHOT_CONFIG);
});

it('overlay', async () => {
await expect(comboBox.$.overlay).dom.to.equalSnapshot();
await expect(comboBox.$.overlay).dom.to.equalSnapshot(SNAPSHOT_CONFIG);
});

it('theme overlay', async () => {
comboBox.setAttribute('theme', 'align-right');
await expect(comboBox.$.overlay).dom.to.equalSnapshot();
await expect(comboBox.$.overlay).dom.to.equalSnapshot(SNAPSHOT_CONFIG);
});
});
});
Expand Down

0 comments on commit f1b07c0

Please sign in to comment.