diff --git a/ab-testing/README.md b/ab-testing/README.md index f56fc3c5335..d232e27aa14 100644 --- a/ab-testing/README.md +++ b/ab-testing/README.md @@ -63,6 +63,10 @@ To add a test where there is not enough space in the default audience space (`A` For example if there are already 3 25% tests in space `A` totalling 75%, and you want to run a 50% test, you can set the `audienceSpace` to `B` to allow this test to overlap with the existing tests. +### Test Status + +Tests can be set to `ON` or `OFF` using the `status` field. Only tests with status `ON` will be validated and deployed. + ## How it works The AB testing framework uses Deno to run scripts that validate and deploy the tests. The `deno.json` file contains the tasks that can be run, such as `validate`, `deploy`, and `build`. diff --git a/ab-testing/abTest.ts b/ab-testing/abTest.ts index 18ca954beec..017f4250d5d 100644 --- a/ab-testing/abTest.ts +++ b/ab-testing/abTest.ts @@ -19,4 +19,8 @@ import type { ABTest } from './types'; * - 100% Test variant MVT 500-999 */ -export const ABTests: ABTest[] = []; +const ABTests: ABTest[] = []; + +const activeABtests = ABTests.filter((test) => test.status === 'ON'); + +export { ABTests as allABTests, activeABtests }; diff --git a/ab-testing/frontend/src/routes/+page.svelte b/ab-testing/frontend/src/routes/+page.svelte index abeed7ac261..3737bca0cf2 100644 --- a/ab-testing/frontend/src/routes/+page.svelte +++ b/ab-testing/frontend/src/routes/+page.svelte @@ -1,5 +1,5 @@ @@ -31,8 +31,8 @@

- - + +