-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into tom/trends-actor-query-breakdowns
- Loading branch information
Showing
190 changed files
with
4,894 additions
and
2,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
describe('Experiments', () => { | ||
let randomNum | ||
let experimentName | ||
let featureFlagKey | ||
|
||
beforeEach(() => { | ||
cy.intercept('/api/users/@me/', { | ||
fixture: 'api/experiments/user', | ||
}) | ||
|
||
cy.intercept('/api/projects/1/experiments?limit=1000', { | ||
fixture: 'api/experiments/experiments', | ||
}) | ||
|
||
cy.intercept('/api/projects/1/experiments/1234/', { | ||
fixture: 'api/experiments/new-experiment', | ||
}) | ||
|
||
cy.intercept('POST', '/api/projects/1/experiments/', (req) => { | ||
req.reply({ fixture: 'api/experiments/new-experiment' }) | ||
}) | ||
|
||
randomNum = Math.floor(Math.random() * 10000000) | ||
experimentName = `Experiment ${randomNum}` | ||
featureFlagKey = `experiment-${randomNum}` | ||
cy.visit('/experiments') | ||
}) | ||
|
||
it('create experiment', () => { | ||
cy.get('[data-attr=top-bar-name]').should('contain', 'A/B testing') | ||
|
||
// Name, flag key, description | ||
cy.get('[data-attr=create-experiment]').first().click() | ||
cy.get('[data-attr=experiment-name]').click().type(`${experimentName}`).should('have.value', experimentName) | ||
cy.get('[data-attr=experiment-feature-flag-key]') | ||
.click() | ||
.type(`${featureFlagKey}`) | ||
.should('have.value', featureFlagKey) | ||
cy.get('[data-attr=experiment-description]') | ||
.click() | ||
.type('This is the description of the experiment') | ||
.should('have.value', 'This is the description of the experiment') | ||
|
||
// Edit variants | ||
cy.get('[data-attr="add-test-variant"]').click() | ||
cy.get('input[data-attr="experiment-variant-key"][data-key-index="1"]') | ||
.clear() | ||
.type('test-variant-1') | ||
.should('have.value', 'test-variant-1') | ||
cy.get('input[data-attr="experiment-variant-key"][data-key-index="2"]') | ||
.clear() | ||
.type('test-variant-2') | ||
.should('have.value', 'test-variant-2') | ||
|
||
// Select goal type | ||
cy.get('[data-attr="experiment-goal-type-select"]').click() | ||
cy.contains('Trend').should('be.visible') | ||
cy.contains('Conversion funnel').should('be.visible') | ||
|
||
// Add secondary metric | ||
const secondaryMetricName = `Secondary metric ${Math.floor(Math.random() * 10000000)}` | ||
cy.get('[data-attr="add-secondary-metric-btn"]').click() | ||
cy.get('[data-attr=secondary-metric-name]') | ||
.click() | ||
.type(secondaryMetricName) | ||
.should('have.value', secondaryMetricName) | ||
cy.get('[data-attr="metrics-selector"]').click() | ||
cy.contains('Trends').should('be.visible') | ||
cy.contains('Funnels').should('be.visible') | ||
cy.get('[data-attr="create-annotation-submit"]').click() | ||
cy.contains(secondaryMetricName).should('exist') | ||
|
||
// Edit minimum acceptable improvement | ||
cy.get('input[data-attr="min-acceptable-improvement"]').type('{selectall}20').should('have.value', '20') | ||
|
||
// Save experiment | ||
cy.get('[data-attr="save-experiment"]').first().click() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"count": 1, | ||
"next": null, | ||
"previous": null, | ||
"results": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"id": 1234, | ||
"name": "Test experiment 1", | ||
"description": "This is the description of Test experiment 1", | ||
"start_date": null, | ||
"end_date": null, | ||
"feature_flag_key": "test-experiment-1", | ||
"feature_flag": { | ||
"id": 28367, | ||
"team_id": 38354, | ||
"name": "Feature Flag for Experiment Test experiment 1", | ||
"key": "test-experiment-1", | ||
"filters": { | ||
"groups": [ | ||
{ | ||
"properties": [], | ||
"rollout_percentage": null | ||
} | ||
], | ||
"multivariate": { | ||
"variants": [ | ||
{ | ||
"key": "control", | ||
"rollout_percentage": 33 | ||
}, | ||
{ | ||
"key": "test-variant-1", | ||
"rollout_percentage": 33 | ||
}, | ||
{ | ||
"key": "test-variant-2", | ||
"rollout_percentage": 34 | ||
} | ||
] | ||
}, | ||
"aggregation_group_type_index": null | ||
}, | ||
"deleted": false, | ||
"active": false, | ||
"ensure_experience_continuity": false | ||
}, | ||
"parameters": { | ||
"feature_flag_variants": [ | ||
{ | ||
"key": "control", | ||
"rollout_percentage": 33 | ||
}, | ||
{ | ||
"key": "test-variant-1", | ||
"rollout_percentage": 33 | ||
}, | ||
{ | ||
"key": "test-variant-2", | ||
"rollout_percentage": 34 | ||
} | ||
], | ||
"recommended_sample_size": 0, | ||
"recommended_running_time": 191.3 | ||
}, | ||
"secondary_metrics": [], | ||
"filters": { | ||
"events": [ | ||
{ | ||
"id": "$pageview", | ||
"math": "total", | ||
"name": "$pageview", | ||
"type": "events", | ||
"order": 0 | ||
} | ||
], | ||
"date_to": "2024-01-23T23:59", | ||
"display": "ActionsLineGraph", | ||
"insight": "TRENDS", | ||
"interval": "day", | ||
"date_from": "2024-01-09T09:00", | ||
"entity_type": "events" | ||
}, | ||
"archived": false, | ||
"created_by": { | ||
"id": 50136, | ||
"uuid": "018a8e2f-f329-0000-7594-0cbb2cb03ed5", | ||
"distinct_id": "3z5U5MNGsfbeqBKOwGs6dvlG0UFbiU78MfJYxyD1ahg", | ||
"first_name": "Jane", | ||
"last_name": "Doe", | ||
"email": "[email protected]", | ||
"is_email_verified": true | ||
}, | ||
"created_at": "2024-01-23T08:01:20.564210Z", | ||
"updated_at": "2024-01-23T08:01:20.564590Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"id": "01788ed8-6d2d-0000-ccdb-d8e17589b1ea", | ||
"distinct_id": "kOyAmTq2McfCD5XvqwjKf8m6GVecm9uN0L0ypEoRN50", | ||
"first_name": "Jane", | ||
"email": "[email protected]", | ||
"email_opt_in": true, | ||
"anonymize_data": false, | ||
"toolbar_mode": "toolbar", | ||
"has_password": true, | ||
"is_staff": false, | ||
"is_impersonated": false, | ||
"team": { | ||
"id": 1, | ||
"uuid": "01787e47-55d7-0000-6976-b893a03aaba8", | ||
"organization": "01787e47-5558-0000-bae1-6bc513b42abe", | ||
"api_token": "dtrwW0uEC7LwVx64RmZmqog_XjU0nXWuEK1d1ZpjteQ", | ||
"name": "Hogflix Demo App", | ||
"completed_snippet_onboarding": true, | ||
"ingested_event": true, | ||
"is_demo": true, | ||
"timezone": "UTC" | ||
}, | ||
"organization": { | ||
"id": "01787e47-5558-0000-bae1-6bc513b42abe", | ||
"name": "Hogflix Movies", | ||
"created_at": "2021-03-29T13:58:27.416616Z", | ||
"updated_at": "2021-03-29T13:58:57.067131Z", | ||
"membership_level": 15, | ||
"plugins_access_level": 9, | ||
"teams": [ | ||
{ | ||
"id": 1, | ||
"uuid": "01787e47-55d7-0000-6976-b893a03aaba8", | ||
"organization": "01787e47-5558-0000-bae1-6bc513b42abe", | ||
"api_token": "dtrwW0uEC7LwVx64RmZmqog_XjU0nXWuEK1d1ZpjteQ", | ||
"name": "Hogflix Demo App", | ||
"completed_snippet_onboarding": true, | ||
"ingested_event": true, | ||
"is_demo": true, | ||
"timezone": "UTC" | ||
} | ||
], | ||
"available_features": [], | ||
"available_product_features": [ | ||
{ | ||
"key": "experimentation", | ||
"name": "A/B testing", | ||
"note": null, | ||
"unit": null, | ||
"limit": null, | ||
"description": "Test changes to your product and evaluate the impacts those changes make." | ||
} | ||
] | ||
}, | ||
"organizations": [{ "id": "01787e47-5558-0000-bae1-6bc513b42abe", "name": "Hogflix Movies" }] | ||
} |
Oops, something went wrong.