mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-04 23:43:20 +08:00
Merge pull request #15418 from mvdbeek/dont_display_tooltip
[23.0] Don't display tooltip if connection is acceptable
This commit is contained in:
@@ -205,6 +205,8 @@ describe("canAccept", () => {
|
||||
const integerInputParam = terminals["multi data"]["advanced|advanced_threshold"] as InputParameterTerminal;
|
||||
const integerOutputParam = terminals["integer parameter input"]["output"] as OutputParameterTerminal;
|
||||
expect(integerInputParam.canAccept(integerOutputParam).canAccept).toBe(true);
|
||||
// regression test for https://github.com/galaxyproject/galaxy/issues/15417
|
||||
expect(integerInputParam.canAccept(integerOutputParam).reason).toBe(null);
|
||||
});
|
||||
it("rejects text to integer parameter connection", () => {
|
||||
const integerInputParam = terminals["multi data"]["advanced|advanced_threshold"] as InputParameterTerminal;
|
||||
|
||||
@@ -465,9 +465,10 @@ export class InputParameterTerminal extends BaseInputTerminal {
|
||||
const effectiveThisType = this.effectiveType(this.type);
|
||||
const otherType = ("type" in other && other.type) || "data";
|
||||
const effectiveOtherType = this.effectiveType(otherType);
|
||||
const canAccept = effectiveThisType === effectiveOtherType
|
||||
return new ConnectionAcceptable(
|
||||
effectiveThisType == effectiveOtherType,
|
||||
`Cannot attach a ${effectiveOtherType} parameter to a ${effectiveThisType} input`
|
||||
canAccept,
|
||||
canAccept ? null: `Cannot attach a ${effectiveOtherType} parameter to a ${effectiveThisType} input`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user