Skip to content

Commit

Permalink
Converted map module jasmine file to jest test fixes #719 (#792)
Browse files Browse the repository at this point in the history
* Converted map module jasmine file to jest test

* removed equivalent jasmine file

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
  • Loading branch information
NARUDESIGNS and jywarren authored Jan 18, 2022
1 parent 79c9571 commit c2e48f2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 31 deletions.
31 changes: 0 additions & 31 deletions spec/javascripts/map_module_spec.js

This file was deleted.

21 changes: 21 additions & 0 deletions test/ui-testing/map_module.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const timeout = process.env.SLOWMO ? 60000 : 10000;
const fs = require('fs');
let _module;

beforeAll(async () => {
path = fs.realpathSync('file://../examples/index.html');
await page.goto('file://' + path, {waitUntil: 'domcontentloaded'});
await page.evaluateHandle(() => _module = editor.mapModule);
});

describe('MapModule', () => {
test('reports key, value, valid', async () => {
expect(await page.evaluateHandle(() => _module)).toBeDefined();
expect(await page.evaluate(() => _module.key)).toBe('map_data');

expect(await page.evaluate(() => _module.options.name)).toBe('map');
expect(await page.evaluate(() => _module.options.required)).toBe(false);

expect(await page.evaluate(() => _module.valid())).toBe(true);
});
}, timeout);

0 comments on commit c2e48f2

Please sign in to comment.