Skip to content

Commit fd159cc

Browse files
Don't mock the sharing service token
1 parent ed9678c commit fd159cc

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

ui-tests/tests/jupytereverywhere.spec.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ const TEST_NOTEBOOK = {
5151
nbformat_minor: 5
5252
};
5353

54-
async function mockTokenRoute(page: Page) {
55-
await page.route('**/api/v1/auth/issue', async route => {
56-
const json = { token: 'test-token' };
57-
await route.fulfill({ json });
58-
});
59-
}
60-
6154
async function mockGetSharedNotebook(page: Page, notebookId: string) {
6255
await page.route('**/api/v1/notebooks/*', async route => {
6356
const json = {
@@ -117,7 +110,6 @@ test.describe('General', () => {
117110
});
118111

119112
test('Should load a view-only notebook', async ({ page }) => {
120-
await mockTokenRoute(page);
121113
const notebookId = 'e3b0c442-98fc-1fc2-9c9f-8b6d6ed08a1d';
122114

123115
await page.route('**/api/v1/notebooks/*', async route => {
@@ -148,7 +140,6 @@ test.describe('General', () => {
148140

149141
test.describe('Sharing', () => {
150142
test('Should open share dialog in interactive notebook', async ({ page }) => {
151-
await mockTokenRoute(page);
152143
await mockShareNotebookResponse(page, 'e3b0c442-98fc-1fc2-9c9f-8b6d6ed08a1d');
153144
const shareButton = page.locator('.jp-ToolbarButton').getByTitle('Share this notebook');
154145
await shareButton.click();
@@ -157,8 +148,6 @@ test.describe('Sharing', () => {
157148
});
158149

159150
test('Should open share dialog in view-only mode', async ({ page }) => {
160-
await mockTokenRoute(page);
161-
162151
// Load view-only (shared) notebook
163152
const notebookId = 'e3b0c442-98fc-1fc2-9c9f-8b6d6ed08a1d';
164153
await mockGetSharedNotebook(page, notebookId);
@@ -186,7 +175,6 @@ test.describe('Download', () => {
186175
});
187176

188177
test('Should download a notebook as IPyNB and PDF', async ({ page, context }) => {
189-
await mockTokenRoute(page);
190178
await mockShareNotebookResponse(page, 'test-download-regular-notebook');
191179

192180
const ipynbDownload = page.waitForEvent('download');
@@ -201,8 +189,6 @@ test.describe('Download', () => {
201189
});
202190

203191
test('Should download view-only notebook as IPyNB and PDF', async ({ page }) => {
204-
await mockTokenRoute(page);
205-
206192
const notebookId = 'e3b0c442-98fc-1fc2-9c9f-8b6d6ed08a1d';
207193
await mockGetSharedNotebook(page, notebookId);
208194
await mockShareNotebookResponse(page, 'test-download-viewonly-notebook');
@@ -259,8 +245,6 @@ test.describe('Files', () => {
259245
});
260246

261247
test('Should remove View Only banner when the Create Copy button is clicked', async ({ page }) => {
262-
await mockTokenRoute(page);
263-
264248
const notebookId = 'e3b0c442-98fc-1fc2-9c9f-8b6d6ed08a1d';
265249
await mockGetSharedNotebook(page, notebookId);
266250

0 commit comments

Comments
 (0)