mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 18:51:11 +00:00
Add scope-dependent autocompletion to Cypress CM6 tests (#8109)
GitOrigin-RevId: 696abc40ac51ef10508db427707b5c332df326a1
This commit is contained in:
parent
adc88dc5ae
commit
477c2a3ecd
5 changed files with 39 additions and 11 deletions
|
@ -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,
|
||||
|
|
4
services/web/types/doc.ts
Normal file
4
services/web/types/doc.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export type Doc = {
|
||||
_id: string
|
||||
name: string
|
||||
}
|
4
services/web/types/fileref.ts
Normal file
4
services/web/types/fileref.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export type FileRef = {
|
||||
_id: string
|
||||
name: string
|
||||
}
|
|
@ -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[]
|
||||
}
|
||||
|
|
18
services/web/types/metadata.ts
Normal file
18
services/web/types/metadata.ts
Normal 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[]>
|
||||
}
|
||||
>
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue