New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quality Assurance - Issue Tracker #53853
Comments
This requirement would be covered by:
I'd be fine adding another check inside that existing test to look at the |
i see now the "any field" and value, this was a lack of knowledge at the time, being able to get data by an "id" is imperative. Id like to propose a solution to the test above,
const getMultiple = await $.get(url + '?
created_by=Carol&assigned_to=Eric');
assert.isArray(getMultiple);
assert.lengthOf(getMultiple, 1);
// could write copyId inline instead
const copyId = getMultiple[0]._id
const getCopy = await $.get(url + `?_id=${copyId}`);
assert.isArray(getCopy);
assert.lengthOf(getCopy, 1);
assert.equal(getCopy[0]._id, copyId, 'filtering by _id should return the correct document') |
I'm hesitant to rewrite the entire tests, when instead we could update the test I indicated to try a query by ID (which we know won't break existing projects because a later test relies on that functionality). |
Agreed my proposed solution would be for the existing GET test that you indicated, you could just drop in const copyId = getMultiple[0]._id
const getById = await $.get(url + `?_id=${copyId}`);
assert.isArray(getById);
assert.lengthOf(getById, 1);
assert.equal(getById[0]._id, copyId, 'should be able to query a document by _id') |
Ah, I see. Yes, that would be a good approach. I'll go ahead and open this one up. |
Describe the Issue
None of the GET request examples/Tests mention to be able to GET with _id param, However during one of the PUT request tests there is a GET request sent with an ID, i struggled to find this Bug in my code, i feel adding one extra Functional test for GET request specifically requiring to be able to GET by IDs, If using mongoDB like i was the ID needs the toString Method in order to be read as a string. i attached a screen shot shows the PUT test with the GET request at the bottom
Affected Page
https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-projects/issue-tracker
Your code
Expected behavior
Either extra functional test requiring to be able to GET with an ID, or
Updated index.html with GET example that shows GET with an ID
Screenshots
System
Additional context
No response
The text was updated successfully, but these errors were encountered: