Change order of place display options
@@ -13,7 +13,7 @@ describe('loadFile', () => {
|
||||
const {gedcom, images} = await loadFile(blob);
|
||||
// File length may differ between Linux and Windows due to line endings (\n vs \r\n)
|
||||
// So, check for a set of values instead of exactly one value
|
||||
expect([4408, 4765]).toContain(gedcom.length);
|
||||
expect([4549, 4909]).toContain(gedcom.length);
|
||||
expect(images).toEqual(new Map());
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('loadFile', () => {
|
||||
});
|
||||
const blob = new Blob([Buffer.from(file)]) as globalThis.Blob;
|
||||
const {gedcom, images} = await loadFile(blob);
|
||||
expect(gedcom.length).toBe(4408);
|
||||
expect([4549, 4909]).toContain(gedcom.length);
|
||||
expect(images.size).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
7
src/datasource/testdata/test.ged
vendored
@@ -15,6 +15,9 @@
|
||||
0 @I1@ INDI
|
||||
1 NAME Bonifacy /Gibbs/
|
||||
1 SEX M
|
||||
1 BIRT
|
||||
2 DATE 18 JUN 1970
|
||||
2 PLAC Cyclone, Keating Township, McKean, Pennsylvania, United States
|
||||
1 FAMC @F3@
|
||||
1 FAMS @F1@
|
||||
1 NOTE a random note
|
||||
@@ -25,8 +28,8 @@
|
||||
1 NAME Jarmila /Valenta/
|
||||
1 SEX F
|
||||
1 BIRT
|
||||
2 DATE
|
||||
2 PLAC
|
||||
2 DATE 22 MAY 1975
|
||||
2 PLAC Prague, Bohemia, Austria-Hungary
|
||||
1 FAMC @F6@
|
||||
1 FAMS @F1@
|
||||
1 CHAN
|
||||
|
||||
@@ -291,15 +291,15 @@ export function ConfigPanel(props: {
|
||||
label={
|
||||
<FormattedMessage
|
||||
tagName="label"
|
||||
id="config.places.FULL"
|
||||
defaultMessage="full"
|
||||
id="config.places.HIDE"
|
||||
defaultMessage="hide"
|
||||
/>
|
||||
}
|
||||
name="checkboxRadioGroup"
|
||||
value="full"
|
||||
checked={props.config.place === PlaceDisplay.FULL}
|
||||
value="hide"
|
||||
checked={props.config.place === PlaceDisplay.HIDE}
|
||||
onClick={() =>
|
||||
props.onChange({...props.config, place: PlaceDisplay.FULL})
|
||||
props.onChange({...props.config, place: PlaceDisplay.HIDE})
|
||||
}
|
||||
/>
|
||||
</Form.Field>
|
||||
@@ -343,15 +343,15 @@ export function ConfigPanel(props: {
|
||||
label={
|
||||
<FormattedMessage
|
||||
tagName="label"
|
||||
id="config.places.HIDE"
|
||||
defaultMessage="hide"
|
||||
id="config.places.FULL"
|
||||
defaultMessage="full"
|
||||
/>
|
||||
}
|
||||
name="checkboxRadioGroup"
|
||||
value="hide"
|
||||
checked={props.config.place === PlaceDisplay.HIDE}
|
||||
value="full"
|
||||
checked={props.config.place === PlaceDisplay.FULL}
|
||||
onClick={() =>
|
||||
props.onChange({...props.config, place: PlaceDisplay.HIDE})
|
||||
props.onChange({...props.config, place: PlaceDisplay.FULL})
|
||||
}
|
||||
/>
|
||||
</Form.Field>
|
||||
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 53 KiB |
@@ -58,4 +58,29 @@ test.describe('Configurations Integration @visual', () => {
|
||||
await page.waitForTimeout(300);
|
||||
await expect(page).toHaveScreenshot('config-state-minimalist.png');
|
||||
});
|
||||
|
||||
test('Places Configuration Options', async ({page}) => {
|
||||
// Locate the section container inside form.details specifically to avoid Info tab ambiguity.
|
||||
const placesSection = page
|
||||
.locator('form.details .item')
|
||||
.filter({hasText: 'Places'});
|
||||
|
||||
// 1. Toggle "hide" places.
|
||||
await placesSection.getByText('hide').click();
|
||||
await page.waitForTimeout(300);
|
||||
await expect(page).toHaveScreenshot('config-state-places-hide.png');
|
||||
|
||||
// 2. Toggle "short" places (default count is 2).
|
||||
await placesSection.getByText('short').click();
|
||||
await page.waitForTimeout(300);
|
||||
await expect(page).toHaveScreenshot(
|
||||
'config-state-places-short-default.png',
|
||||
);
|
||||
|
||||
// 3. Change short place count to 1.
|
||||
const countInput = placesSection.locator('input[type="number"]');
|
||||
await countInput.fill('1');
|
||||
await page.waitForTimeout(300);
|
||||
await expect(page).toHaveScreenshot('config-state-places-short-1.png');
|
||||
});
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 74 KiB |