mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-05 00:14:18 +00:00
fix: give quick compose's Move to the main window an arrow going in, not the exit full screen arrows
This commit is contained in:
@@ -112,6 +112,15 @@ function target(shown = true): ComposerPopOut & { handed: ComposerDraftData[]; c
|
||||
|
||||
const DRAFT: ComposerDraftData = { to: '', cc: '', bcc: '', subject: 'Old', body: '', showCc: false, showBcc: false, selectedIdentityId: null, subAddressTag: '', mode: 'compose', draftId: null };
|
||||
|
||||
describe('"Move to the main window" in quick compose', () => {
|
||||
it('shows an arrow going in, not the arrows of leaving full screen', () => {
|
||||
mount({ popOut: vi.fn(() => target()), popOutToMainLabel: 'Move to the main window' });
|
||||
const svg = screen.getByTestId('composer-back-to-main').querySelector('svg');
|
||||
expect(svg?.getAttribute('class')).toContain('tabler-icon-login');
|
||||
expect(svg?.getAttribute('class')).not.toContain('minimize');
|
||||
});
|
||||
});
|
||||
|
||||
describe('"Open in new window" on a composer', () => {
|
||||
it('is not there without the host offering it: browsers stay as they are', () => {
|
||||
mount({});
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
Minimize2,
|
||||
Trash2,
|
||||
ExternalLink,
|
||||
LogIn,
|
||||
ReplyAll,
|
||||
Reply,
|
||||
Forward,
|
||||
@@ -4682,7 +4683,8 @@ export function EmailComposer({
|
||||
title={popOutToMainLabel ?? tWindows('open_in_window')}
|
||||
data-testid={popOutToMainLabel ? "composer-back-to-main" : "composer-open-in-window"}
|
||||
>
|
||||
{popOutToMainLabel ? <Minimize2 className={iconClassName} /> : <ExternalLink className={iconClassName} />}
|
||||
{/* Into the main window: an arrow going in, not the inward arrows of leaving full screen. */}
|
||||
{popOutToMainLabel ? <LogIn className={iconClassName} /> : <ExternalLink className={iconClassName} />}
|
||||
</button>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user