-
Notifications
You must be signed in to change notification settings - Fork 7
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
Codemeta v3.0 - import #40
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7943901
to
a87777f
Compare
Co-authored-by: Val Lorentz <[email protected]>
Co-authored-by: Val Lorentz <[email protected]>
This should be ready for review :) |
cy.get('#author_nb').should('have.value', '1'); | ||
cy.get('#author_1_givenName').should('have.value', 'Jane'); | ||
cy.get('#author_1_roleName_0').should('have.value', 'Maintainer'); | ||
cy.get('#author_1_startDate_0').should('have.value', '2024-04-04'); | ||
cy.get('#author_1_endDate_0').should('have.value', '2024-05-05'); | ||
cy.get('#author_1_roleName_1').should('have.value', 'Developer'); | ||
cy.get('#author_1_startDate_1').should('have.value', '2024-03-04'); | ||
cy.get('#author_1_endDate_1').should('have.value', '2024-04-03'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat
@@ -683,4 +758,93 @@ describe('Multiple authors', function () { | |||
] | |||
}); | |||
}); | |||
|
|||
it('who both have roles can be imported', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('who both have roles can be imported', function () { | |
it('can be imported', function () { |
ditto (or probably move it to a new describe('One author with a role', function () {
block)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to understand about this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah nevermind, it makes sense to me now
// TODO should test more properties for equality? | ||
return author1.givenName === author2.givenName | ||
&& author1.familyName === author2.familyName | ||
&& author1.email === author2.email; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The id
is what matters in JSON-LD. Without it, JSON-LD says we should consider them different nodes. (see also #42, which doesn't need to be fixed before merging this PR)
However, given that these are the only ways we display an author, I think it's fine to have these three equalities as a fallback when both nodes are missing an id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'm looking into #42 !
thanks! |
And that's the 100th commit in this repository :) |
Thank you for your reviews and comments! |
Allow codemeta.json v3.0 file import.
Follows #34.