From 19c7f8059c64dfff213a1aceacbf6f19de8ebd56 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Mon, 31 Oct 2022 14:04:34 +0200 Subject: [PATCH] refactor(cypress): Cypress 10 / Razzle 4 --- Jenkinsfile | 83 +- cypress.config.js | 8 +- cypress.eeacms.config.js | 31 - cypress/e2e/01-block-basics.cy.js | 29 + cypress/e2e/01-block-columns.cy.js | 72 + cypress/e2e/01-block-group.cy.js | 52 + .../01-block-slate-metadata-mentions.cy.js | 40 + cypress/e2e/01-block-tabs.cy.js | 76 + cypress/e2e/01-blocks-accordion.cy.js | 129 ++ cypress/e2e/01-blocks-divider.cy.js | 33 + cypress/e2e/01-blocks-metadata-section.cy.js | 42 + cypress/e2e/01-blocks-metadata.cy.js | 35 + cypress/e2e/01-slate-footnote-block.cy.js | 86 ++ cypress/e2e/01-slate-zotero-block.cy.js | 438 ++++++ cypress/fixtures/zotero-collections.json | 107 ++ cypress/fixtures/zotero-credentials.json | 10 + cypress/fixtures/zotero-item1.json | 4 + cypress/fixtures/zotero-item2.json | 4 + cypress/fixtures/zotero-item3.json | 4 + cypress/fixtures/zotero-item4.json | 4 + cypress/fixtures/zotero-items.json | 139 ++ cypress/fixtures/zotero-items2.json | 77 + cypress/fixtures/zotero-items3.json | 76 + .../zotero-openaireSearchResultsPub.json | 1235 +++++++++++++++++ .../zotero-openaireSearchResultsRSD.json | 755 ++++++++++ cypress/fixtures/zotero-saveItemResponse.json | 95 ++ cypress/fixtures/zotero-subCollections.json | 48 + 27 files changed, 3638 insertions(+), 74 deletions(-) delete mode 100644 cypress.eeacms.config.js create mode 100644 cypress/e2e/01-block-basics.cy.js create mode 100644 cypress/e2e/01-block-columns.cy.js create mode 100644 cypress/e2e/01-block-group.cy.js create mode 100644 cypress/e2e/01-block-slate-metadata-mentions.cy.js create mode 100644 cypress/e2e/01-block-tabs.cy.js create mode 100644 cypress/e2e/01-blocks-accordion.cy.js create mode 100644 cypress/e2e/01-blocks-divider.cy.js create mode 100644 cypress/e2e/01-blocks-metadata-section.cy.js create mode 100644 cypress/e2e/01-blocks-metadata.cy.js create mode 100644 cypress/e2e/01-slate-footnote-block.cy.js create mode 100644 cypress/e2e/01-slate-zotero-block.cy.js create mode 100644 cypress/fixtures/zotero-collections.json create mode 100644 cypress/fixtures/zotero-credentials.json create mode 100644 cypress/fixtures/zotero-item1.json create mode 100644 cypress/fixtures/zotero-item2.json create mode 100644 cypress/fixtures/zotero-item3.json create mode 100644 cypress/fixtures/zotero-item4.json create mode 100644 cypress/fixtures/zotero-items.json create mode 100644 cypress/fixtures/zotero-items2.json create mode 100644 cypress/fixtures/zotero-items3.json create mode 100644 cypress/fixtures/zotero-openaireSearchResultsPub.json create mode 100644 cypress/fixtures/zotero-openaireSearchResultsRSD.json create mode 100644 cypress/fixtures/zotero-saveItemResponse.json create mode 100644 cypress/fixtures/zotero-subCollections.json diff --git a/Jenkinsfile b/Jenkinsfile index c971b0f3..1ce06208 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,6 +71,9 @@ pipeline { } } steps { + parallel( + + "Volto": { node(label: 'docker') { script { try { @@ -103,10 +106,10 @@ pipeline { } } } + ) + } } - - stage('Integration tests') { when { allOf { @@ -118,43 +121,49 @@ pipeline { } } steps { - node(label: 'docker') { - script { - try { - sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone-eeacms" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend''' - sh '''docker pull plone/volto-addon-ci:alpha; docker run -i --name="$BUILD_TAG-cypress-eeacms" --link $BUILD_TAG-plone-eeacms:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e NODE_ENV=development -e VOLTO="$VOLTO" plone/volto-addon-ci:alpha cypress run --config-file=cypress.eeacms.config.js''' - } finally { - try { - sh '''rm -rf cypress-reports cypress-results cypress-coverage''' - sh '''mkdir -p cypress-reports cypress-results cypress-coverage''' - sh '''docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/''' - sh '''docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/''' - coverage = sh script: '''docker cp $BUILD_TAG-cypress-eeacms:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/coverage cypress-coverage/''', returnStatus: true - if ( coverage == 0 ) { - publishHTML (target : [allowMissing: false, - alwaysLinkToLastBuild: true, - keepAll: true, - reportDir: 'cypress-coverage/coverage/lcov-report', - reportFiles: 'index.html', - reportName: 'CypressCoverage', - reportTitles: 'Integration Tests Code Coverage']) - } - sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/volto-slate/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done''' - archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true - stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true - } - finally { - catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { - junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true - } - sh script: "docker stop $BUILD_TAG-plone-eeacms", returnStatus: true - sh script: "docker rm -v $BUILD_TAG-plone-eeacms", returnStatus: true - sh script: "docker rm -v $BUILD_TAG-cypress-eeacms", returnStatus: true + parallel( + "Cypress": { + node(label: 'docker') { + script { + try { + sh '''docker pull eeacms/plone-backend; docker run --rm -d --name="$BUILD_TAG-plone" -e SITE="Plone" -e PROFILES="eea.kitkat:testing" eeacms/plone-backend''' + sh '''docker pull plone/volto-addon-ci:alpha; docker run -i --name="$BUILD_TAG-cypress" --link $BUILD_TAG-plone:plone -e NAMESPACE="$NAMESPACE" -e GIT_NAME=$GIT_NAME -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e DEPENDENCIES="$DEPENDENCIES" -e VOLTO=$VOLTO plone/volto-addon-ci:alpha cypress''' + } finally { + try { + sh '''rm -rf cypress-reports cypress-results cypress-coverage''' + sh '''mkdir -p cypress-reports cypress-results cypress-coverage''' + sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/videos cypress-reports/''' + sh '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/cypress/reports cypress-results/''' + coverage = sh script: '''docker cp $BUILD_TAG-cypress:/opt/frontend/my-volto-project/src/addons/$GIT_NAME/coverage cypress-coverage/''', returnStatus: true + if ( coverage == 0 ) { + publishHTML (target : [allowMissing: false, + alwaysLinkToLastBuild: true, + keepAll: true, + reportDir: 'cypress-coverage/coverage/lcov-report', + reportFiles: 'index.html', + reportName: 'CypressCoverage', + reportTitles: 'Integration Tests Code Coverage']) + } + sh '''touch empty_file; for ok_test in $(grep -E 'file=.*failures="0"' $(grep 'testsuites .*failures="0"' $(find cypress-results -name *.xml) empty_file | awk -F: '{print $1}') empty_file | sed 's/.* file="\\(.*\\)" time.*/\\1/' | sed 's#^cypress/integration/##g' | sed 's#^../../../node_modules/@eeacms/##g'); do rm -f cypress-reports/videos/$ok_test.mp4; rm -f cypress-reports/$ok_test.mp4; done''' + archiveArtifacts artifacts: 'cypress-reports/**/*.mp4', fingerprint: true, allowEmptyArchive: true + stash name: "cypress-coverage", includes: "cypress-coverage/**", allowEmpty: true + } + finally { + catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') { + junit testResults: 'cypress-results/**/*.xml', allowEmptyResults: true + } + sh script: "docker stop $BUILD_TAG-plone", returnStatus: true + sh script: "docker rm -v $BUILD_TAG-plone", returnStatus: true + sh script: "docker rm -v $BUILD_TAG-cypress", returnStatus: true + + } + } } } } - } + + ) } } @@ -176,12 +185,12 @@ pipeline { script{ checkout scm unstash "xunit-reports" - unstash "cypress-coverage-all" + unstash "cypress-coverage" def scannerHome = tool 'SonarQubeScanner'; def nodeJS = tool 'NodeJS'; withSonarQubeEnv('Sonarqube') { sh '''sed -i "s#/opt/frontend/my-volto-project/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info''' - sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage-all/coverage/lcov.info, -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER" + sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER" sh '''try=2; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 60; try=\$(( \$try - 1 )); fi; done''' } } diff --git a/cypress.config.js b/cypress.config.js index 563cdfa2..30be8ac3 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,8 +4,6 @@ module.exports = defineConfig({ viewportWidth: 1280, defaultCommandTimeout: 8888, chromeWebSecurity: false, - videoUploadOnPasses: false, - screenshotOnRunFailure: false, reporter: 'junit', video: true, retries: { @@ -20,11 +18,9 @@ module.exports = defineConfig({ e2e: { setupNodeEvents(on, config) { // e2e testing node events setup code + require('@cypress/code-coverage/task')(on, config); + return config; }, baseUrl: 'http://localhost:3000', - specPattern: '../**/cypress/e2e/**/*.cy.js', - // excludeSpecPattern: - // '../../../node_modules/@eeacms/volto-slate-zotero/cypress/e2e/**/*.js', - fixturesFolder: '../volto-slate-zotero/cypress/fixtures', }, }); diff --git a/cypress.eeacms.config.js b/cypress.eeacms.config.js deleted file mode 100644 index cd59e51a..00000000 --- a/cypress.eeacms.config.js +++ /dev/null @@ -1,31 +0,0 @@ -const { defineConfig } = require('cypress'); - -module.exports = defineConfig({ - viewportWidth: 1280, - defaultCommandTimeout: 8888, - chromeWebSecurity: false, - videoUploadOnPasses: false, - screenshotOnRunFailure: false, - reporter: 'junit', - video: true, - retries: { - runMode: 8, - openMode: 0, - }, - reporterOptions: { - mochaFile: 'cypress/reports/cypress-[hash].xml', - jenkinsMode: true, - toConsole: true, - }, - e2e: { - setupNodeEvents(on, config) { - // e2e testing node events setup code - }, - baseUrl: 'http://localhost:3000', - specPattern: '../../../node_modules/@eeacms/**/cypress/e2e/**/*.cy.js', - excludeSpecPattern: - '../../../node_modules/@eeacms/volto-slate-zotero/cypress/e2e/**/*.cy.js', - fixturesFolder: - '../../../node_modules/@eeacms/volto-slate-zotero/cypress/fixtures', - }, -}); diff --git a/cypress/e2e/01-block-basics.cy.js b/cypress/e2e/01-block-basics.cy.js new file mode 100644 index 00000000..089c7b34 --- /dev/null +++ b/cypress/e2e/01-block-basics.cy.js @@ -0,0 +1,29 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Block: Empty', () => { + // Change page title + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Media').click(); + cy.get('.content.active.media .button.image').contains('Image').click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.get('.block.image'); + }); +}); diff --git a/cypress/e2e/01-block-columns.cy.js b/cypress/e2e/01-block-columns.cy.js new file mode 100644 index 00000000..813baefc --- /dev/null +++ b/cypress/e2e/01-block-columns.cy.js @@ -0,0 +1,72 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Block: Empty', () => { + // Change page title + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.columnsBlock') + .contains('Columns') + .click({ force: true }); + + cy.get('.columns-block .ui.card').eq(2).click(); + cy.get('.field-wrapper-title #field-title').last().type('Column test'); + cy.get('.field-wrapper-data .columns-area button').last().click(); + + cy.get('.columns-area .drag.handle.wrapper') + .first() + .trigger('mousedown', { which: 1 }, { force: true }) + .trigger('mousemove', 0, 60, { force: true }) + .trigger('mouseup'); + + cy.get('.field-wrapper-gridCols #field-gridCols').click(); + cy.get('.react-select__menu').contains('25').click(); + + cy.get('[contenteditable=true]').first().focus().click(); + cy.get('.columns-block [contenteditable=true]') + .eq(0) + .focus() + .click() + .type('First'); + cy.get('.columns-block [contenteditable=true]') + .eq(1) + .focus() + .click() + .type('Second'); + cy.get('.columns-block [contenteditable=true]') + .eq(2) + .focus() + .click() + .type('Third'); + cy.get('.block-toolbar button').eq(1).click(); + + cy.get( + '.field-wrapper-grid_vertical_align #field-grid_vertical_align', + ).click(); + cy.get('.react-select__menu').contains('Middle').click(); + cy.get('.field-wrapper-backgroundColor .ui.huge.button').click(); + cy.get('.github-picker.color-picker span').eq(3).click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.contains('First'); + cy.contains('Second'); + cy.contains('Third'); + cy.get('.columns-view'); + }); +}); diff --git a/cypress/e2e/01-block-group.cy.js b/cypress/e2e/01-block-group.cy.js new file mode 100644 index 00000000..7b578c97 --- /dev/null +++ b/cypress/e2e/01-block-group.cy.js @@ -0,0 +1,52 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Block: Empty', () => { + // Change page title + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.group') + .contains('Section (Group)') + .click({ force: true }); + + cy.get('.block-editor-group [contenteditable=true]') + .focus() + .click() + .type('test{enter}'); + cy.get('.block-editor-group [contenteditable=true]') + .eq(1) + .focus() + .click() + .type('test2{enter}'); + cy.get('.block-editor-group [contenteditable=true]') + .eq(2) + .focus() + .click() + .type('test3'); + + cy.get('.block-toolbar svg') + .first() + .trigger('mousedown', { button: 0 }) + .trigger('mousemove', 10, -40, { force: true }) + .trigger('mouseup', 10, -40, { force: true }); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.contains('test2'); + }); +}); diff --git a/cypress/e2e/01-block-slate-metadata-mentions.cy.js b/cypress/e2e/01-block-slate-metadata-mentions.cy.js new file mode 100644 index 00000000..4d937fd4 --- /dev/null +++ b/cypress/e2e/01-block-slate-metadata-mentions.cy.js @@ -0,0 +1,40 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Block Tests: Metadata', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('As editor I can add metadata mentions', function () { + // Complete chained commands + cy.getSlateEditorAndType('Colorless green ideas sleep furiously.'); + + // Metadata mention + cy.setSlateSelection('Colorless', 'green'); + cy.clickSlateButton('Metadata'); + + cy.get('.sidebar-container div[id="field-metadata"]') + .type('Publishing Date{enter}'); + cy.get('.sidebar-container .form .header button:first-of-type').click(); + + // Remove link + cy.setSlateSelection('Colorless') + .setSlateSelection('green'); + cy.clickSlateButton('Remove metadata'); + + // Re-add link + cy.setSlateSelection('green', 'sleep'); + cy.clickSlateButton('Metadata'); + + cy.get('.sidebar-container div[id="field-metadata"]') + .type('Summary{enter}'); + cy.get('.sidebar-container [id="blockform-fieldset-metadata"] [id="field-description"]') + .type('blue cats sleep'); + cy.get('.sidebar-container .form .header button:first-of-type').click(); + + // Save + cy.toolbarSave(); + + // then the page view should contain a link + cy.contains('Colorless blue cats sleep furiously.'); + }); +}); diff --git a/cypress/e2e/01-block-tabs.cy.js b/cypress/e2e/01-block-tabs.cy.js new file mode 100644 index 00000000..7a25c433 --- /dev/null +++ b/cypress/e2e/01-block-tabs.cy.js @@ -0,0 +1,76 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Block: Empty', () => { + // Change page title + cy.get('[contenteditable=true]').first().clear(); + + cy.get('[contenteditable=true]').first().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Media').click(); + cy.get('.content.active.media .button.image').contains('Image').click(); + + cy.getSlate().click(); + + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.tabs_block') + .contains('Tabs') + .click({ force: true }); + + cy.get('.field-wrapper-title input').last().type('Tab 1'); + cy.get('.field-wrapper-template #field-template').click(); + cy.get('.react-select__menu').contains('Default').click(); + cy.get('.field-wrapper-verticalAlign #field-verticalAlign').click(); + cy.get('.react-select__menu').contains('Middle').click(); + + cy.get('.field-wrapper-menuAlign #field-menuAlign').click(); + cy.get('.react-select__menu').contains('Left').click(); + cy.get('.field-wrapper-menuPosition #field-menuPosition').first().click(); + cy.get('.react-select__menu').contains('Top').click(); + + cy.get('.tabs-block [contenteditable=true]').first().type('Hydrogen'); + cy.get('.tabs-block .ui.left.menu .item').last().click(); + cy.get('.tabs-block').contains('Tab 2').click(); + cy.get('.tabs-block.edit [contenteditable=true]').first().type('Oxygen'); + + cy.getSlate().click(); + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.tabs_block') + .contains('Tabs') + .click({ force: true }); + + cy.get('.field-wrapper-template #field-template').click(); + cy.get('.react-select__menu').contains('Carousel horizontal').click(); + cy.get('.field-wrapper-verticalAlign #field-verticalAlign').click(); + cy.get('.react-select__menu').contains('Bottom').click(); + cy.get('.field-wrapper-theme #field-theme').click(); + cy.get('.react-select__menu').contains('Dark').click(); + cy.get('.tabs-block .ui.menu .item').last().click(); + cy.get('.tabs-block .ui.menu .item').eq(1).click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.contains('Hydrogen'); + + cy.get('.tabs-block p').contains('Tab 2').click(); + cy.contains('Oxygen'); + + cy.get('.slick-arrow').click(); + cy.get('.block.image'); + }); +}); diff --git a/cypress/e2e/01-blocks-accordion.cy.js b/cypress/e2e/01-blocks-accordion.cy.js new file mode 100644 index 00000000..a12b1274 --- /dev/null +++ b/cypress/e2e/01-blocks-accordion.cy.js @@ -0,0 +1,129 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Accordion Block: Empty', () => { + // Change page title + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add metadata block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.accordion') + .contains('Accordion') + .click({ force: true }); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + }); + + it('Accordion Block: Change Title', () => { + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add accordion block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.accordion') + .contains('Accordion') + .click({ force: true }); + + // By default all should be collapsed (no active class on first) + cy.get('.accordion:nth-child(2)').should('not.have.class', 'active'); + + cy.get('.accordion:nth-child(2) > .title input') + .click() + .type('Accordion panel 1') + .should('have.value', 'Accordion panel 1'); + + cy.get('[id="field-title_size"] .react-select__value-container') + .click() + .type('h2{enter}'); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.get('h2.accordion-title').contains('Accordion panel 1'); + }); + + it('Accordion Block: add accordion content', () => { + // Change page title + cy.clearSlateTitle(); + cy.getSlateTitle().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.getSlate().click(); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.content.active.common .button.accordion') + .contains('Accordion') + .click({ force: true }); + + // enter title for first item in accordion (it is first of the accordion but second as child) + cy.get('.accordion:nth-child(2) > .title input') + .click() + .type('panel 1') + .should('have.value', 'panel 1'); + + // enter title for third item in accordion + // enter content + cy.get('.accordion:nth-child(3) > .title input').click(); + cy.get('.accordion:nth-child(3) > .title input').type('panel 2'); + cy.get('.accordion:nth-child(3) > .title > .icon').click(); + cy.wait(500); + + // the cypress test runs with both slate and draftjs. + cy.getIfExists( + '.accordion:nth-child(3) .content .public-DraftStyleDefault-block:nth-child(1)', + () => { + cy.get( + '.accordion:nth-child(3) .content .public-DraftStyleDefault-block:nth-child(1)', + ) + .should('have.value', '') + .invoke('attr', 'tabindex', 1) + .type('children', { delay: 50 }); + }, + () => { + cy.get('.accordion:nth-child(3) .content div.text-slate-editor-inner') + .should('have.value', '') + .invoke('attr', 'tabindex', 1) + .click() + .type('children', { delay: 50 }); + }, + ); + + cy.get('#toolbar-save path').click({ force: true }); + cy.wait(1000); + + //after saving + cy.get('div.accordion-title > span').contains('panel 2'); + // after save, the 3 child becomes second + cy.get('.accordion:nth-child(2) > .title > .icon').click(); + cy.get('div.content') + .should('have.class', 'active') + .within(() => { + cy.get('p').contains('children'); + }); + }); +}); diff --git a/cypress/e2e/01-blocks-divider.cy.js b/cypress/e2e/01-blocks-divider.cy.js new file mode 100644 index 00000000..6ba4df7f --- /dev/null +++ b/cypress/e2e/01-blocks-divider.cy.js @@ -0,0 +1,33 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Block: Empty', () => { + // without this the clear command below does nothing sometimes + cy.wait(500); + + // Change page title + cy.get('[contenteditable=true]').first().clear(); + + cy.get('[contenteditable=true]').first().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.get('[contenteditable=true]').first().type('{enter}'); + + // Add block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.ui.basic.icon.button.dividerBlock').contains('Divider').click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.get('.divider'); + }); +}); diff --git a/cypress/e2e/01-blocks-metadata-section.cy.js b/cypress/e2e/01-blocks-metadata-section.cy.js new file mode 100644 index 00000000..b49372e3 --- /dev/null +++ b/cypress/e2e/01-blocks-metadata-section.cy.js @@ -0,0 +1,42 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Metadata block: Description', () => { + // without this the clear command below does nothing sometimes + cy.wait(500); + + // Change page title + cy.get('[contenteditable=true]').first().clear(); + + cy.get('[contenteditable=true]').first().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.get('[contenteditable=true]').first().type('{enter}'); + + // Add metadata block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.ui.basic.icon.button.metadataSection') + .contains('Metadata Section') + .click(); + cy.get('.objectlist-widget button').contains('Add Field').click(); + cy.get('.objectlist-widget .react-select__value-container') + .click() + .type('Summary{enter}'); + cy.get('.block.metadataSection textarea') + .click() + .type('Test metadata: Summary'); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.get('#page-document p').contains('Test metadata: Summary'); + }); +}); diff --git a/cypress/e2e/01-blocks-metadata.cy.js b/cypress/e2e/01-blocks-metadata.cy.js new file mode 100644 index 00000000..1cb07038 --- /dev/null +++ b/cypress/e2e/01-blocks-metadata.cy.js @@ -0,0 +1,35 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Blocks Tests', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Metadata block: Description', () => { + // without this the clear command below does nothing sometimes + cy.wait(500); + + // Change page title + cy.get('[contenteditable=true]').first().clear(); + + cy.get('[contenteditable=true]').first().type('My Add-on Page'); + + cy.get('.documentFirstHeading').contains('My Add-on Page'); + + cy.get('[contenteditable=true]').first().type('{enter}'); + + // Add metadata block + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Common').click(); + cy.get('.ui.basic.icon.button.metadata').contains('Metadata').click(); + cy.get('.block.metadata input').click().type('Summary').type('{enter}'); + cy.get('.block.metadata textarea').click().type('Test metadata: Summary'); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.contains('My Add-on Page'); + cy.get('#page-document p').contains('Test metadata: Summary'); + }); +}); diff --git a/cypress/e2e/01-slate-footnote-block.cy.js b/cypress/e2e/01-slate-footnote-block.cy.js new file mode 100644 index 00000000..659df98f --- /dev/null +++ b/cypress/e2e/01-slate-footnote-block.cy.js @@ -0,0 +1,86 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Slate citations', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Add Footnotes block and create citation', () => { + // Complete chained commands + cy.getSlateEditorAndType('Colorless green ideas sleep furiously.') + .type('{selectAll}') + .dblclick(); + + // Footnote + cy.setSlateCursor('Colorless').dblclick(); + cy.setSlateSelection('Colorless', 'green'); + cy.clickSlateButton('Footnote'); + + cy.get('.sidebar-container .field-wrapper-footnote .react-select-container') + .click() + .type('Citation{enter}'); + cy.get('.sidebar-container .form .header button:first-of-type').click(); + + // Add block + cy.getSlateEditorAndType('{enter}'); + + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Text').click(); + cy.get('.content.active.text .button.slateFootnotes') + .contains('Footnotes') + .click(); + + // Configure block + cy.get('[id=sidebar-properties] [name=title]').click().type('Footnotes'); + cy.get('[id=sidebar-properties] label[for=field-global]').click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.get('span.citation-item').contains('Colorless green'); + cy.contains('Footnotes'); + cy.contains('Citation'); + }); + + it('Add Footnotes block and create multiple citations', () => { + // Complete chained commands + cy.getSlateEditorAndType('Colorless green ideas sleep furiously.') + .type('{selectAll}') + .dblclick(); + + // Footnote + cy.setSlateCursor('Colorless').dblclick(); + cy.setSlateSelection('Colorless', 'green'); + cy.clickSlateButton('Footnote'); + + cy.get('.sidebar-container .field-wrapper-footnote .react-select-container') + .click() + .type('Citation{enter}') + .type('Yet another citation{enter}'); + cy.get('.sidebar-container .form .header button:first-of-type').click(); + + // Add block + cy.getSlateEditorAndType('{enter}'); + + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Text').click(); + cy.get('.content.active.text .button.slateFootnotes') + .contains('Footnotes') + .click(); + + // Configure block + cy.get('[id=sidebar-properties] [name=title]').click().type('Footnotes'); + cy.get('[id=sidebar-properties] label[for=field-global]').click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.get('span.citation-item').contains('Colorless green'); + cy.contains('Footnotes'); + cy.contains('Citation'); + cy.contains('Yet another citation'); + }); +}); diff --git a/cypress/e2e/01-slate-zotero-block.cy.js b/cypress/e2e/01-slate-zotero-block.cy.js new file mode 100644 index 00000000..30ac91c6 --- /dev/null +++ b/cypress/e2e/01-slate-zotero-block.cy.js @@ -0,0 +1,438 @@ +import { slateBeforeEach, slateAfterEach } from '../support/e2e'; + +describe('Slate citations', () => { + beforeEach(slateBeforeEach); + afterEach(slateAfterEach); + + it('Removes citation element when saving Zotero without selecting citation ', () => { + // Enter text in slate field + cy.getSlateEditorAndType('Luck is failure that failed.'); + + // Zotero element select + cy.setSlateSelection('Luck', 'failure'); + cy.clickSlateButton('Citation'); + + // Zotero as slate element + cy.get('.slate-editor.selected [contenteditable=true]').find( + 'span[id^="cite_ref"]', + ); + + // Save Zotero without citation + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // element is not slate Zotero + cy.get('.slate-editor.selected [contenteditable=true]').not( + 'span[id^="cite_ref"]', + ); + + // Zotero element select + cy.setSlateSelection('Luck', 'failure'); + cy.clickSlateButton('Citation'); + + // Zotero as slate element + cy.get('.slate-editor.selected [contenteditable=true]').find( + 'span[id^="cite_ref"]', + ); + + // Exit Zotero without citation + cy.get( + '.sidebar-container #zotero-comp .form .header button:nth-of-type(2)', + ) + .wait(2000) + .click(); + + // element is not slate Zotero + cy.get('.slate-editor.selected [contenteditable=true]').not( + 'span[id^="cite_ref"]', + ); + }); + + it('Adds Zotero single and multiple citations and correctly indicates it even when deleting citations', () => { + // intercept the two items in the first collection + cy.fixture('zotero-items.json').then((itemsResp) => { + const { body, statusCode, headers } = itemsResp; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/collections/24C33/items/?start=0&limit=10&sort=title', + { body, statusCode, headers }, + ).as('itemsResp'); + }); + + // intercept xml citation response for first item (citation) + cy.fixture('zotero-item1.json').then((item1Resp) => { + const { body, statusCode, headers } = item1Resp; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/items/INFEDJ40?format=bib&style=https://www.eea.europa.eu/zotero/eea.csl', + { body, statusCode, headers }, + ).as('item1Resp'); + }); + + // intercept xml citation response for second item (citation) + cy.fixture('zotero-item2.json').then((item2Resp) => { + const { body, statusCode, headers } = item2Resp; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/items/QHCG97BD?format=bib&style=https://www.eea.europa.eu/zotero/eea.csl', + { body, statusCode, headers }, + ).as('item2Resp'); + }); + + // Enter text in slate input + cy.getSlateEditorAndType('Luck is failure that failed.'); + + // Zotero + cy.setSlateSelection('Luck', 'failure'); + cy.clickSlateButton('Citation'); + + // select first Zotero collection + cy.get('.pastanaga-menu-list ul>li button').first().click().wait(2000); + + // select first item from the Zotero collection + cy.get('.items.pastanaga-menu .pastanaga-menu-list ul li') + .wait(2000) + .first() + .click(); + + // click preview button to get the citation + cy.get('.ui.fluid.card .content .description button') + .first() + .click() + .wait(2000); + + // select second item from the Zotero collection + cy.get('.items.pastanaga-menu .pastanaga-menu-list ul li') + .wait(2000) + .first() + .next() + .click(); + + // click preview button to get the citation + cy.get('.ui.fluid.card .content .description button').first().click(); + + // save Zotero citation + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // element is Zotero element and multiple citations works + cy.get('.slate-editor.selected [contenteditable=true]') + .find('span[id^="cite_ref"]') + .should('have.attr', 'data-footnote-indice', '[1][2]'); + + // add new Footnotes block + cy.getSlateEditorAndType('{enter}'); + cy.get('.ui.basic.icon.button.block-add-button').first().click(); + cy.get('.blocks-chooser .title').contains('Text').click(); + cy.get('.content.active.text .button.slateFootnotes') + .contains('Footnotes') + .click(); + + // Footnotes block contains one reference + cy.get('.footnotes-listing-block ol').children().should('have.length', 2); + + // Zotero reference is cited multiple times + cy.get('.content-area .slate-editor [contenteditable=true]') + .first() + .focus() + .click() + .setSlateSelection('failed'); + cy.clickSlateButton('Citation'); + + // select first Zotero collection + cy.get('.pastanaga-menu-list ul>li button').wait(2000).first().click(); + + // select first item from the Zotero collection + cy.get('.items.pastanaga-menu .pastanaga-menu-list ul li') + .wait(2000) + .first() + .click(); + + // click preview button to get the citation + cy.get('.ui.fluid.card .content .description button').first().click(); + + // save Zotero citation + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // element is Zotero element and multiple citations works + cy.get('.slate-editor.selected [contenteditable=true]') + .find('span[id^="cite_ref"]') + .eq(1) + .should('have.attr', 'data-footnote-indice', '[1]'); + + // In Footnotes block first reference has "a,b" to link to citing elements + cy.get('.footnotes-listing-block ol') + .children() + .first() + .find('sup') + .contains('a'); + cy.get('.footnotes-listing-block ol') + .children() + .first() + .find('sup') + .eq(1) + .contains('b'); + + // Delete citation from multiple set + cy.setSlateSelection('Luck', 'failure'); + cy.get('.slate-inline-toolbar.slate-toolbar') + .find('a[title^="Edit citation"]') + .click(); + + cy.get( + '#blockform-fieldset-default .slate-toolbar .ui.fluid.card .content .description .list .item', + ) + .first() + .find('a') + .click(); + + // save Zotero citation + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // Footnotes block contains one reference + cy.get('.footnotes-listing-block ol').children().should('have.length', 2); + + // In Footnotes block first reference has "a,b" to link to citing elements + cy.get('.footnotes-listing-block ol') + .click() + .children() + .first() + .find('sup') + .should('have.length', 1) + .contains('↵'); + + // Configure block + cy.get('[id=sidebar-properties] [name=title]').click().type('Footnotes'); + cy.get('[id=sidebar-properties] label[for=field-global]').click(); + + // Save + cy.get('#toolbar-save').click(); + cy.url().should('eq', Cypress.config().baseUrl + '/cypress/my-page'); + + // then the page view should contain our changes + cy.get('span.citation-item').first().contains('Luck is failure'); + cy.contains('Luck is failure that failed.'); + }); + + it('Determines if collection has subCollections and requests that data', () => { + // intercept Zotero subcollections response + cy.fixture('zotero-subCollections.json').then((subCollections) => { + const { body, statusCode, headers } = subCollections; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/collections/TFU5D/collections/?start=0&limit=10&sort=title', + { body, statusCode, headers }, + ).as('subCollections'); + }); + + // intercept Zotero items response + cy.fixture('zotero-items3.json').then((items3) => { + const { body, statusCode, headers } = items3; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/collections/TFU5D/items/?start=0&limit=10&sort=title', + { body, statusCode, headers }, + ).as('items3'); + }); + + // intercept Zotero subcollection items response + cy.fixture('zotero-items2.json').then((items2) => { + const { body, statusCode, headers } = items2; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/collections/JGTEPMWE/items/?start=0&limit=10&sort=title', + { body, statusCode, headers }, + ).as('items2'); + }); + + // intercept xml citation response for item + cy.fixture('zotero-item3.json').then((item3Resp) => { + const { body, statusCode, headers } = item3Resp; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/items/STUJEJKU?format=bib&style=https://www.eea.europa.eu/zotero/eea.csl', + { body, statusCode, headers }, + ).as('item3Resp'); + }); + + // Enter text in slate input + cy.getSlateEditorAndType('Luck is failure that failed.'); + + // Zotero + cy.setSlateSelection('Luck', 'failure'); + cy.clickSlateButton('Citation'); + + // select third Zotero collection (because it has a subCollection) + cy.get('.pastanaga-menu-list ul>li:nth-of-type(3) button') + .wait(2000) + .click() + .wait(2000); + + // select first Zotero subCollection + cy.get('.items.pastanaga-menu .pastanaga-menu-list ul>li button') + .first() + .wait(2000) + .click() + .wait(2000); + + // select first item from the Zotero collection + cy.get('.items.pastanaga-menu .pastanaga-menu-list ul li') + .wait(2000) + .first() + .click(); + + // click preview button to get the citation + cy.get('.ui.fluid.card .content .description button').first().click(); + + // save Zotero citation + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // element is Zotero element and multiple citations works + cy.get('.slate-editor.selected [contenteditable=true]') + .find('span[id^="cite_ref"]') + .should('have.attr', 'data-footnote-indice', '[1]'); + }); + + it('Searches for Openaire results Pub and RSD and Zotero results and adds them', () => { + // intercept Zotero response for search term "forest" + cy.fixture('zotero-subCollections.json').then((subCollections) => { + const { body, statusCode, headers } = subCollections; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/items?q=forest&limit=10&start=0&sort=title', + { body, statusCode, headers }, + ).as('subCollections'); + }); + + // intercept Openaire publications author response for search term "forest" + cy.fixture('zotero-openaireSearchResultsPub.json').then( + (openaireSearchResultsPub) => { + const { body, statusCode, headers } = openaireSearchResultsPub; + + cy.intercept( + 'GET', + 'https://api.openaire.eu/search/publications/?author=forest&format=json&size=20&page=1', + { body, statusCode, headers }, + ).as('openaireSearchResultsPub'); + }, + ); + + // intercept Openaire publications title response for search term "forest" + cy.fixture('zotero-openaireSearchResultsPub.json').then( + (openaireSearchResultsPub) => { + const { body, statusCode, headers } = openaireSearchResultsPub; + + cy.intercept( + 'GET', + 'https://api.openaire.eu/search/publications/?title=forest&format=json&size=20&page=1', + { body, statusCode, headers }, + ).as('openaireSearchResultsPub'); + }, + ); + + // intercept Openaire datasets author response for search term "forest" + cy.fixture('zotero-openaireSearchResultsRSD.json').then( + (openaireSearchResultsRSD) => { + const { body, statusCode, headers } = openaireSearchResultsRSD; + + cy.intercept( + 'GET', + 'https://api.openaire.eu/search/datasets/?author=forest&format=json&size=20&page=1', + { body, statusCode, headers }, + ).as('openaireSearchResultsRSD'); + }, + ); + + // intercept Openaire datasets title response for search term "forest" + cy.fixture('zotero-openaireSearchResultsRSD.json').then( + (openaireSearchResultsRSD) => { + const { body, statusCode, headers } = openaireSearchResultsRSD; + + cy.intercept( + 'GET', + 'https://api.openaire.eu/search/datasets/?title=forest&format=json&size=20&page=1', + { body, statusCode, headers }, + ).as('openaireSearchResultsRSD'); + }, + ); + + // intercept Zotero save item from Openaire response + cy.fixture('zotero-saveItemResponse.json').then((saveItemResponse) => { + const { body, statusCode, headers } = saveItemResponse; + + cy.intercept('POST', 'https://api.zotero.org/users/6732/items/', { + body, + statusCode, + headers, + }).as('saveItemResponse'); + }); + + // intercept xml citation response for Zotero item (citation) + cy.fixture('zotero-item4.json').then((item4Resp) => { + const { body, statusCode, headers } = item4Resp; + + cy.intercept( + 'GET', + 'https://api.zotero.org/users/6732/items/H8TWWRZC?format=bib&style=https://www.eea.europa.eu/zotero/eea.csl', + { body, statusCode, headers }, + ).as('item4Resp'); + }); + + // Enter text in slate input + cy.getSlateEditorAndType('Luck is failure that failed.'); + + // Zotero select item + cy.setSlateSelection('Luck', 'failure'); + cy.clickSlateButton('Citation'); + + // Enter text "forest" in search input + cy.get('.collections.pastanaga-menu input') + .focus() + .click() + .wait(2000) + .type('forest'); + + // click search button + cy.get( + '.collections.pastanaga-menu header .ui.fluid.action.icon.input button', + ) + .focus() + .click(); + + // select second item from list (first Openiare result) + cy.get('.collections.pastanaga-menu .pastanaga-menu-list ul li') + .wait(2000) + .first() + .next() + .click(); + + // click preview button to get the citation + cy.get('.ui.fluid.card .content .description button').first().click(); + + // save Openaire item to Zotero and get citation xml + cy.get('.sidebar-container #zotero-comp .form .header button:first-of-type') + .wait(2000) + .click(); + + // element is Zotero element + cy.get('.slate-editor.selected [contenteditable=true]') + .find('span[id^="cite_ref"]') + .should('have.attr', 'data-footnote-indice', '[1]'); + }); +}); diff --git a/cypress/fixtures/zotero-collections.json b/cypress/fixtures/zotero-collections.json new file mode 100644 index 00000000..2af19e62 --- /dev/null +++ b/cypress/fixtures/zotero-collections.json @@ -0,0 +1,107 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": [ + { + "key": "24C33", + "version": 145, + "data": { + "key": "24C33", + "version": 145, + "name": "2009", + "parentCollection": false, + "relations": {} + }, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + }, + "self": { + "href": "https://api.zotero.org/users/6732/collections/24C33", + "type": "application/json" + } + }, + "meta": { "numCollections": 0, "numItems": 2 } + }, + { + "key": "DH68XG", + "version": 144, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/collections/DH68XG", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/collections/DH68XG", + "type": "text/html" + } + }, + "meta": { + "numCollections": 0, + "numItems": 1 + }, + "data": { + "key": "DH68XG", + "version": 144, + "name": "2010", + "parentCollection": false, + "relations": {} + } + }, + { + "key": "TFU5D", + "version": 135, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/collections/TFU5D", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/collections/TFU5D", + "type": "text/html" + } + }, + "meta": { + "numCollections": 1, + "numItems": 1 + }, + "data": { + "key": "TFU5D", + "version": 135, + "name": "2019", + "parentCollection": false, + "relations": {} + } + } + ] +} diff --git a/cypress/fixtures/zotero-credentials.json b/cypress/fixtures/zotero-credentials.json new file mode 100644 index 00000000..c0c447f5 --- /dev/null +++ b/cypress/fixtures/zotero-credentials.json @@ -0,0 +1,10 @@ +{ + "statusCode": 200, + "body": { + "default": "NH578GBA", + "password": "test", + "server": "https://api.zotero.org/users/6732", + "style": "https://www.eea.europa.eu/zotero/eea.csl" + } +} + diff --git a/cypress/fixtures/zotero-item1.json b/cypress/fixtures/zotero-item1.json new file mode 100644 index 00000000..595e521f --- /dev/null +++ b/cypress/fixtures/zotero-item1.json @@ -0,0 +1,4 @@ +{ + "statusCode": 200, + "body": "
Alexandru, M., 'Coffee rating', (www.inventedTitle.com).
" +} diff --git a/cypress/fixtures/zotero-item2.json b/cypress/fixtures/zotero-item2.json new file mode 100644 index 00000000..315193a3 --- /dev/null +++ b/cypress/fixtures/zotero-item2.json @@ -0,0 +1,4 @@ +{ + "statusCode": 200, + "body": "
Alexandru, M., Tea Rating, Comcast 2019
" +} diff --git a/cypress/fixtures/zotero-item3.json b/cypress/fixtures/zotero-item3.json new file mode 100644 index 00000000..abee29b1 --- /dev/null +++ b/cypress/fixtures/zotero-item3.json @@ -0,0 +1,4 @@ +{ + "statusCode": 200, + "body": "
alex, 'rex', norse.
" +} diff --git a/cypress/fixtures/zotero-item4.json b/cypress/fixtures/zotero-item4.json new file mode 100644 index 00000000..a88095cc --- /dev/null +++ b/cypress/fixtures/zotero-item4.json @@ -0,0 +1,4 @@ +{ + "statusCode": 200, + "body": "
Bienvenu, F., Duchamps, J.-J. and Foutel-Rodier, F., 2021, 'The Moran forest', HAL CCSD.
" +} diff --git a/cypress/fixtures/zotero-items.json b/cypress/fixtures/zotero-items.json new file mode 100644 index 00000000..f98c1849 --- /dev/null +++ b/cypress/fixtures/zotero-items.json @@ -0,0 +1,139 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": [ + { + "key": "INFEDJ40", + "version": 184, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/items/INFEDJ40", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/items/INFEDJ40", + "type": "text/html" + } + }, + "meta": { + "creatorSummary": "Alexandru", + "numChildren": 0 + }, + "data": { + "key": "INFEDJ40", + "version": 184, + "itemType": "journalArticle", + "title": "Coffee rating", + "creators": [ + { + "creatorType": "author", + "firstName": "Medesan", + "lastName": "Alexandru" + } + ], + "abstractNote": "", + "publicationTitle": "", + "volume": "", + "issue": "", + "pages": "", + "date": "", + "series": "", + "seriesTitle": "", + "seriesText": "", + "journalAbbreviation": "", + "language": "", + "DOI": "", + "ISSN": "", + "shortTitle": "", + "url": "www.inventedTitle.com", + "accessDate": "", + "archive": "", + "archiveLocation": "", + "libraryCatalog": "", + "callNumber": "", + "rights": "", + "extra": "", + "tags": [], + "collections": ["83VH3", "BGJV5", "24C33"], + "relations": {}, + "dateAdded": "2020-07-07T06:15:29Z", + "dateModified": "2020-07-07T06:17:27Z" + } + }, + { + "key": "QHCG97BD", + "version": 185, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/items/QHCG97BD", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/items/QHCG97BD", + "type": "text/html" + } + }, + "meta": { + "numChildren": 0 + }, + "data": { + "key": "QHCG97BD", + "version": 185, + "itemType": "journalArticle", + "title": "Tea Rating", + "creators": [], + "abstractNote": "", + "publicationTitle": "Comcast", + "volume": "", + "issue": "", + "pages": "", + "date": "", + "series": "", + "seriesTitle": "", + "seriesText": "", + "journalAbbreviation": "", + "language": "", + "DOI": "", + "ISSN": "", + "shortTitle": "", + "url": "", + "accessDate": "", + "archive": "", + "archiveLocation": "", + "libraryCatalog": "", + "callNumber": "", + "rights": "", + "extra": "", + "tags": [], + "collections": ["83VH3S", "24C33"], + "relations": {}, + "dateAdded": "2020-10-12T11:40:56Z", + "dateModified": "2020-10-12T11:41:09Z" + } + } + ] +} diff --git a/cypress/fixtures/zotero-items2.json b/cypress/fixtures/zotero-items2.json new file mode 100644 index 00000000..4b0a9da8 --- /dev/null +++ b/cypress/fixtures/zotero-items2.json @@ -0,0 +1,77 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": [ + { + "key": "STUJEJKU", + "version": 167, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/items/STUJEJKU", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/items/STUJEJKU", + "type": "text/html" + } + }, + "meta": { + "creatorSummary": "alex", + "numChildren": 0 + }, + "data": { + "key": "STUJEJKU", + "version": 167, + "itemType": "journalArticle", + "title": "test", + "creators": [ + { + "creatorType": "author", + "firstName": "", + "lastName": "alex" + } + ], + "abstractNote": "", + "publicationTitle": "norse", + "volume": "", + "issue": "", + "pages": "", + "date": "", + "series": "", + "seriesTitle": "", + "seriesText": "", + "journalAbbreviation": "", + "language": "", + "DOI": "", + "ISSN": "", + "shortTitle": "", + "url": "", + "accessDate": "", + "archive": "", + "archiveLocation": "", + "libraryCatalog": "", + "callNumber": "", + "rights": "", + "extra": "", + "tags": [], + "collections": ["TFU5DMQX"], + "relations": {}, + "dateAdded": "2020-10-12T13:14:31Z", + "dateModified": "2020-10-12T13:15:41Z" + } + } + ] +} diff --git a/cypress/fixtures/zotero-items3.json b/cypress/fixtures/zotero-items3.json new file mode 100644 index 00000000..127f13cf --- /dev/null +++ b/cypress/fixtures/zotero-items3.json @@ -0,0 +1,76 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": [ + { + "key": "STUJEJKU", + "version": 172, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/items/STUJEJKU", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/items/STUJEJKU", + "type": "text/html" + } + }, + "meta": { + "numChildren": 0 + }, + "data": { + "key": "STUJEJKU", + "version": 172, + "itemType": "journalArticle", + "title": "test a", + "creators": [ + { + "creatorType": "author", + "firstName": "boss", + "lastName": "" + } + ], + "abstractNote": "", + "publicationTitle": "", + "volume": "", + "issue": "", + "pages": "", + "date": "", + "series": "", + "seriesTitle": "", + "seriesText": "", + "journalAbbreviation": "", + "language": "", + "DOI": "", + "ISSN": "", + "shortTitle": "", + "url": "", + "accessDate": "", + "archive": "", + "archiveLocation": "", + "libraryCatalog": "", + "callNumber": "", + "rights": "", + "extra": "", + "tags": [], + "collections": ["P6W4MR6W"], + "relations": {}, + "dateAdded": "2020-10-12T13:15:59Z", + "dateModified": "2020-10-12T13:16:10Z" + } + } + ] +} diff --git a/cypress/fixtures/zotero-openaireSearchResultsPub.json b/cypress/fixtures/zotero-openaireSearchResultsPub.json new file mode 100644 index 00000000..5e0ab899 --- /dev/null +++ b/cypress/fixtures/zotero-openaireSearchResultsPub.json @@ -0,0 +1,1235 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "1" + }, + "body": { + "response": { + "header": { + "query": { + "$": "(oaftype exact result) and (resulttypeid exact publication) and (resulttitle exact \"forest\")" + }, + "locale": { "$": "en_US" }, + "size": { "$": 2 }, + "page": { "$": 1 }, + "total": { "$": 203603 }, + "fields": null + }, + "results": { + "result": [ + { + "header": { + "dri:objIdentifier": { + "$": "doi_dedup___::61ce61aaf4311474545a9f19c0ad1741" + }, + "dri:dateOfCollection": { "$": "2021-05-16T04:18:03.723Z" }, + "dri:dateOfTransformation": { "$": "2021-05-16T04:34:58.322Z" } + }, + "metadata": { + "oaf:entity": { + "@xsi:schemaLocation": "http://namespace.openaire.eu/oaf https://www.openaire.eu/schema/1.0/oaf-1.0.xsd", + "oaf:result": { + "collectedfrom": [ + { + "@name": "Oskar Bordeaux", + "@id": "opendoar____::f6bc7e9dc18cfe3bbacd3dc594cef296" + }, + { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + }, + { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + }, + { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + }, + { + "@name": "arXiv.org e-Print Archive", + "@id": "opendoar____::6f4922f45568161a8cdf4ad2299f6d23" + }, + { + "@name": "HAL-Inserm", + "@id": "opendoar____::d9731321ef4e063ebbee79298fa36f56" + }, + { + "@name": "Crossref", + "@id": "openaire____::081b82f96300b6a6e3d282bad31cb6e2" + }, + { + "@name": "ORCID", + "@id": "openaire____::806360c771262b4d6770e7cdf04b5c5a" + } + ], + "originalId": [ + { + "$": "50|od______9631::2dda867935f128aae77adca9fa1aef9c" + }, + { "$": "oai:oskar-bordeaux.fr:20.500.12278/39954" }, + { "$": "oai:HAL:hal-02165001v1" }, + { + "$": "50|od_______212::6746d39ebcc4d97dc7d949065323c0a4" + }, + { "$": "oai:HAL:hal-02165001v2" }, + { + "$": "50|od______2592::b172733093f24e6d4620187ddfb3cef5" + }, + { + "$": "50|od_______166::b172733093f24e6d4620187ddfb3cef5" + }, + { + "$": "50|od_______212::b172733093f24e6d4620187ddfb3cef5" + }, + { + "$": "50|od________18::68dc1a0aee1be05f1623a0d95c196fa9" + }, + { "$": "oai:arXiv.org:1906.08806" }, + { + "$": "50|od______1398::b172733093f24e6d4620187ddfb3cef5" + }, + { + "$": "50|od_______166::6746d39ebcc4d97dc7d949065323c0a4" + }, + { "$": "10.1002/rsa.20997" }, + { + "$": "50|doiboost____::61ce61aaf4311474545a9f19c0ad1741" + }, + { "$": "50|od______2592::6746d39ebcc4d97dc7d949065323c0a4" } + ], + "pid": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "$": "10.1002/rsa.20997" + } + ], + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "bestaccessright": { + "@classid": "OPEN", + "@classname": "Open Access", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "creator": [ + { + "@rank": "1", + "@name": "François", + "@surname": "Bienvenu", + "@orcid": "0000-0002-5396-1193", + "$": "François Bienvenu" + }, + { + "@rank": "2", + "@name": "Jean‐Jil", + "@surname": "Duchamps", + "@orcid": "0000-0002-3823-1686", + "$": "Jean‐Jil Duchamps" + }, + { + "@rank": "3", + "@name": "Félix", + "@surname": "Foutel‐Rodier", + "$": "Félix Foutel‐Rodier" + } + ], + "contributor": [ + { + "$": "Centre interdisciplinaire de recherche en biologie (CIRB) ; Labex MemoLife ; École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-Centre National de la Recherche Scientifique (CNRS)-Institut National de la Santé et de la Recherche Médicale (INSERM)" + }, + { + "$": "Laboratoire de Probabilités, Statistiques et Modélisations (LPSM (UMR_8001)) ; Université Paris Diderot - Paris 7 (UPD7)-Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)" + }, + { + "$": "Centre interdisciplinaire de recherche en biologie (CIRB) ; Labex MemoLife ; École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-Institut National de la Santé et de la Recherche Médicale (INSERM)-Centre National de la Recherche Scientifique (CNRS)" + }, + { + "$": "Laboratoire de Probabilités, Statistiques et Modélisations (LPSM (UMR_8001)) ; Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)-Université de Paris (UP)" + }, + { + "$": "Laboratoire de Mathématiques de Besançon (UMR 6623) (LMB) ; Université de Bourgogne (UB)-Université de Franche-Comté (UFC) ; Université Bourgogne Franche-Comté [COMUE] (UBFC)-Université Bourgogne Franche-Comté [COMUE] (UBFC)-Centre National de la Recherche Scientifique (CNRS)" + }, + { + "$": "Centre interdisciplinaire de recherche en biologie (CIRB) ; Labex MemoLife ; Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-Université Paris sciences et lettres (PSL)-Collège de France (CdF (institution))-École normale supérieure - Paris (ENS Paris) ; Université Paris sciences et lettres (PSL)-Ecole Superieure de Physique et de Chimie Industrielles de la Ville de Paris (ESPCI Paris) ; Université Paris sciences et lettres (PSL)-Centre National de la Recherche Scientifique (CNRS)-Institut National de la Santé et de la Recherche Médicale (INSERM)" + } + ], + "country": { + "@classid": "FR", + "@classname": "France", + "@schemeid": "dnet:countries", + "@schemename": "dnet:countries" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "description": [ + { "$": "Comment: Accepted version" }, + { + "$": "Starting from any graph on $\\{1, \\ldots, n\\}$, consider the Markov chain where at each time-step a uniformly chosen vertex is disconnected from all of its neighbors and reconnected to another uniformly chosen vertex. This Markov chain has a stationary distribution whose support is the set of non-empty forests on $\\{1, \\ldots, n\\}$. The random forest corresponding to this stationary distribution has interesting connections with the uniform rooted labeled tree and the uniform attachment tree. We fully characterize its degree distribution, the distribution of its number of trees, and the limit distribution of the size of a tree sampled uniformly. We also show that the size of the largest tree is asymptotically $\\alpha \\log n$, where $\\alpha = (1 - \\log(e - 1))^{-1} \\approx 2.18$, and that the degree of the most connected vertex is asymptotically $\\log n / \\log\\log n$." + } + ], + "subject": [ + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "[MATH.MATH-PR]Mathematics [math]/Probability [math.PR]" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "[MATH.MATH-CO]Mathematics [math]/Combinatorics [math.CO]" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "Mathematics - Probability" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "Mathematics - Combinatorics" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "05C80, 60C05 (Primary) 60J10, 05C05, 05C07 (Secondary)" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Applied Mathematics" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Computer Graphics and Computer-Aided Design" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "General Mathematics" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Software" + } + ], + "language": { + "@classid": "eng", + "@classname": "English", + "@schemeid": "dnet:languages", + "@schemename": "dnet:languages" + }, + "relevantdate": [ + { + "@classid": "created", + "@classname": "created", + "@schemeid": "dnet:dataCite_date", + "@schemename": "dnet:dataCite_date", + "$": "2021-02-18" + }, + { + "@classid": "published-online", + "@classname": "published-online", + "@schemeid": "dnet:dataCite_date", + "@schemename": "dnet:dataCite_date", + "$": "2021-02-15" + } + ], + "source": [ + { "$": 2019 }, + { "$": 2021 }, + { "$": "Crossref" }, + { "$": "https://hal.sorbonne-universite.fr/hal-02165001" } + ], + "resulttype": { + "@classid": "publication", + "@classname": "publication", + "@schemeid": "dnet:result_typologies", + "@schemename": "dnet:result_typologies" + }, + "resourcetype": { + "@classid": "UNKNOWN", + "@classname": "UNKNOWN", + "@schemeid": "dnet:dataCite_resource", + "@schemename": "dnet:dataCite_resource" + }, + "datainfo": { + "inferred": { "$": true }, + "deletedbyinference": { "$": false }, + "trust": { "$": 0.8 }, + "inferenceprovenance": { + "$": "dedup-similarity-result-decisiontree-v2" + }, + "provenanceaction": { + "@classid": "sysimport:dedup", + "@classname": "Inferred by OpenAIRE", + "@schemeid": "dnet:provenanceActions", + "@schemename": "dnet:provenanceActions" + } + }, + "rels": { + "rel": [ + { + "@inferred": true, + "@trust": "0.85", + "@inferenceprovenance": "propagation", + "@provenanceaction": "result:organization:instrepo", + "to": { + "@class": "hasAuthorInstitution", + "@scheme": "dnet:result_organization_relations", + "@type": "organization", + "$": "openorgs____::c80a8243a5e5c620d7931c88d93bf17a" + }, + "country": { + "@classid": "FR", + "@classname": "France", + "@schemeid": "dnet:countries", + "@schemename": "dnet:countries" + }, + "legalname": { "$": "Université Paris Diderot" }, + "legalshortname": { "$": "Université Paris Diderot" } + }, + { + "@inferred": true, + "@trust": "0.85", + "@inferenceprovenance": "propagation", + "@provenanceaction": "result:organization:instrepo", + "to": { + "@class": "hasAuthorInstitution", + "@scheme": "dnet:result_organization_relations", + "@type": "organization", + "$": "openorgs____::50c715fc6e0a1f3bcd8238b190b89f79" + }, + "legalshortname": { "$": "INSERM" }, + "legalname": { "$": "Inserm" }, + "country": { + "@classid": "FR", + "@classname": "France", + "@schemeid": "dnet:countries", + "@schemename": "dnet:countries" + } + }, + { + "@inferred": true, + "@trust": "0.85", + "@inferenceprovenance": "propagation", + "@provenanceaction": "result:organization:instrepo", + "to": { + "@class": "hasAuthorInstitution", + "@scheme": "dnet:result_organization_relations", + "@type": "organization", + "$": "openorgs____::a0f160aa60f8800f11a313d3ea2ac6dd" + }, + "country": { + "@classid": "FR", + "@classname": "France", + "@schemeid": "dnet:countries", + "@schemename": "dnet:countries" + }, + "legalshortname": { "$": "University of Bordeaux" }, + "legalname": { "$": "University of Bordeaux" } + } + ] + }, + "children": { + "result": [ + { + "@objidentifier": "od______2592::b172733093f24e6d4620187ddfb3cef5", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + } + }, + { + "@objidentifier": "doi_________::61ce61aaf4311474545a9f19c0ad1741", + "dateofacceptance": { "$": "2021-02-15" }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "The Moran forest" + }, + "publisher": { "$": "Wiley" }, + "collectedfrom": [ + { + "@name": "Crossref", + "@id": "openaire____::081b82f96300b6a6e3d282bad31cb6e2" + }, + { + "@name": "ORCID", + "@id": "openaire____::806360c771262b4d6770e7cdf04b5c5a" + } + ], + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "$": "10.1002/rsa.20997" + } + }, + { + "@objidentifier": "arXiv_______::d5c0cc250fdf81a75c08c76490cc475c", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2019-06-20" }, + "collectedfrom": { + "@name": "arXiv.org e-Print Archive", + "@id": "opendoar____::6f4922f45568161a8cdf4ad2299f6d23" + }, + "pid": { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + } + }, + { + "@objidentifier": "od_______166::6746d39ebcc4d97dc7d949065323c0a4", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + } + }, + { + "@objidentifier": "od______1398::b172733093f24e6d4620187ddfb3cef5", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "collectedfrom": { + "@name": "HAL-Inserm", + "@id": "opendoar____::d9731321ef4e063ebbee79298fa36f56" + }, + "publisher": { "$": "HAL CCSD" } + }, + { + "@objidentifier": "od_______166::b172733093f24e6d4620187ddfb3cef5", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + } + }, + { + "@objidentifier": "od_______212::b172733093f24e6d4620187ddfb3cef5", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + } + }, + { + "@objidentifier": "od______2592::6746d39ebcc4d97dc7d949065323c0a4", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + } + }, + { + "@objidentifier": "od_______212::6746d39ebcc4d97dc7d949065323c0a4", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "publisher": { "$": "HAL CCSD" }, + "collectedfrom": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + } + }, + { + "@objidentifier": "od______9631::2dda867935f128aae77adca9fa1aef9c", + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "The Moran forest" + }, + "collectedfrom": { + "@name": "Oskar Bordeaux", + "@id": "opendoar____::f6bc7e9dc18cfe3bbacd3dc594cef296" + } + } + ], + "instance": [ + { + "@id": "opendoar____::f6bc7e9dc18cfe3bbacd3dc594cef296", + "accessright": { + "@classid": "OPEN", + "@classname": "Open Access", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Oskar Bordeaux", + "@id": "opendoar____::f6bc7e9dc18cfe3bbacd3dc594cef296" + }, + "hostedby": { + "@name": "Oskar Bordeaux", + "@id": "opendoar____::f6bc7e9dc18cfe3bbacd3dc594cef296" + }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "http://hdl.handle.net/20.500.12278/39954" + } + } + }, + { + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + }, + "hostedby": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/file/moran_forest.pdf" + } + } + ] + }, + { + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + }, + "hostedby": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/file/ms.pdf" + } + } + ] + }, + { + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + }, + "hostedby": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/file/ms.pdf" + } + } + ] + }, + { + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + }, + "hostedby": { + "@name": "Mémoires en Sciences de l'Information et de la Communication", + "@id": "opendoar____::1534b76d325a8f591b52d302e7181331" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/file/ms.pdf" + } + } + ] + }, + { + "@id": "opendoar____::6f4922f45568161a8cdf4ad2299f6d23", + "accessright": { + "@classid": "OPEN", + "@classname": "Open Access", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "arXiv.org e-Print Archive", + "@id": "opendoar____::6f4922f45568161a8cdf4ad2299f6d23" + }, + "hostedby": { + "@name": "arXiv.org e-Print Archive", + "@id": "opendoar____::6f4922f45568161a8cdf4ad2299f6d23" + }, + "dateofacceptance": { "$": "2019-06-20" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + "alternateidentifier": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "10.1002/rsa.20997" + }, + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { "$": "http://arxiv.org/abs/1906.08806" } + } + }, + { + "@id": "opendoar____::d9731321ef4e063ebbee79298fa36f56", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "HAL-Inserm", + "@id": "opendoar____::d9731321ef4e063ebbee79298fa36f56" + }, + "hostedby": { + "@name": "HAL-Inserm", + "@id": "opendoar____::d9731321ef4e063ebbee79298fa36f56" + }, + "dateofacceptance": { "$": "2021-04-26" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001v2/file/ms.pdf" + } + } + ] + }, + { + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + }, + "hostedby": { + "@name": "Hyper Article en Ligne", + "@id": "opendoar____::7e7757b1e12abcb736ab9a754ffb617a" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/file/moran_forest.pdf" + } + } + ] + }, + { + "@id": "issn___print::7c7535a5cdf105d0c83a0253624392cc", + "accessright": { + "@classid": "CLOSED", + "@classname": "Closed Access", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Crossref", + "@id": "openaire____::081b82f96300b6a6e3d282bad31cb6e2" + }, + "hostedby": { + "@name": "Random Structures and Algorithms", + "@id": "issn___print::7c7535a5cdf105d0c83a0253624392cc" + }, + "dateofacceptance": { "$": "2021-02-15" }, + "instancetype": { + "@classid": "0001", + "@classname": "Article", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "$": "10.1002/rsa.20997" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://onlinelibrary.wiley.com/doi/pdf/10.1002/rsa.20997" + } + }, + { + "url": { + "$": "https://onlinelibrary.wiley.com/doi/full-xml/10.1002/rsa.20997" + } + }, + { + "url": { + "$": "http://dx.doi.org/10.1002/rsa.20997" + } + } + ] + }, + { + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + }, + "hostedby": { + "@name": "Hal-Diderot", + "@id": "opendoar____::18bb68e2b38e4a8ce7cf4f6b2625768c" + }, + "dateofacceptance": { "$": "2019-06-25" }, + "instancetype": { + "@classid": "0016", + "@classname": "Preprint", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "alternateidentifier": [ + { + "@classid": "arXiv", + "@classname": "arXiv", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": 1906.08806 + }, + { + "@classid": "hal", + "@classname": "HAL / Hyper Article en Ligne identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:crosswalk:repository", + "@trust": "0.9", + "$": "hal-02165001" + } + ], + "refereed": { + "@classid": "0002", + "@classname": "nonPeerReviewed", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": [ + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/document" + } + }, + { + "url": { + "$": "https://hal.sorbonne-universite.fr/hal-02165001/file/moran_forest.pdf" + } + } + ] + } + ] + } + } + } + } + } + ] + }, + "browseResults": null + } + } +} diff --git a/cypress/fixtures/zotero-openaireSearchResultsRSD.json b/cypress/fixtures/zotero-openaireSearchResultsRSD.json new file mode 100644 index 00000000..41deb7bc --- /dev/null +++ b/cypress/fixtures/zotero-openaireSearchResultsRSD.json @@ -0,0 +1,755 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "1" + }, + "body": { + "response": { + "header": { + "query": { + "$": "(oaftype exact result) and (resulttypeid exact dataset) and (resulttitle exact \"forest\")" + }, + "locale": { "$": "en_US" }, + "size": { "$": 2 }, + "page": { "$": 1 }, + "total": { "$": 172070 }, + "fields": null + }, + "results": { + "result": [ + { + "header": { + "dri:objIdentifier": { + "$": "doi_dedup___::258645438d9b8cbe86798587f1514977" + }, + "dri:dateOfCollection": { "$": "2020-09-20T00:02:57+0000" }, + "dri:dateOfTransformation": { "$": "2020-09-20T00:02:57+0000" } + }, + "metadata": { + "oaf:entity": { + "@xsi:schemaLocation": "http://namespace.openaire.eu/oaf https://www.openaire.eu/schema/1.0/oaf-1.0.xsd", + "oaf:result": { + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "originalId": [ + { "$": "10.25549/impa-m78492" }, + { "$": "10.25549/impa-m78491" }, + { "$": "10.25549/impa-m79576" }, + { "$": "10.25549/impa-m77990" }, + { "$": "10.25549/impa-m78739" }, + { "$": "10.25549/impa-m79742" }, + { "$": "10.25549/impa-m77989" } + ], + "pid": [ + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78492" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78491" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79576" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77990" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78739" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79742" + }, + { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77989" + } + ], + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "Forest, in Gabon" + }, + "bestaccessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "creator": { "@rank": "1", "$": "Unknown" }, + "dateofacceptance": { "$": "2012-01-01" }, + "description": { + "$": "Missionary of the Société des missions évangéliques de Paris (Paris evangelical missionary society) standing next to a giant tree in the forest near Samkita." + }, + "subject": [ + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Trees" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Forests" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Landscape" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Houses" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Vegetation" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Missionary" + }, + { + "@classid": "keyword", + "@classname": "keyword", + "@schemeid": "dnet:subject_classification_typologies", + "@schemename": "dnet:subject_classification_typologies", + "$": "Société des missions évangéliques de Paris, SMEP (Paris evangelical missionary society)" + } + ], + "language": { + "@classid": "eng", + "@classname": "English", + "@schemeid": "dnet:languages", + "@schemename": "dnet:languages" + }, + "relevantdate": { + "@classid": "issued", + "@classname": "issued", + "@schemeid": "dnet:dataCite_date", + "@schemename": "dnet:dataCite_date", + "$": "2012-01-01" + }, + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "resulttype": { + "@classid": "dataset", + "@classname": "dataset", + "@schemeid": "dnet:result_typologies", + "@schemename": "dnet:result_typologies" + }, + "resourcetype": { + "@classid": "UNKNOWN", + "@classname": "UNKNOWN", + "@schemeid": "dnet:dataCite_resource", + "@schemename": "dnet:dataCite_resource" + }, + "datainfo": { + "inferred": { "$": true }, + "deletedbyinference": { "$": false }, + "trust": { "$": 0.8 }, + "inferenceprovenance": { + "$": "dedup-similarity-result-decisiontree-v2" + }, + "provenanceaction": { + "@classid": "sysimport:dedup", + "@classname": "Inferred by OpenAIRE", + "@schemeid": "dnet:provenanceActions", + "@schemename": "dnet:provenanceActions" + } + }, + "rels": null, + "children": { + "result": [ + { + "@objidentifier": "doi_________::e0685fbf4c4960fb91176e24851923c4", + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78491" + }, + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "Forest, in Gabon" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + } + }, + { + "@objidentifier": "doi_________::d1b15e4cb18f520614170aa1c24c9fd7", + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79576" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "[Forest in Gabon]" + } + }, + { + "@objidentifier": "doi_________::f17cca7b2a283db79767128183a52859", + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "Forest, in Gabon" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78492" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + } + }, + { + "@objidentifier": "doi_________::7cb50a27bdae5efd132bb8430f1592d8", + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78739" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "[Forest in Gabon]" + } + }, + { + "@objidentifier": "doi_________::93d3de78d534fe158bbbf5d29c7f337c", + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77989" + }, + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "Forest in Gabon" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + } + }, + { + "@objidentifier": "doi_________::258645438d9b8cbe86798587f1514977", + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77990" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "Forest, in Gabon" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + } + }, + { + "@objidentifier": "doi_________::262d86ca21cc931d000cb2183471c343", + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79742" + }, + "title": { + "@classid": "main title", + "@classname": "main title", + "@schemeid": "dnet:dataCite_title", + "@schemename": "dnet:dataCite_title", + "$": "[Forest, in Gabon]" + }, + "publisher": { + "$": "University of Southern California Digital Library (USC.DL)" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + } + } + ], + "instance": [ + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78492" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m78492" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78491" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m78491" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79576" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m79576" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77990" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m77990" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m78739" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m78739" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m79742" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m79742" + } + } + }, + { + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c", + "accessright": { + "@classid": "UNKNOWN", + "@classname": "not available", + "@schemeid": "dnet:access_modes", + "@schemename": "dnet:access_modes" + }, + "collectedfrom": { + "@name": "Datacite", + "@id": "openaire____::9e3be59865b2c1c335d32dae2fe7b254" + }, + "hostedby": { + "@name": "Unknown Repository", + "@id": "openaire____::55045bd2a65019fd8e6741a755395c8c" + }, + "dateofacceptance": { "$": "2012-01-01" }, + "instancetype": { + "@classid": "0021", + "@classname": "Dataset", + "@schemeid": "dnet:publication_resource", + "@schemename": "dnet:publication_resource" + }, + "pid": { + "@classid": "doi", + "@classname": "Digital Object Identifier", + "@schemeid": "dnet:pid_types", + "@schemename": "dnet:pid_types", + "@inferred": false, + "@provenanceaction": "sysimport:actionset", + "@trust": "0.9", + "$": "10.25549/impa-m77989" + }, + "refereed": { + "@classid": "0000", + "@classname": "UNKNOWN", + "@schemeid": "dnet:review_levels", + "@schemename": "dnet:review_levels" + }, + "webresource": { + "url": { + "$": "https://dx.doi.org/10.25549/impa-m77989" + } + } + } + ] + } + } + } + } + } + ] + }, + "browseResults": null + } + } +} diff --git a/cypress/fixtures/zotero-saveItemResponse.json b/cypress/fixtures/zotero-saveItemResponse.json new file mode 100644 index 00000000..6145f0d7 --- /dev/null +++ b/cypress/fixtures/zotero-saveItemResponse.json @@ -0,0 +1,95 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": { + "successful": { + "0": { + "key": "H8TWWRZC", + "version": 305, + "library": { + "type": "user", + "id": 6732551, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732551/items/H8TWWRZC", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/items/H8TWWRZC", + "type": "text/html" + } + }, + "meta": { + "creatorSummary": "Bienvenu et al.", + "parsedDate": "2021", + "numChildren": 0 + }, + "data": { + "key": "H8TWWRZC", + "version": 305, + "itemType": "journalArticle", + "title": "The Moran forest", + "creators": [ + { + "creatorType": "author", + "firstName": "François", + "lastName": "Bienvenu" + }, + { + "creatorType": "author", + "firstName": "Jean‐Jil", + "lastName": "Duchamps" + }, + { + "creatorType": "author", + "firstName": "Félix", + "lastName": "Foutel‐Rodier" + } + ], + "abstractNote": "", + "publicationTitle": "", + "volume": "", + "issue": "", + "pages": "", + "date": "2021", + "series": "", + "seriesTitle": "", + "seriesText": "", + "journalAbbreviation": "", + "language": "", + "DOI": "10.1002/rsa.20997", + "ISSN": "", + "shortTitle": "", + "url": "", + "accessDate": "", + "archive": "", + "archiveLocation": "", + "libraryCatalog": "", + "callNumber": "", + "rights": "", + "extra": "", + "tags": [], + "collections": ["NH578GBA"], + "relations": {}, + "dateAdded": "2021-12-14T17:08:25Z", + "dateModified": "2021-12-14T17:08:25Z" + } + } + }, + "success": { + "0": "H8TWWRZC" + }, + "unchanged": {}, + "failed": {} + } +} diff --git a/cypress/fixtures/zotero-subCollections.json b/cypress/fixtures/zotero-subCollections.json new file mode 100644 index 00000000..035b8fad --- /dev/null +++ b/cypress/fixtures/zotero-subCollections.json @@ -0,0 +1,48 @@ +{ + "statusCode": 200, + "headers": { + "Total-Results": "14" + }, + "body": [ + { + "key": "JGTEPMWE", + "version": 151, + "library": { + "type": "user", + "id": 6732, + "name": "rexalexmede", + "links": { + "alternate": { + "href": "https://www.zotero.org/rexalexmede", + "type": "text/html" + } + } + }, + "links": { + "self": { + "href": "https://api.zotero.org/users/6732/collections/JGTEPMWE", + "type": "application/json" + }, + "alternate": { + "href": "https://www.zotero.org/rexalexmede/collections/JGTEPMWE", + "type": "text/html" + }, + "up": { + "href": "https://api.zotero.org/users/6732/collections/TFU5DMQX", + "type": "application/json" + } + }, + "meta": { + "numCollections": 0, + "numItems": 1 + }, + "data": { + "key": "JGTEPMWE", + "version": 151, + "name": "2019 a", + "parentCollection": "TFU5DMQX", + "relations": {} + } + } + ] +}