Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/jupytergis_core/src/jgisplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const activate = (
format: 'text',
size: undefined,
content:
'{\n\t"layers": {},\n\t"sources": {},\n\t"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0},\n\t"layerTree": []\n\t"terrain": {}\n}'
'{\n\t"layers": {},\n\t"sources": {},\n\t"options": {"latitude": 0, "longitude": 0, "zoom": 0, "bearing": 0, "pitch": 0},\n\t"layerTree": [],\n\t"terrain": {"source": "", "exaggeration": 0}\n}'
});

// Open the newly created file with the 'Editor'
Expand Down
24 changes: 24 additions & 0 deletions ui-tests/tests/new-file.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { expect, test } from '@jupyterlab/galata';

test.describe('#newFile', () => {
test.afterEach(async ({ page }) => {
await page.activity.closeAll();
});

test('New file should open with no errors', async ({ page }) => {
await page
.getByLabel('notebook content')
.getByText('New JGIS File')
.click();

const tab = page.getByLabel('notebook content');
const sources = page.getByText('Sources', { exact: true });
const layers = page.getByText('Layers');
const map = page.getByLabel('Map');

await expect(tab).toBeVisible();
await expect(sources).toBeVisible();
await expect(layers).toBeVisible();
await expect(map).toBeVisible();
});
});