plugin infrastruktur
This commit is contained in:
1 parent
dd2a995f6c
commit
1545b90f39
43 files changed
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import { describe, it, afterEach, expect, $, click, sleep, closeAll } from './runner.js';
|
||||
|
||||
describe('Gallery', () => {
|
||||
afterEach(() => closeAll());
|
||||
|
||||
it('button exists', () => {
|
||||
expect($('#gallery-btn')).toExist();
|
||||
});
|
||||
|
||||
it('opens on button click', async () => {
|
||||
click('#gallery-btn');
|
||||
await sleep(250);
|
||||
expect($('#gallery')).toBeVisible();
|
||||
});
|
||||
|
||||
it('grid has no text selection', () => {
|
||||
expect($('#gallery-grid').classList.contains('select-none')).toBe(true);
|
||||
});
|
||||
|
||||
it('shows image count', async () => {
|
||||
click('#gallery-btn');
|
||||
await sleep(250);
|
||||
expect($('#gallery-count')).toExist();
|
||||
});
|
||||
|
||||
it('closes on close button', async () => {
|
||||
click('#gallery-btn');
|
||||
await sleep(200);
|
||||
click('#gallery-close');
|
||||
await sleep(150);
|
||||
expect($('#gallery')).toBeHidden();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user