From 6122776bb04af6c2115ef1305fae732fc99964ac Mon Sep 17 00:00:00 2001 From: duncdrum Date: Thu, 25 Jan 2024 18:02:56 +0100 Subject: [PATCH] chore: spec cleanup see #47 --- .github/workflows/test.yml | 10 ---------- cypress/e2e/simple-api.cy.js | 34 ---------------------------------- cypress/e2e/simple.cy.js | 19 +++++++++++++++---- cypress/e2e/spec.cy.js | 36 ------------------------------------ 4 files changed, 15 insertions(+), 84 deletions(-) delete mode 100644 cypress/e2e/simple-api.cy.js delete mode 100644 cypress/e2e/spec.cy.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3eb066..5c33d11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,16 +25,6 @@ jobs: build: npm install config: baseUrl=https://stabikat.de/search/ env: grepUntagged=true - spec: | - cypress/e2e/spec.cy.js - cypress/e2e/author.cy.js - cypress/e2e/reviews.cy.js - cypress/e2e/nested.cy.js - cypress/e2e/multi-lang-phrase.cy.js - cypress/e2e/place.cy.js - cypress/e2e/chronology.cy.js - cypress/e2e/topical.cy.js - cypress/e2e/duplicates.cy.js # browser: firefox # Lint Yaml - name: Yaml Lint diff --git a/cypress/e2e/simple-api.cy.js b/cypress/e2e/simple-api.cy.js deleted file mode 100644 index 1f23979..0000000 --- a/cypress/e2e/simple-api.cy.js +++ /dev/null @@ -1,34 +0,0 @@ -describe('simple api spec', () => { - // Broken spec, findex rejects direct requests with 403 even from internatl network - - // before(() => { - // cy.visit('select', { - // headers: { - // 'accept': 'application/json, text/plain, */*' - // }, - // qs: { - // q: 'dad' - // } - // }) - // }) - - - it.skip('connects via BaseURL', () => { - cy.visit('select?q=collection%3AFID') - }) - - // This will be a 403 for world should connect from internal network - // https://findex.gbv.de/index/11/select?q=collection%3AFID - it('connects via http request', () => { - cy.request({ - url: 'https://findex.gbv.de/index/11/select', - qs: { - q: 'dad' - } - }).then((resp) => { - expect(resp.status).to.eq(200) - }) - - }) -}) - diff --git a/cypress/e2e/simple.cy.js b/cypress/e2e/simple.cy.js index 69588b1..f741834 100644 --- a/cypress/e2e/simple.cy.js +++ b/cypress/e2e/simple.cy.js @@ -1,7 +1,6 @@ -// Results?lookfor=dad&type=AllFields +// test different connection options, sort of a self-test - -describe('simple GUI spec', () => { +describe.skip('connection to GUI result list', () => { before(() => { cy.visit({ url: '/Results', @@ -18,7 +17,7 @@ describe('simple GUI spec', () => { }) // This will be a 403 from world should connect from internal network - it('should also pass via http request', () => { + it('connect to vufind result object', () => { cy.request({ url: '/Results', qs: { @@ -29,4 +28,16 @@ describe('simple GUI spec', () => { }) }) + + it('connects to index', () => { + cy.request({ + url: 'https://findex.gbv.de/index/11/select', + qs: { + q: 'dad' + } + }).then((resp) => { + expect(resp.status).to.eq(200) + }) + + }) }) \ No newline at end of file diff --git a/cypress/e2e/spec.cy.js b/cypress/e2e/spec.cy.js deleted file mode 100644 index 5e3e2f6..0000000 --- a/cypress/e2e/spec.cy.js +++ /dev/null @@ -1,36 +0,0 @@ -describe('template spec', () => { - it('passes', () => { - cy.visit('/') - }) - - // This will be a 403 for world should connect from internal network - it.skip('passes', () => { - cy.request('/index/11', { - qs: { - select: { - fl: '*', - year: '2024', - 'shards.tolerant': 'true', - 'q.op': 'AND', - 'facet.threads': '4', - spellcheck: 'true', - sort: 'score+desc', - hl: 'false', - 'spellcheck.dictionary': 'default', - wt: 'json', - 'json.nl': 'arrarr', - rows: '20', - start: '0', - 'spellcheck.q': 'adad', - qf: 'title_short^750+title_full_unstemmed^600+title_full^400+title^500+title_alt^200+title_new^100+series^50+series^100+author^300+contents^10+topic_unstemmed^1050+topic^1000+geographic^300+class^500+bklname^500+genre^300+allfields_unstemmed^0.1+fulltext_unstemmed^0.1+allfields^0.1+fulltext^0.1+description^0.1+isbn+issn+long_lat_display^0.1+allfieldsGer^0.1+id^50+hierarchy_top_id+journal^500+is_hierarchy_title^500+hierarchy_top_title^500', - qt: 'edismax', - bq: ['format:eJournal^237', 'format:Journal^284', 'format:eBook^255', 'format:Book^500', 'format:Article^620', 'format:"electronic+Article"^620', 'format_facet:"Serienband"^0.1', 'publishDateSort:2023^280', 'publishDateSort:2022^260', 'publishDateSort:2021^240', 'publishDateSort:2020^220', 'publishDateSort:2019^200', 'publishDateSort:2018^180', 'publishDateSort:2017^160', 'publishDateSort:2016^150', 'publishDateSort:2015^140', 'publishDateSort:2014^130', 'publishDateSort:2013^120', 'publishDateSort:202*^500'], - mm: '0%', - q: 'adad', - fq: ['(collection:GVK+AND+collection_details:GBV_ILN_11)+OR+(collection:OLC+AND+collection_details:GBV_ILN_11)+OR+collection:NL+OR+collection:JSTOR+OR+collection:DOAJ+OR+collection:SBB-Crossref', 'NOT+id:859116190', 'NOT+signature_iln_str_mv:11\:vergriffen+OR+NOT+signature_iln_str_mv:"11\:nicht+beschaffbar"+OR+NOT+signature_iln_str_mv:11\:storniert+OR+NOT+signature_iln_str_mv:"11\:nicht+erschienen"'] - } - }, - }) - }) -}) -