Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 425437 - content assist tests failing on master
- Adapted contentAssistTests to expect new Javascript proposal format which extracts the name from the proposal description.
- Passed in option to not include non-inferred proposals since the tests don't expect them.

--Signed-off-by: Elijah El-Haddad <elijahe@ca.ibm.com>
  • Loading branch information
elijahe committed Jan 13, 2014
1 parent e920acf commit 78f9585
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -63,13 +63,17 @@ define([
return new Deferred().resolve(buffer);
}
};
return assist.computeContentAssist(mockContext, {offset: offset, prefix : prefix, includeNonInferred: true });
return assist.computeContentAssist(mockContext, {offset: offset, prefix : prefix, includeNonInferred: false });
}

function testProposal(proposal, text, description) {
assert.equal(proposal.proposal, text, "Invalid proposal text");
assert.equal(proposal.proposal, text, "Invalid proposal text"); //$NON-NLS-0$
if (description) {
assert.equal(proposal.description, description, "Invalid proposal description");
if (proposal.name) {
assert.equal(proposal.name + proposal.description, description, "Invalid proposal description"); //$NON-NLS-0$
} else {
assert.equal(proposal.description, description, "Invalid proposal description"); //$NON-NLS-0$
}
}
}

Expand All @@ -84,7 +88,11 @@ define([
function stringifyActual(actualProposals) {
var text = "";
for (var i = 0; i < actualProposals.length; i++) {
text += actualProposals[i].proposal + " : " + actualProposals[i].description + "\n";
if (actualProposals[i].name) {
text += actualProposals[i].proposal + " : " + actualProposals[i].name + actualProposals[i].description + "\n"; //$NON-NLS-1$ //$NON-NLS-0$
} else {
text += actualProposals[i].proposal + " : " + actualProposals[i].description + "\n"; //$NON-NLS-1$ //$NON-NLS-0$
}
}
return text;
}
Expand Down

0 comments on commit 78f9585

Please sign in to comment.