Skip to content

Commit df33f7b

Browse files
Merge branch 'ROU-11118_V2' of https://github.com/ionic-team/ionic-framework into ROU-11118_V2
2 parents 327a033 + 21bad1e commit df33f7b

File tree

184 files changed

+58
-88
lines changed

Some content is hidden

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

184 files changed

+58
-88
lines changed

core/src/components.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ export namespace Components {
937937
*/
938938
"reset": (startDate?: string) => Promise<void>;
939939
/**
940-
* If `true`, the datetime will show the last days of the previous month and the first days of the next month on a table of 42 elements.
940+
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
941941
*/
942942
"showAdjacentDays": boolean;
943943
/**
@@ -5744,7 +5744,7 @@ declare namespace LocalJSX {
57445744
*/
57455745
"readonly"?: boolean;
57465746
/**
5747-
* If `true`, the datetime will show the last days of the previous month and the first days of the next month on a table of 42 elements.
5747+
* If `true`, the datetime calendar displays a six-week (42-day) layout, including days from the previous and next months to fill the grid. These adjacent days are selectable unless disabled.
57485748
*/
57495749
"showAdjacentDays"?: boolean;
57505750
/**

core/src/components/datetime/datetime.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ export class Datetime implements ComponentInterface {
209209
@Prop() isDateEnabled?: (dateIsoString: string) => boolean;
210210

211211
/**
212-
* If `true`, the datetime will show the last days of the previous month and the first days of the next month on a table of 42 elements.
212+
* If `true`, the datetime calendar displays a six-week (42-day) layout,
213+
* including days from the previous and next months to fill the grid.
214+
* These adjacent days are selectable unless disabled.
213215
*/
214216
@Prop() showAdjacentDays = false;
215217

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
11
import { expect } from '@playwright/test';
22
import { configs, test } from '@utils/test/playwright';
33

4-
configs().forEach(({ title, screenshot, config }) => {
5-
test.describe(title('datetime: ShowDaysOutsideCustomMonth'), () => {
6-
test('with custom-grid should not have any visual regressions', async ({ page }) => {
4+
/**
5+
* This behavior does not vary across directions
6+
*/
7+
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
8+
test.describe(title('datetime: show adjacent days'), () => {
9+
test('should not have visual regressions', async ({ page }) => {
710
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
8-
const customGrid = page.locator('#custom-grid');
9-
await expect(customGrid).toHaveScreenshot(screenshot(`customGrid-with-adjacent-days`));
11+
const datetime = page.locator('#default');
12+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days`));
1013
});
1114

12-
test('should set the first day of the week correctly', async ({ page }) => {
15+
test('should not have visual regressions with a custom styled calendar', async ({ page }) => {
1316
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
14-
const customDatetime = page.locator('#custom-calendar-days');
15-
await expect(customDatetime).toHaveScreenshot(screenshot(`custom-calendar-with-adjacent-days`));
17+
const datetime = page.locator('#custom-calendar-days');
18+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-custom-calendar`));
1619
});
1720

18-
test('with specific date disabled should not have any visual regressions', async ({ page }) => {
21+
test('should not have visual regressions with specific date disabled', async ({ page }) => {
1922
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
20-
const specificDateDisabled = page.locator('#specificDate');
21-
await expect(specificDateDisabled).toHaveScreenshot(screenshot(`specificDate-with-adjacent-days`));
23+
const datetime = page.locator('#specificDate');
24+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-specific-date-disabled`));
2225
});
2326

24-
test('with weekends disabled should not have any visual regressions', async ({ page }) => {
27+
test('should not have visual regressions with weekends disabled', async ({ page }) => {
2528
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
26-
const weekendsDisabled = page.locator('#weekends');
27-
await expect(weekendsDisabled).toHaveScreenshot(screenshot(`weekendsDisabled-with-adjacent-days`));
29+
const datetime = page.locator('#weekends');
30+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-weekends-disabled`));
2831
});
2932

30-
test('with date range disabled should not have any visual regressions', async ({ page }) => {
33+
test('should not have visual regressions with date range disabled', async ({ page }) => {
3134
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
32-
const dateRangeDisabled = page.locator('#dateRange');
33-
await expect(dateRangeDisabled).toHaveScreenshot(screenshot(`dateRangeDisabled-with-adjacent-days`));
35+
const datetime = page.locator('#dateRange');
36+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-date-range-disabled`));
3437
});
3538

36-
test('with month disabled should not have any visual regressions', async ({ page }) => {
39+
test('should not have visual regressions with month disabled', async ({ page }) => {
3740
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
38-
const monthDisabled = page.locator('#month');
39-
await expect(monthDisabled).toHaveScreenshot(screenshot(`monthDisabled-with-adjacent-days`));
41+
const datetime = page.locator('#month');
42+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-month-disabled`));
4043
});
4144

42-
test('with specific display should not have any visual regressions', async ({ page }) => {
45+
test('should not have visual regressions with display specified', async ({ page }) => {
4346
await page.goto('/src/components/datetime/test/show-adjacent-days', config);
44-
const display = page.locator('#display');
45-
await expect(display).toHaveScreenshot(screenshot(`display-with-adjacent-days`));
47+
const datetime = page.locator('#display');
48+
await expect(datetime).toHaveScreenshot(screenshot(`datetime-show-adjacent-days-display`));
4649
});
4750
});
4851
});

0 commit comments

Comments
 (0)