forked from niuiic/blink-cmp-rg.nvim
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: show the file name where the match came from (#10)
* feat: show the file name where the match came from * fixup! feat: show the file name where the match came from
- Loading branch information
1 parent
d79688f
commit 0c369d8
Showing
3 changed files
with
35 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
describe("the basics", () => { | ||
it("shows words in other files as suggestions", () => { | ||
cy.visit("http://localhost:5173") | ||
cy.startNeovim().then(() => { | ||
cy.startNeovim().then((dir) => { | ||
// wait until text on the start screen is visible | ||
cy.contains("If you see this text, Neovim is ready!") | ||
cy.typeIntoTerminal( | ||
// clear the current line and enter insert mode | ||
"cc", | ||
) | ||
|
||
// this will match "Hippopotamus123" from ../../../test-environment/other-file.txt | ||
// this will match text from ../../../test-environment/other-file.txt | ||
// | ||
// If the plugin works, this text should show up as a suggestion. | ||
cy.typeIntoTerminal("hip") | ||
cy.typeIntoTerminal( | ||
// NOTE: need to break it into parts so that this test file itself does | ||
// not match the search :) | ||
"hip" + "234", | ||
) | ||
|
||
cy.contains("Hippopotamus123 (rg)") | ||
cy.contains("Hippopotamus" + "234 (rg)") | ||
|
||
// should show documentation with more details about the match | ||
cy.contains("Hippopotamus123 is my password") | ||
// | ||
// should show the text for the matched line | ||
cy.contains("Hippopotamus" + "234 was my previous password") | ||
// should show the file name | ||
cy.contains(dir.contents["other-file.txt"].name) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters