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

Rework auto completion tests #849

Closed
janpio opened this issue Aug 23, 2021 · 2 comments · Fixed by #1116
Closed

Rework auto completion tests #849

janpio opened this issue Aug 23, 2021 · 2 comments · Fixed by #1116
Assignees
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. tech/typescript Issue for tech TypeScript. topic: tests
Milestone

Comments

@janpio
Copy link
Member

janpio commented Aug 23, 2021

This is what it looks like right now: https://github.com/prisma/language-tools/blob/main/packages/language-server/src/test/completion.test.ts

assertCompletion(
modelBlocksUri,
{ line: 13, character: 16 },
{
isIncomplete: false,
items: [
fieldAttributeUnique,
fieldAttributeMap,
fieldAttributeDefault,
fieldAttributeRelation,
fieldAttributeIgnore,
],
},
)

These tests should really be "On schema ... long string | ... with cursor at position as marked in string by |, autocomplete should suggest the following things for auto completion" - and everything else should be automated by the test system we have.

@janpio janpio added kind/improvement An improvement to existing feature and code. topic: tests labels Aug 23, 2021
@Jolg42
Copy link
Member

Jolg42 commented Aug 23, 2021

Note that the same test (but slightly different implementation) is done in both vscode and language-server packages and the schema used is duplicated in both.
So it could make sense to tackle this at the same time or after having some test abstraction that will remove the duplication.

@tomhoule tomhoule added team/schema Issue for team Schema. process/candidate Candidate for next Milestone. labels Sep 23, 2021
@tomhoule tomhoule modified the milestone: 3.2.0 Sep 23, 2021
@tomhoule tomhoule removed the process/candidate Candidate for next Milestone. label Sep 23, 2021
@janpio janpio moved this from CI and Tests to Autocompletion in 🌐 Language Tools Issue Categorization Nov 24, 2021
@Jolg42 Jolg42 added the process/candidate Candidate for next Milestone. label Dec 17, 2021
@janpio janpio added tech/typescript Issue for tech TypeScript. and removed process/candidate Candidate for next Milestone. labels Jan 12, 2022
@Jolg42 Jolg42 self-assigned this Jan 24, 2022
@Jolg42 Jolg42 added the process/candidate Candidate for next Milestone. label Mar 15, 2022
@floelhoeffel floelhoeffel removed the process/candidate Candidate for next Milestone. label Mar 16, 2022
@Jolg42 Jolg42 added this to the 3.12.0 milestone Mar 16, 2022
@Jolg42 Jolg42 modified the milestones: 3.12.0, 3.13.0 Apr 8, 2022
@Jolg42
Copy link
Member

Jolg42 commented Apr 12, 2022

Internal Notion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement An improvement to existing feature and code. team/schema Issue for team Schema. tech/typescript Issue for tech TypeScript. topic: tests
Development

Successfully merging a pull request may close this issue.

4 participants