Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

invalidParameters does not work in tests #566

Closed
ddgenome opened this issue May 4, 2017 · 4 comments
Closed

invalidParameters does not work in tests #566

ddgenome opened this issue May 4, 2017 · 4 comments
Labels

Comments

@ddgenome
Copy link
Contributor

ddgenome commented May 4, 2017

The Gherkin well-known step "parameters were invalid" no longer seems to work for projects. It's TypeScript implementation relies on the ScenarioWorld.invalidParameters method. When it is run against a build of the current master branch, you see:

<unknown>: Attempt to invoke method [invalidParameters] on type [TreeNode & Project]: Wrapping node named project-scenario-world; No exported method with that name: Found ArrayBuffer(addDirectory, addDirectoryAndIntermediates, addExecutableFile, addFile, backingArchiveProject, children, children, context, copyEditorBackingFileOrFail, copyEditorBackingFileOrFailToDestination, copyEditorBackingFilesOrFail, copyEditorBackingFilesPreservingPath, copyEditorBackingFilesWithNewRelativePath, copyEditorBackingProject, copyFile, copyFileOrFail, countFilesInDirectory, deleteDirectory, deleteFile, describeChange, directoryExists, editWith, fail, fileContains, fileCount, fileExists, fileHasContent, files, findFile, makeExecutable, merge, mergeTemplates, moveUnder, name, nodeName, nodeTags, nodeTags, nodeType, nodeType, pathTo, println, projects, regexpReplace, replace, replaceInPath, totalFileCount, value, value, value). Node tags are Set(Project)

@kipz thought this might be related to some filtering he implemented in #565.

@kipz kipz added the bug label May 5, 2017
@kipz
Copy link
Contributor

kipz commented May 5, 2017

This looks like it's calling ScenarioWorld.invalidParameters, rather than ProjectMutableView.

You say it's no longer seems to work for projects - can you elaborate on what that means? Do you have an example this failing somewhere?

@kipz
Copy link
Contributor

kipz commented May 5, 2017

Just tried on rug-rugs, and I see the above error.

@kipz
Copy link
Contributor

kipz commented May 5, 2017

This is due to how step names can override one another, and 'parameters are invalid' from handlers overrode the one from project (which has a different signature). So the wrong JS was called, and hence invalidParameters was called on the wrong object.

ddgenome added a commit that referenced this issue May 5, 2017
@ddgenome
Copy link
Contributor Author

ddgenome commented May 5, 2017

Closed by #568

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants