Skip to content
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

Issuer test cases for status entry and status credential #37

Merged
merged 22 commits into from
Aug 5, 2024

Conversation

PatStLouis
Copy link
Contributor

This PR adds tests for normative statements around the status entry object and status credential object.

The message feature and statusSize feature are not implemented currently.

Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
@PatStLouis PatStLouis marked this pull request as ready for review July 17, 2024 20:34
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@aljones15 aljones15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless I'm not getting something you got confused on what are should chai assertions and basic javascript API calls, but that's not that hard of a mistake to make.

tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/assertions.js Outdated Show resolved Hide resolved
Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a plural/singular fix

tests/10-issue.js Outdated Show resolved Hide resolved
PatStLouis and others added 6 commits July 19, 2024 14:50
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
@PatStLouis
Copy link
Contributor Author

Whenever you have time, all comments should have been addressed

tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@aljones15 aljones15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving just so we get code into main. There are things to be done here, but I think this is a really solid start to status list.

Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More tweaks, but I fear if they're not addressed now they'll be painful to (re)find later.

Thanks!
🎩

tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
testSlCredential({slCredential: slc});
});
it('MUST be 16kb in size when "encodedList" is decoded',
should.exist(decoded,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.exist is a property, not a method, in Chai (afaik):
https://www.chaijs.com/api/bdd/#exist

Additionally, it seems there's a good bit more to test here with more specificity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that if the sl.decodeList({encodedList}) returns a response, the encoding was done properly since that decodeList function will only work if encoded properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what action you want me to take with the exist statement as it serves the intended purpose, to make sure the value exists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the should extras, it says that by assigning should to a variable you have access to some quick helpers, including exist:
https://www.chaijs.com/guide/styles/#should

PatStLouis and others added 3 commits July 22, 2024 16:22
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Co-authored-by: BigBlueHat <byoung@bigbluehat.com>
Signed-off-by: Patrick <patrick.st-louis@opsecid.ca>
Copy link
Member

@TallTed TallTed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, editorial.

tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
tests/10-issue.js Outdated Show resolved Hide resolved
PatStLouis and others added 5 commits July 22, 2024 20:26
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Copy link
Collaborator

@aljones15 aljones15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving again to allow initial batch of tests to main.

@PatStLouis PatStLouis merged commit e8e224c into w3c:main Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants