|
| 1 | +import {Organization} from '../../../src/types' |
| 2 | + |
| 3 | +describe('Deep linking', () => { |
| 4 | + beforeEach(() => { |
| 5 | + cy.flush() |
| 6 | + cy.signin() |
| 7 | + }) |
| 8 | + |
| 9 | + // If you're here and the test failure you're looking at is legitimate, it probably means a page |
| 10 | + // that a deep link pointed to has changed. There are implications to this; docs and marketing pages |
| 11 | + // might use the deep link that has changed. We want to avoid having broken deep links out on the web, |
| 12 | + // so there might be some follow-up work necessary with docs or marketing pages. |
| 13 | + it.skip('should be redirected to the approprate page from a shortened link', () => { |
| 14 | + cy.get('@org').then((org: Organization) => { |
| 15 | + cy.setFeatureFlags({ |
| 16 | + deepLinking: true, |
| 17 | + }).then(() => { |
| 18 | + cy.wait(1000) |
| 19 | + cy.visit('/me/about') |
| 20 | + cy.location('pathname').should('eq', `/orgs/${org.id}/about`) |
| 21 | + |
| 22 | + cy.visit('/me/alerts') |
| 23 | + cy.location('pathname').should('eq', `/orgs/${org.id}/alerting`) |
| 24 | + |
| 25 | + cy.visit('/me/billing') |
| 26 | + cy.location('pathname').should('eq', `/orgs/${org.id}/billing`) |
| 27 | + |
| 28 | + cy.visit('/me/buckets') |
| 29 | + cy.location('pathname').should( |
| 30 | + 'eq', |
| 31 | + `/orgs/${org.id}/load-data/buckets` |
| 32 | + ) |
| 33 | + |
| 34 | + cy.visit('/me/csharpclient') |
| 35 | + cy.location('pathname').should( |
| 36 | + 'eq', |
| 37 | + `/orgs/${org.id}/load-data/client-libraries/csharp` |
| 38 | + ) |
| 39 | + |
| 40 | + cy.visit('/me/dashboards') |
| 41 | + cy.location('pathname').should('eq', `/orgs/${org.id}/dashboards-list`) |
| 42 | + |
| 43 | + cy.visit('/me/data-explorer') |
| 44 | + cy.location('pathname').should('eq', `/orgs/${org.id}/data-explorer`) |
| 45 | + |
| 46 | + cy.visit('/me/goclient') |
| 47 | + cy.location('pathname').should( |
| 48 | + 'eq', |
| 49 | + `/orgs/${org.id}/load-data/client-libraries/go` |
| 50 | + ) |
| 51 | + |
| 52 | + cy.visit('/me/home') |
| 53 | + cy.location('pathname').should('eq', `/orgs/${org.id}`) |
| 54 | + |
| 55 | + cy.visit('/me/labels') |
| 56 | + cy.location('pathname').should('eq', `/orgs/${org.id}/settings/labels`) |
| 57 | + |
| 58 | + cy.visit('/me/load-data') |
| 59 | + cy.location('pathname').should( |
| 60 | + 'eq', |
| 61 | + `/orgs/${org.id}/load-data/sources` |
| 62 | + ) |
| 63 | + |
| 64 | + cy.visit('/me/nodejsclient') |
| 65 | + cy.location('pathname').should( |
| 66 | + 'eq', |
| 67 | + `/orgs/${org.id}/load-data/client-libraries/javascript-node` |
| 68 | + ) |
| 69 | + |
| 70 | + cy.visit('/me/notebooks') |
| 71 | + cy.location('pathname').should('eq', `/orgs/${org.id}/notebooks`) |
| 72 | + |
| 73 | + cy.visit('/me/pythonclient') |
| 74 | + cy.location('pathname').should( |
| 75 | + 'eq', |
| 76 | + `/orgs/${org.id}/load-data/client-libraries/python` |
| 77 | + ) |
| 78 | + |
| 79 | + cy.visit('/me/secrets') |
| 80 | + cy.location('pathname').should('eq', `/orgs/${org.id}/settings/secrets`) |
| 81 | + |
| 82 | + cy.visit('/me/tasks') |
| 83 | + cy.location('pathname').should('eq', `/orgs/${org.id}/tasks`) |
| 84 | + |
| 85 | + cy.visit('/me/telegraf-mqtt') |
| 86 | + cy.location('pathname').should( |
| 87 | + 'eq', |
| 88 | + `/orgs/${org.id}/load-data/telegraf-plugins/mqtt_consumer` |
| 89 | + ) |
| 90 | + |
| 91 | + cy.visit('/me/telegrafs') |
| 92 | + cy.location('pathname').should( |
| 93 | + 'eq', |
| 94 | + `/orgs/${org.id}/load-data/telegrafs` |
| 95 | + ) |
| 96 | + |
| 97 | + cy.visit('/me/templates') |
| 98 | + cy.location('pathname').should( |
| 99 | + 'eq', |
| 100 | + `/orgs/${org.id}/settings/templates` |
| 101 | + ) |
| 102 | + |
| 103 | + cy.visit('/me/tokens') |
| 104 | + cy.location('pathname').should('eq', `/orgs/${org.id}/load-data/tokens`) |
| 105 | + |
| 106 | + cy.visit('/me/usage') |
| 107 | + cy.location('pathname').should('eq', `/orgs/${org.id}/usage`) |
| 108 | + |
| 109 | + cy.visit('/me/users') |
| 110 | + cy.location('pathname').should('eq', `/orgs/${org.id}/users`) |
| 111 | + |
| 112 | + cy.visit('/me/variables') |
| 113 | + cy.location('pathname').should( |
| 114 | + 'eq', |
| 115 | + `/orgs/${org.id}/settings/variables` |
| 116 | + ) |
| 117 | + }) |
| 118 | + }) |
| 119 | + }) |
| 120 | +}) |
0 commit comments