Skip to content

Commit c847cb8

Browse files
authored
fix: remove incorrect menu background, update visual tests (#10277)
1 parent 0e8bcde commit c847cb8

File tree

71 files changed

+65
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+65
-1
lines changed

packages/context-menu/test/visual/lumo/context-menu.test.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { fixtureSync, nextRender, nextUpdate } from '@vaadin/testing-helpers';
22
import { visualDiff } from '@web/test-runner-visual-regression';
3+
import '@vaadin/vaadin-lumo-styles/global.css';
34
import '@vaadin/vaadin-lumo-styles/props.css';
45
import '@vaadin/vaadin-lumo-styles/components/item.css';
56
import '@vaadin/vaadin-lumo-styles/components/list-box.css';
@@ -179,4 +180,31 @@ describe('context-menu', () => {
179180
});
180181
});
181182
});
183+
184+
describe('dark', () => {
185+
before(() => {
186+
document.documentElement.setAttribute('theme', 'dark');
187+
});
188+
189+
after(() => {
190+
document.documentElement.removeAttribute('theme');
191+
});
192+
193+
beforeEach(async () => {
194+
element = fixtureSync(`
195+
<vaadin-context-menu>
196+
<div style="padding: 10px">Target</div>
197+
</vaadin-context-menu>
198+
`);
199+
element.items = [{ text: 'Item 1' }, { text: 'Item 2' }];
200+
await nextUpdate(element);
201+
});
202+
203+
it('dark', async () => {
204+
element.openOn = 'click';
205+
element.firstElementChild.click();
206+
await nextRender();
207+
await visualDiff(document.body, 'dark');
208+
});
209+
});
182210
});
8.42 KB
125 Bytes
155 Bytes
155 Bytes
156 Bytes
152 Bytes
73 Bytes
154 Bytes
85 Bytes

0 commit comments

Comments
 (0)