|
3 | 3 |
|
4 | 4 | context('Visiting a legacy URL', () => { |
5 | 5 | it('redirects to the new index route', () => { |
6 | | - cy.visit('index.html?action=search&type=name&q=tei') |
7 | | - cy.url().should('equal', 'http://localhost:8080/exist/apps/fundocs/?action=search&where=everywhere&q=tei') |
| 6 | + cy.visit('index.html', { qs: { action: 'search', type: 'name', q: 'tei'}}) |
| 7 | + |
| 8 | + cy.location('pathname').should('eq', '/exist/apps/fundocs/') |
| 9 | + cy.location('search').should('include', 'action=search') |
| 10 | + cy.location('search').should('include', 'where=everywhere') |
| 11 | + cy.location('search').should('include', 'q=tei') |
8 | 12 | }) |
9 | 13 | it('redirects to the new view route', () => { |
10 | | - cy.visit('view.html?uri=http://exist-db.org/xquery/file&function=file:sync&arity=3&location=java:org.exist.xquery.modules.file.FileModule') |
11 | | - cy.url().should('equal', 'http://localhost:8080/exist/apps/fundocs/view?location=java%3Aorg.exist.xquery.modules.file.FileModule&uri=http%3A%2F%2Fexist-db.org%2Fxquery%2Ffile&function=file%3Async') |
| 14 | + cy.visit('view.html', { qs: { uri: 'http://exist-db.org/xquery/file', function: 'file:sync', location: 'java:org.exist.xquery.modules.file.FileModule'}}) |
| 15 | + |
| 16 | + cy.location('pathname').should('eq', '/exist/apps/fundocs/view') |
| 17 | + cy.location('search').should('include', 'uri=http%3A%2F%2Fexist-db.org%2Fxquery%2Ffile') |
| 18 | + cy.location('search').should('include', 'function=file%3Async') |
| 19 | + cy.location('search').should('include', 'location=java%3Aorg.exist.xquery.modules.file.FileModule') |
12 | 20 | }) |
13 | 21 | it('redirects to the new browse URL', () => { |
14 | | - cy.visit('browse.html?w3c=true&appmodules=true') |
15 | | - cy.url().should('equal', 'http://localhost:8080/exist/apps/fundocs/browse?w3c=true&appmodules=true') |
| 22 | + cy.visit('browse.html', { qs: { w3c: 'true', appmodules: 'true'}}) |
| 23 | + |
| 24 | + cy.location('pathname').should('eq', '/exist/apps/fundocs/browse') |
| 25 | + cy.location('search').should('include', 'w3c=true') |
| 26 | + cy.location('search').should('include', 'appmodules=true') |
16 | 27 | }) |
17 | 28 | }) |
0 commit comments