Allow Restricted Notebooks to export text (#6542)

* Refactor string to stream

* add to restricted notebooks and allow for blank users

* forgot to add notebook

* use better types and fix test

* move streamToString

* add export group

* catch blank pages
This commit is contained in:
Scott Bell
2023-04-01 07:08:22 +02:00
committed by GitHub
parent 4f10a93ef5
commit b7a671d392
9 changed files with 69 additions and 24 deletions

View File

@ -24,7 +24,7 @@
This test suite is dedicated to tests which verify the basic operations surrounding Notebooks.
*/
const { test, expect } = require('../../../../pluginFixtures');
const { test, expect, streamToString } = require('../../../../pluginFixtures');
const { createDomainObjectWithDefaults } = require('../../../../appActions');
const nbUtils = require('../../../../helper/notebookUtils');
const path = require('path');
@ -395,13 +395,4 @@ test.describe('Notebook entry tests', () => {
test.fixme('can export all notebook entry metdata', async ({ page }) => {});
test.fixme('can export all notebook tags', async ({ page }) => {});
test.fixme('can export all notebook snapshots', async ({ page }) => {});
async function streamToString(readable) {
let result = '';
for await (const chunk of readable) {
result += chunk;
}
return result;
}
});