Skip to content

Commit

Permalink
test: Reproduction of current bug, issue #814
Browse files Browse the repository at this point in the history
  • Loading branch information
janpio committed Jul 1, 2021
1 parent c8b8654 commit 450deaa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/language-server/src/test/completion.test.ts
Expand Up @@ -700,5 +700,14 @@ suite('Quick Fix', () => {
],
},
)
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], )
}

0 comments on commit 450deaa

Please sign in to comment.