Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(referential-actions): Tests for autocompletion of referential actions attributes #820

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/language-server/src/test/completion.test.ts
Expand Up @@ -700,5 +700,14 @@ suite('Completions', () => {
],
},
)
assertCompletion(
relationDirectiveUri,
{ line: 57, character: 63 },
{
isIncomplete: false,
items: [onDeleteProperty, onUpdateProperty, nameProperty],
},
)
})

})
7 changes: 7 additions & 0 deletions packages/vscode/src/test/completion.test.ts
Expand Up @@ -592,5 +592,12 @@ suite('Should auto-complete', () => {
]),
true,
)
await testCompletion(
relationDirectiveUri,
new vscode.Position(57, 63),
new vscode.CompletionList([nameProperty, onDeleteProperty, onUpdateProperty]),
true,
)
})

})
Expand Up @@ -47,4 +47,13 @@ model OrderItemFive {
quantity Int
orderId Int
order Order @relation(fields: [])
}

model OrderItemSix {
id Int @id @default(autoincrement())
productName String
productPrice Int
quantity Int
orderId Int
order Order @relation(fields: [orderId], references: [id], )
}