Shelex/vscode-cy-helper

"Fixture" not working - shows only example.json - Cypress V10.2.0

siglp opened this issue · 2 comments

siglp commented

Describe the bug
cy.fixture not working with Cypress v10 - it shows only "example.json". Problem is, that in fixtures dir, there is no example.json, but there is another (logins.json) and this is not shown.

To Reproduce
Steps to reproduce the behavior:

  1. Open VS Code
  2. Open file with test
  3. try to add cy.fixture("") - context help has only "example.json", even if the file is not there. No other files in context help.

Expected behavior
cy.fixture("") should offer real files in fixtures directory.

Environment (please complete the following information):

  • Extension version: v2.5.0
  • VS Code version: 1.68.1
  • OS: Windows | Mac | Linux (distro): Linux Mint 20.1 Cinnamon

** Developer Tools Console Output **

In console I do not see nothing.

Additional context

None

siglp commented

The problem is here:

root() {
return this._workspace.workspaceFolders[0].uri.fsPath;
}

When you have more folders in workspace, it takes the first one. But it is right only if you are working with first folder. For others it returns fixtures fromthe first workspace folder.

Hi @siglp!
Should be resolved in v2.6.0, support for multiple workspaces was provided.