Add scope-dependent autocompletion to Cypress CM6 tests (#8109)

GitOrigin-RevId: 696abc40ac51ef10508db427707b5c332df326a1
This commit is contained in:
Alf Eaton 2022-05-26 10:30:37 +01:00 committed by Copybot
parent adc88dc5ae
commit 477c2a3ecd
5 changed files with 39 additions and 11 deletions

View file

@ -55,6 +55,13 @@ export function EditorProviders({
getCurrentDocValue: () => {},
openDoc: sinon.stub(),
},
metadataManager = {
metadata: {
state: {
documents: {},
},
},
},
}) {
window.user = user || window.user
window.gitBridgePublicBaseUrl = 'git.overleaf.test'
@ -86,14 +93,6 @@ export function EditorProviders({
...scope,
}
const metadataManager = {
metadata: {
state: {
documents: {},
},
},
}
window._ide = {
$scope,
socket,

View file

@ -0,0 +1,4 @@
export type Doc = {
_id: string
name: string
}

View file

@ -0,0 +1,4 @@
export type FileRef = {
_id: string
name: string
}

View file

@ -1,7 +1,10 @@
import { Doc } from './doc'
import { FileRef } from './fileref'
export type Folder = {
_id: string
name: string
docs: []
folders: []
fileRefs: []
docs: Doc[]
folders: Folder[]
fileRefs: FileRef[]
}

View file

@ -0,0 +1,18 @@
type Package = {
caption: string
meta: string
score: number
snippet: string
}
export type Metadata = {
state: {
documents: Record<
string,
{
labels: string[]
packages: Record<string, Package[]>
}
>
}
}