mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
When dropping an unsupported file onto a notebook entry, tell the user it isnt supported (#7115)
* handle unknown files and deal with copy/paste * add some nice errors if couch pukes * added how to adjust couchdb limits * throw error on anntotation change * keep blockquotes * add test for blockquotes * allow multi-file drop of images too * add test for big files * spell check * check for null * need to ignore console errors * reorder tests so we can ignore console errors * when creating new entry, ready it for editing * fix tests and empty embeds * fix tests * found similar issue from notebooks in plots
This commit is contained in:
@ -279,7 +279,7 @@ test.describe('Notebook entry tests', () => {
|
||||
|
||||
// Click .c-notebook__drag-area
|
||||
await page.locator('.c-notebook__drag-area').click();
|
||||
await expect(page.getByLabel('Notebook Entry Display')).toBeVisible();
|
||||
await expect(page.getByLabel('Notebook Entry Input')).toBeVisible();
|
||||
await expect(page.getByLabel('Notebook Entry', { exact: true })).toHaveClass(/is-selected/);
|
||||
});
|
||||
test('When an object is dropped into a notebook, a new entry is created and it should be focused @unstable', async ({
|
||||
@ -514,10 +514,23 @@ test.describe('Notebook entry tests', () => {
|
||||
const childItem = page.locator('li:has-text("List Item 2") ol li:has-text("Order 2")');
|
||||
await expect(childItem).toBeVisible();
|
||||
|
||||
// Blocks
|
||||
const blockTest = '```javascript\nconst foo = "bar";\nconst bar = "foo";\n```';
|
||||
await nbUtils.enterTextEntry(page, blockTest);
|
||||
// Code Blocks
|
||||
const codeblockTest = '```javascript\nconst foo = "bar";\nconst bar = "foo";\n```';
|
||||
await nbUtils.enterTextEntry(page, codeblockTest);
|
||||
const codeBlock = page.locator('code.language-javascript:has-text("const foo = \\"bar\\";")');
|
||||
await expect(codeBlock).toBeVisible();
|
||||
|
||||
// Blockquotes
|
||||
const blockquoteTest =
|
||||
'This is a quote by Mark Twain:\n> "The man with a new idea is a crank\n>until the idea succeeds."';
|
||||
await nbUtils.enterTextEntry(page, blockquoteTest);
|
||||
const firstLineOfBlockquoteText = page.locator(
|
||||
'blockquote:has-text("The man with a new idea is a crank")'
|
||||
);
|
||||
await expect(firstLineOfBlockquoteText).toBeVisible();
|
||||
const secondLineOfBlockquoteText = page.locator(
|
||||
'blockquote:has-text("until the idea succeeds")'
|
||||
);
|
||||
await expect(secondLineOfBlockquoteText).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user