Skip to content

Commit 1ef34c6

Browse files
committed
fix: Return correct feature evolution data for moved and split features
The primary changes are: - The `GetMovedWebFeatureDetailsByOriginalFeatureKey` function has been fixed. It was previously returning the internal database ID of the new feature; it now correctly returns the human-readable feature key, as intended. - The main feature query has been updated to join against a new `SplitWebFeatures` table. The `GET /v1/features` and `GET /v1/features/{feature_id}` endpoints now include an `evolution` object in the response. This object contains `split_off_info` which lists any features that have been split off from the primary feature. To support this, the following changes were also made: - The `openapi.yaml` specification has been updated to include the new `evolution` fields in the `Feature` schema. - The fake data generation process in `util/cmd/load_fake_data` has been significantly enhanced to create more realistic test data for feature evolution, including scenarios for moved, fully split, and partially split features. - End-to-end tests and snapshots have been updated to reflect the new data structures and the changes in the underlying test data.start There needs to be some frontend changes. But that will come in a future PR.
1 parent 0908131 commit 1ef34c6

File tree

47 files changed

+791
-537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+791
-537
lines changed
-1.45 KB
Loading
-19 Bytes
Loading
7 Bytes
Loading

e2e/tests/feature-page.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ test.beforeEach(async ({page}) => {
2121
await setupFakeNow(page);
2222
});
2323

24+
const featureID = 'anchor-positioning';
25+
const featureName = 'Anchor Positioning';
26+
2427
test('matches the screenshot', async ({page}) => {
25-
await page.goto('http://localhost:5555/features/odit64');
28+
await page.goto(`http://localhost:5555/features/${featureID}`);
2629

2730
// Wait for the chart container to exist
2831
await page.waitForSelector('#feature-wpt-implementation-progress-0-complete');
@@ -35,7 +38,7 @@ test('matches the screenshot', async ({page}) => {
3538
});
3639

3740
test('chart width resizes with window', async ({page}) => {
38-
await page.goto('http://localhost:5555/features/odit64');
41+
await page.goto(`http://localhost:5555/features/${featureID}`);
3942
await page.waitForSelector('#feature-wpt-implementation-progress-0-complete');
4043
await page.waitForTimeout(1000);
4144
const narrowWidth = 1000;
@@ -71,7 +74,7 @@ test('chart width resizes with window', async ({page}) => {
7174
test('mobile chart displays on click and matches screenshot', async ({
7275
page,
7376
}) => {
74-
await page.goto('http://localhost:5555/features/odit64');
77+
await page.goto(`http://localhost:5555/features/${featureID}`);
7578
await page.waitForSelector('#feature-wpt-implementation-progress-0-complete');
7679
const mobileTab = page.locator(
7780
'sl-tab#feature-wpt-implementation-progress-tab-mobile',
@@ -84,7 +87,7 @@ test('mobile chart displays on click and matches screenshot', async ({
8487
});
8588

8689
test('date range changes are preserved in the URL', async ({page}) => {
87-
await page.goto('http://localhost:5555/features/odit64');
90+
await page.goto(`http://localhost:5555/features/${featureID}`);
8891
await page.waitForSelector('#feature-wpt-implementation-progress-0-complete');
8992

9093
// Get the current default startDate and endDate from the selectors
@@ -131,7 +134,7 @@ test('date range changes are preserved in the URL', async ({page}) => {
131134
// TODO: Check that the chart has the right start date.
132135

133136
// Click on the feature breadcrumb.
134-
const featureCrumb = page.locator('.crumbs >> a:has-text("odit64")');
137+
const featureCrumb = page.locator(`.crumbs >> a:has-text("${featureName}")`);
135138
await featureCrumb.click();
136139

137140
// Check that the URL no longer contains the startDate or endDate.
1021 Bytes
Loading
2.28 KB
Loading
1 KB
Loading
-2.16 KB
Loading
11.4 KB
Loading
5.74 KB
Loading

0 commit comments

Comments
 (0)