Skip to content

Commit

Permalink
Revert "Revert "Revert "Revert "Revert "[FEAT] 518 extraction phase c…
Browse files Browse the repository at this point in the history
…an we make the list of studies more spreadsheet like (#820)"""""

This reverts commit 6b19523.
  • Loading branch information
jdkent committed Sep 19, 2024
1 parent 30f27c2 commit cb6cbc5
Show file tree
Hide file tree
Showing 39 changed files with 1,063 additions and 2,842 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PAGE_NAME = 'BaseStudyPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', `https://api.semanticscholar.org/**`, {
fixture: 'semanticScholar',
}).as('semanticScholarFixture');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PAGE_NAME = 'EditStudyPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('GET', `https://api.semanticscholar.org/**`, {
fixture: 'semanticScholar',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PAGE_NAME = 'LandingPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('GET', `**/api/base-studies/**`, {
fixture: 'baseStudies/baseStudiesNoResults',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PAGE_NAME = 'MetaAnalysisPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('GET', `**/api/specifications/**`, { fixture: 'specification' }).as(
'specificationFixture'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PAGE_NAME = 'ProjectMetaAnalysesPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('GET', `**/api/specifications/**`, { fixture: 'specification' }).as(
'specificationFixture'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PAGE_NAME = 'ProjectPage';

describe(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('POST', `https://www.google-analytics.com/*/**`, {}).as(
'googleAnalyticsFixture'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const PAGE_NAME = 'StudiesPage';

describe.skip(PAGE_NAME, () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe('ImportStudiesDialog', () => {
beforeEach(() => {
cy.clearLocalStorage();
cy.clearLocalStorage().clearSessionStorage();
cy.intercept('GET', 'https://api.appzi.io/**', { fixture: 'appzi' }).as('appziFixture');
cy.intercept('GET', `**/api/projects/*`, {
fixture: 'projects/projectExtractionStep',
Expand Down Expand Up @@ -198,14 +198,14 @@ describe('ImportStudiesDialog', () => {
});

it('should set the source and show the input', () => {
cy.get('input[role="combobox"]').click();
cy.get('input[role="combobox"').click();
cy.contains('li', 'Scopus').click();
cy.get('textarea').should('be.visible');
cy.contains(/Input is empty/).should('be.visible');
});

it('should set the sources and enable the next button', () => {
cy.get('input[role="combobox"]').click();
cy.get('input[role="combobox"').click();
cy.contains('li', 'Scopus').click();
cy.get('textarea[placeholder="paste in valid endnote, bibtex, or RIS syntax"]')
.click()
Expand All @@ -220,7 +220,7 @@ describe('ImportStudiesDialog', () => {
});

it('should show an error message', () => {
cy.get('input[role="combobox"]').click();
cy.get('input[role="combobox"').click();
cy.contains('li', 'Scopus').click();
cy.get('textarea[placeholder="paste in valid endnote, bibtex, or RIS syntax"]').type(
'INVALID FORMAT'
Expand All @@ -229,7 +229,7 @@ describe('ImportStudiesDialog', () => {
});

it('should import studies', () => {
cy.get('input[role="combobox"]').click();
cy.get('input[role="combobox"').click();
cy.contains('li', 'Scopus').click();
cy.get('textarea[placeholder="paste in valid endnote, bibtex, or RIS syntax"]')
.click()
Expand All @@ -249,7 +249,7 @@ describe('ImportStudiesDialog', () => {
});

it('should upload a onenote (ENW) file', () => {
cy.get('input[role="combobox"]').click();
cy.get('input[role="combobox"').click();
cy.contains('li', 'Scopus').click();
cy.get('label[role="button"]').selectFile(
'cypress/fixtures/standardFiles/onenoteStudies.txt'
Expand Down
Loading

0 comments on commit cb6cbc5

Please sign in to comment.