You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cy.get('#errorMessage').should('have.text','@context must be "https://doi.org/10.5063/schema/codemeta-2.0", not "https://doi.org/10.5063/schema/codemeta-100000"');
230
-
});
231
-
232
-
it('errors on invalid context URL in array',function(){
cy.get('#errorMessage').should('have.text','@context must be "https://doi.org/10.5063/schema/codemeta-2.0", not ["https://doi.org/10.5063/schema/codemeta-100000"]');
243
-
});
244
-
245
-
it('errors nicely when there are other contexts',function(){
246
-
cy.get('#codemetaText').then((elem)=>
247
-
elem.text(JSON.stringify({
248
-
"@context": [
249
-
"https://doi.org/10.5063/schema/codemeta-2.0",
250
-
"https://schema.org/",
251
-
],
252
-
"@type": "SoftwareSourceCode",
253
-
"name": "My Test Software",
254
-
}))
255
-
);
256
-
cy.get('#importCodemeta').click();
257
-
258
-
cy.get('#errorMessage').should('have.text','Multiple values in @context are not supported (@context should be "https://doi.org/10.5063/schema/codemeta-2.0", not ["https://doi.org/10.5063/schema/codemeta-2.0","https://schema.org/"])');
setError(`Multiple values in @context are not supported (@context should be "https://doi.org/10.5063/schema/codemeta-2.0", not ${JSON.stringify(context)})`);
30
-
returnfalse;
31
-
}
32
-
}
33
-
else{
34
-
setError(`@context must be "https://doi.org/10.5063/schema/codemeta-2.0", not ${JSON.stringify(context)}`);
35
-
returnfalse;
36
-
}
37
-
38
23
// TODO: check there is either type or @type but not both
0 commit comments