Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/components/content/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ export class Content implements ComponentInterface {
role={isMainContent ? 'main' : undefined}
class={createColorClasses(this.color, {
[mode]: true,
'content-fullscreen': this.fullscreen,
'content-sizing': hostContext('ion-popover', this.el),
overscroll: forceOverscroll,
[`content-${rtl}`]: true,
Expand Down
28 changes: 28 additions & 0 deletions core/src/components/content/test/fullscreen/content.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,33 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co

await expect(page).toHaveScreenshot(screenshot(`content-fullscreen`));
});

test('should have content-fullscreen class when fullscreen is true', async ({ page }) => {
await page.setContent(
`
<ion-content fullscreen>
<p>Hello</p>
</ion-content>
`,
config
);

const content = page.locator('ion-content');
await expect(content).toHaveClass(/content-fullscreen/);
});

test('should not have content-fullscreen class when fullscreen is false', async ({ page }) => {
await page.setContent(
`
<ion-content>
<p>Hello</p>
</ion-content>
`,
config
);

const content = page.locator('ion-content');
await expect(content).not.toHaveClass(/content-fullscreen/);
});
});
});
Loading