level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
3,467 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/message/tests/ViewEOMessage.images.test.tsx | import { findByRole, findByText, fireEvent, screen, waitFor } from '@testing-library/react';
import { VERIFICATION_STATUS } from '@proton/shared/lib/mail/constants';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOBody, EOClearAll, EOSubject } from '../../.... |
3,468 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/message/tests/ViewEOMessage.reply.test.tsx | import { screen, waitFor } from '@testing-library/react';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOClearAll, reply } from '../../../../helpers/test/eo/helpers';
import { EOMessageReply } from '../../../../logic/eo/eoType';
import { setup } from './Vie... |
3,475 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply/tests/EOReply.attachments.test.tsx | import { act, fireEvent, waitFor } from '@testing-library/react';
import { wait } from '@proton/shared/lib/helpers/promise';
import { EO_REPLY_NUM_ATTACHMENTS_LIMIT } from '@proton/shared/lib/mail/eo/constants';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import {... |
3,476 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply/tests/EOReply.reply.test.tsx | import { waitFor } from '@testing-library/react';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOClearAll, reply } from '../../../../helpers/test/eo/helpers';
import { setup } from './EOReply.test.helpers';
describe('EO Reply if max replies has been reache... |
3,477 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/reply/tests/EOReply.sending.test.tsx | import { CryptoProxy } from '@proton/crypto';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOGetHistory } from '../../../../helpers/test/eo/EORender';
import { EOClearAll, EOPassword, validID } from '../../../../helpers/test/eo/helpers';
import { send } fro... |
3,479 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/unlock/EOUnlock.test.tsx | import { act, fireEvent } from '@testing-library/react';
import { wait } from '@proton/shared/lib/helpers/promise';
import { addApiMock } from '../../../helpers/test/api';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../helpers/test/crypto';
import { EOGetHistory, EORender, EOResetHistory } f... |
3,484 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/header/MailHeader.test.tsx | import { fireEvent } from '@testing-library/react';
import { screen } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import {
addApiMock,
addToCache,
clearAll,
getDropdown,
getHistory,
minimalCache,
... |
3,496 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/header/search | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/header/search/AdvancedSearchFields/LocationField.test.tsx | import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { ALMOST_ALL_MAIL } from '@proton/shared/lib/mail/mailSettings';
import { mockUseFolders, mockUseMailSettings } from '@proton/t... |
3,502 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/header/search | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/header/search/AdvancedSearchFields/useLocationFieldOptions.test.ts | import { ALMOST_ALL_MAIL } from '@proton/shared/lib/mail/mailSettings';
import { mockUseFolders, mockUseLabels, mockUseMailSettings } from '@proton/testing/index';
import { mockUseScheduleSendFeature } from 'proton-mail/helpers/test/mockUseScheduleSendFeature';
import { useLocationFieldOptions } from './useLocationFi... |
3,511 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/ItemAttachmentThumbnails.test.tsx | import { fireEvent, screen } from '@testing-library/react';
import { useFlag } from '@proton/components/index';
import { WorkerDecryptionResult } from '@proton/crypto';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import downloadFile from '@proton/shared/lib/helpers/downloadFile';
import { Attachm... |
3,515 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/ItemDate.test.tsx | import { render } from '../../helpers/test/render';
import { Conversation } from '../../models/conversation';
import { Element } from '../../models/element';
import ItemDate from './ItemDate';
const element = {
ID: 'elementID',
Time: 1672531200,
} as Element;
const snoozedElement = {
ID: 'elementID',
... |
3,519 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/ItemDateSnoozedMessage.test.tsx | import { render } from '@testing-library/react';
import { addDays, addYears, getUnixTime } from 'date-fns';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { formatFullDate, formatScheduledTimeString } from '../../helpers/d... |
3,530 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/ListBanners.test.tsx | import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { DENSITY, MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { UserSettings } from '@proton/shared/lib/interfaces';
import { mockUseApi, mockUseEventManager, mockUseHistory, mockU... |
3,537 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/useScrollToTop.test.ts | import { useState } from 'react';
import { renderHook } from '@testing-library/react-hooks';
import useScrollToTop from './useScrollToTop';
describe('useScrollToTop', () => {
it('should scroll to top', () => {
renderHook(() => {
const ref = { current: { scrollTop: 10 } } as React.RefObject<HT... |
3,540 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners/almost-all-mail/AlmostAllMailBanner.test.tsx | import { render, screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { mockUseHistory } from '@proton/testing/index';
import { getHumanLabelID } from 'proton-mail/helpers/labels';
import AlmostA... |
3,542 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners/auto-delete/AutoDeleteBanner.test.tsx | import { render, screen } from '@testing-library/react';
import AutoDeleteBanner from './AutoDeleteBanner';
describe('AutoDeleteBanner', () => {
describe('when bannerType is paid', () => {
it('should render correct banner', () => {
render(<AutoDeleteBanner bannerType="paid-banner" />);
... |
3,544 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners/auto-delete/useAutoDeleteBanner.test.ts | import { renderHook } from '@testing-library/react-hooks';
import { MAILBOX_LABEL_IDS as IDS } from '@proton/shared/lib/constants';
import { mockUseFeature, mockUseMailSettings, mockUseUser } from '@proton/testing/index';
import { LABEL_IDS_TO_HUMAN as TO_HUMAN } from '../../../../constants';
import useAutoDeleteBann... |
3,550 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/banners/mail-upsell/MailUpsellBanner.test.tsx | import { screen } from '@testing-library/react';
import { removeItem, setItem } from '@proton/shared/lib/helpers/storage';
import range from '@proton/utils/range';
import { render } from '../../../../helpers/test/render';
import MailUpsellBanner from './MailUpsellBanner';
const props = {
columnMode: true,
ne... |
3,554 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/item-expiration/ItemExpiration.test.tsx | import { screen } from '@testing-library/react';
import { addDays, addHours, addMinutes, getUnixTime } from 'date-fns';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { MessageMetadata } from '@proton/shared/lib/interfaces/mail/Message';
import { AUTO_DELETE_SPAM_AND_TRASH_DAYS } from '@proto... |
3,559 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/snooze | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/snooze/components/SnoozeDurationSelection.test.tsx | import { render } from '@testing-library/react';
import { nextFriday, nextMonday, nextSaturday, nextSunday, nextThursday, nextTuesday, nextWednesday } from 'date-fns';
import { useUser, useUserSettings } from '@proton/components/hooks';
import { MAIL_APP_NAME } from '@proton/shared/lib/constants';
import { SETTINGS_WE... |
3,564 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/snooze | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/snooze/containers/SnoozeDropdown.test.tsx | import { fireEvent, render } from '@testing-library/react';
import { nextMonday } from 'date-fns';
import { useUser, useUserSettings } from '@proton/components/hooks';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import useSnooze from '../../../../hooks/actions/useSnooze';
import { useAppDispatch... |
3,568 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/list/spy-tracker/ItemSpyTrackerIcon.test.tsx | import { fireEvent, getByText, screen } from '@testing-library/react';
import { IMAGE_PROXY_FLAGS } from '@proton/shared/lib/mail/mailSettings';
import { MessageUTMTracker } from '@proton/shared/lib/models/mailUtmTrackers';
import { addToCache, minimalCache } from '../../../helpers/test/cache';
import { clearAll } fr... |
3,576 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/EncryptionStatusIcon.test.tsx | import { render, within } from '@testing-library/react';
import EncryptionStatusIcon from './EncryptionStatusIcon';
describe('EncryptionStatusIcon', () => {
describe('when loading is true', () => {
it('should render loader', () => {
const { getByTestId, getByText } = render(<EncryptionStatusIc... |
3,591 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraAskResign.test.tsx | import { fireEvent } from '@testing-library/react';
import { PublicKeyReference } from '@proton/crypto';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../helpers/test/crypto';
import { addApiMock, clearAll, generateKeys, render, tick } from '../../../helpers/test/helper';
import { contactEmail... |
3,597 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraErrors.test.tsx | import { render } from '../../../helpers/test/helper';
import { MessageErrors, MessageState } from '../../../logic/messages/messagesTypes';
import ExtraErrors from './ExtraErrors';
describe('Errors banner', () => {
const setup = async (errors: MessageErrors) => {
const message = { localID: 'localID', error... |
3,599 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraEvents.test.tsx | import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { useCalendarUserSettings } from '@proton/components/hooks/useCalendarUserSettings';
import { useGetVtimezonesMap } from '@proton/components/hooks/useGetVtimezonesMap';
import { getAppName } from '@pro... |
3,602 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraPinKey.test.tsx | import { Matcher, fireEvent } from '@testing-library/react';
import { PublicKeyReference } from '@proton/crypto';
import { Address, MailSettings } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { VERIFICATION_STATUS } from '@proton/shared/lib/mail/con... |
3,605 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraScheduledMessage.test.tsx | import { act, fireEvent } from '@testing-library/react';
import { addHours, addSeconds } from 'date-fns';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { addDays } from '@proton/shared/lib/date-fns-utc';
import { formatDateToHuman } from '../../../helpers/date';
import { addApiMock, clearAl... |
3,607 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraSnoozedMessage.test.tsx | import { act, fireEvent } from '@testing-library/react';
import { addHours } from 'date-fns';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { addDays } from '@proton/shared/lib/date-fns-utc';
import { formatDateToHuman } from '../../../helpers/date';
import { clearAll } from '../../../helpe... |
3,610 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/ExtraUnsubscribe.test.tsx | import { fireEvent, screen } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { openNewTab } from '@proton/shared/lib/helpers/browser';
import { mergeMessages } from '../../../helpers/message/messages';
import { addAddressToCache, minimalCache } from '../../../helpers/test/cache';
imp... |
3,613 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/calendar/EmailReminderWidget.test.tsx | import { BrowserRouter } from 'react-router-dom';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { mocked } from 'jest-mock';
import { FeaturesProvider, useAddresses, useUserSettings } from '@proton/components';
import AuthenticationProvider from '@proton/components/containers/aut... |
3,617 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/calendar/EventReminderText.test.tsx | import { render, screen } from '@testing-library/react';
import EventReminderText, { EventReminderTextProps } from './EventReminderText';
function renderComponent(props?: Partial<EventReminderTextProps>) {
const defaultProps = {
startDate: new Date(1969, 11, 31, 8, 9, 10),
endDate: new Date(1969, ... |
3,630 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/calendar/ExtraEventSummary.test.tsx | import { render, screen } from '@testing-library/react';
import { ICAL_ATTENDEE_STATUS, ICAL_EVENT_STATUS, ICAL_METHOD } from '@proton/shared/lib/calendar/constants';
import { Participant, VcalDateProperty, VcalVeventComponent } from '@proton/shared/lib/interfaces/calendar';
import { calendarEventBuilder, veventBuilde... |
3,639 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/extras/expiration/ExtraExpirationTime.test.tsx | import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { clearAll, render } from '../../../../helpers/test/helper';
import ExtraExpirationTime from './ExtraExpirationTime';
const getExpirationTime = (numberOfSeconds: number) => {
return new Date().getTime() / 1000 + numberOfSeconds;
};
desc... |
3,646 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/helpers/getIframeHtml.test.tsx | import { createDocument } from '../../../helpers/test/message';
import {
MESSAGE_IFRAME_PRINT_CLASS,
MESSAGE_IFRAME_PRINT_FOOTER_ID,
MESSAGE_IFRAME_PRINT_HEADER_ID,
} from '../constants';
import getIframeHtml from './getIframeHtml';
describe('getIframeHTML', () => {
describe('rich text', () => {
... |
3,655 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/modals/ContactResignModal.test.tsx | import { fireEvent, waitFor } from '@testing-library/react';
import { Address } from '@proton/shared/lib/interfaces';
import { ContactEmail } from '@proton/shared/lib/interfaces/contacts';
import { addApiMock } from '../../../helpers/test/api';
import { addToCache, minimalCache } from '../../../helpers/test/cache';
i... |
3,669 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/modals/TrustPublicKeyModal.test.tsx | import { fireEvent } from '@testing-library/react';
import { act } from '@testing-library/react';
import { PublicKeyReference } from '@proton/crypto';
import { wait } from '@proton/shared/lib/helpers/promise';
import { ContactWithBePinnedPublicKey } from '@proton/shared/lib/interfaces/contacts';
import { addApiMock }... |
3,682 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/recipients | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/recipients/tests/MailRecipientItemSingle.blockSender.test.tsx | import { act } from 'react-dom/test-utils';
import { fireEvent } from '@testing-library/react';
import { RenderResult, queryByTestId } from '@testing-library/react';
import { INCOMING_DEFAULTS_LOCATION, MIME_TYPES } from '@proton/shared/lib/constants';
import { IncomingDefault, MailSettings, Recipient } from '@proton... |
3,683 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/recipients | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/recipients/tests/MailRecipientItemSingle.test.tsx | import { Matcher, fireEvent } from '@testing-library/react';
import { Recipient } from '@proton/shared/lib/interfaces';
import { GeneratedKey, generateKeys } from '../../../../helpers/test/crypto';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { clearAll } fr... |
3,684 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.attachments.test.tsx | import { fireEvent, within } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import humanSize from '@proton/shared/lib/helpers/humanSize';
import { Attachment, Message } from '@proton/shared/lib/interfaces/mail/Message';
import { VERIFICATION_STATUS } from '@proton/shared/lib/... |
3,685 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.banners.test.tsx | import { waitFor } from '@testing-library/react';
import { setBit } from '@proton/shared/lib/helpers/bitset';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { addAddressToCache, minimalCache } from '../../../helpers/test/cache';
import { clearAll } from '../../../helpers/test/helper';
impor... |
3,686 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.content.test.tsx | import { fireEvent, screen } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { addApiKeys } from '../../../helpers/test/crypto';
import { initialize } from '../../../logic/messages/read/messagesReadA... |
3,687 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.dark.test.tsx | import { waitFor } from '@testing-library/react';
import { FeatureCode } from '@proton/components';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { addApiMock, clearAll, createDocument, minimalCache, setFeatureFlags } from '../../../helpers/test/helper';
import { MessageState } from '..... |
3,688 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.encryption.test.tsx | import { findByText } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Attachment, Message } from '@proton/shared/lib/interfaces/mail/Message';
import { parseInDiv } from '../../../helpers/dom';
import { constructMime } from '../../../helpers/send/sendMimeBuilder';
im... |
3,689 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.images.test.tsx | import { findByTestId, fireEvent } from '@testing-library/react';
import { mockWindowLocation, resetWindowLocation } from '@proton/components/helpers/url.test.helpers';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { IMAGE_PROXY_FLAGS, SHOW_IMAGES } from '@proton/shared/lib/mail/mailSett... |
3,690 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.modes.test.tsx | import { act } from '@testing-library/react';
import { addApiResolver, clearAll } from '../../../helpers/test/helper';
import { initMessage, messageID, setup } from './Message.test.helpers';
jest.setTimeout(20000);
describe('Message display modes', () => {
afterEach(clearAll);
it('loading mode', async () =>... |
3,691 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.recipients.test.tsx | import { ContactEmail, ContactGroup } from '@proton/shared/lib/interfaces/contacts';
import { clearAll } from '../../../helpers/test/helper';
import { refresh } from '../../../logic/contacts/contactsActions';
import { store } from '../../../logic/store';
import { initMessage, setup } from './Message.test.helpers';
de... |
3,692 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.state.test.tsx | import { findByText } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { addApiKeys, addApiMock, clearAll } from '../../../helpers/test/helper';
import { initialize } from '../../../logic/messages/rea... |
3,694 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/message/tests/Message.trackers.test.tsx | import { fireEvent, screen } from '@testing-library/react';
import { MailSettings } from '@proton/shared/lib/interfaces';
import { Attachment, Message } from '@proton/shared/lib/interfaces/mail/Message';
import { IMAGE_PROXY_FLAGS, SHOW_IMAGES } from '@proton/shared/lib/mail/mailSettings';
import { addApiMock } from '... |
3,707 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/sidebar/MailSidebar.test.tsx | import { act } from 'react-dom/test-utils';
import { fireEvent, getAllByText } from '@testing-library/react';
import { Location } from 'history';
import loudRejection from 'loud-rejection';
import { getAppVersion } from '@proton/components';
import useEventManager from '@proton/components/hooks/useEventManager';
impo... |
3,709 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/sidebar/MailSidebarDriveSpotlight.test.tsx | import { render, screen } from '@testing-library/react';
import { getUnixTime, subDays } from 'date-fns';
import * as spotlightModule from '@proton/components/components/spotlight/Spotlight';
import * as useDriveWindowsGASpotlightModule from '@proton/components/hooks/useDriveWindowsGASpotlight';
import * as useFeature... |
3,729 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/toolbar/MoreDropdown.test.tsx | import { fireEvent, render } from '@testing-library/react';
import useSnooze from '../../hooks/actions/useSnooze';
import { useLabelActions } from '../../hooks/useLabelActions';
import MoreDropdown from './MoreDropdown';
jest.mock('../../hooks/useLabelActions');
jest.mock('../../hooks/actions/useSnooze');
jest.mock('... |
3,731 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/toolbar/MoveButtons.test.tsx | import { screen } from '@testing-library/react';
import { LABEL_TYPE, MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { Label } from '@proton/shared/lib/interfaces';
import { addToCache, clearAll, minimalCache, render } from '../../helpers/test/helper';
import MoveButtons from './MoveButtons';
const ... |
3,748 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/view/EmptyListPlaceholder.test.tsx | import { screen } from '@testing-library/react';
import { CHECKLIST_DISPLAY_TYPE } from '@proton/shared/lib/interfaces';
import {
ContextState,
useGetStartedChecklist,
} from '../../containers/onboardingChecklist/provider/GetStartedChecklistProvider';
import { render } from '../../helpers/test/helper';
import... |
3,756 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/ComposerContainer.test.tsx | import { act } from '@testing-library/react';
import { getAppName } from '@proton/shared/lib/apps/helper';
import { APPS, MIME_TYPES } from '@proton/shared/lib/constants';
import { Recipient } from '@proton/shared/lib/interfaces';
import { FORWARDED_MESSAGE } from '@proton/shared/lib/mail/messages';
import { MESSAGE_... |
3,761 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/PageContainer.test.tsx | import { fireEvent } from '@testing-library/react';
import { getAppName } from '@proton/shared/lib/apps/helper';
import { APPS } from '@proton/shared/lib/constants';
import { SHORTCUTS } from '@proton/shared/lib/mail/mailSettings';
import {
addApiMock,
addToCache,
assertFocus,
clearAll,
minimalCac... |
3,773 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.elements.test.tsx | import { fireEvent } from '@testing-library/react';
import { queryConversations } from '@proton/shared/lib/api/conversations';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { ELEMENTS_CACHE_REQUEST_SIZE, PAGE_SIZE } from '../../../constants';
import { addApiMock, api, apiMocks, clearAll, g... |
3,774 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.events.test.tsx | import { act } from '@testing-library/react';
import { EVENT_ACTIONS } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { DEFAULT_PLACEHOLDERS_COUNT, PAGE_SIZE } from '../../../constants';
import { addApiResolver, addToCache, api, clearAll, render } fro... |
3,775 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.hotkeys.test.tsx | import { fireEvent } from '@testing-library/react';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { addApiMock, assertCheck, assertFocus, clearAll, getHistory, tick } from '../../../helpers/test/helper';
import MailboxCon... |
3,776 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.labels.test.tsx | import { Matcher, fireEvent } from '@testing-library/react';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { MailSettings } from '@proton/shared/lib/interfaces';
import { VIEW_MODE } from '@proton/shared/lib/mail/mailSettings';
import { addApiMock, clearAll, waitForSpyCall } from '../../../... |
3,777 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.perf.test.tsx | import { EVENT_ACTIONS } from '@proton/shared/lib/constants';
import { clearAll, getHistory } from '../../../helpers/test/helper';
import * as useStarModule from '../../../hooks/actions/useStar';
import { getElements, sendEvent, setup } from './Mailbox.test.helpers';
jest.spyOn(useStarModule, 'useStar');
// Spying u... |
3,778 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.retries.test.tsx | import { act, fireEvent } from '@testing-library/react';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { wait } from '@proton/shared/lib/helpers/promise';
import { PAGE_SIZE } from '../../../constants';
import { addApiMock, clearAll, tick } from '../../../helpers/test/helper';
import { expe... |
3,779 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/Mailbox.selection.test.tsx | import { fireEvent } from '@testing-library/react';
import { clearAll } from '../../../helpers/test/helper';
import { props, setup } from './Mailbox.test.helpers';
describe('Mailbox elements selection', () => {
const conversations = [
{ ID: '1', Labels: [{ ID: props.labelID }] },
{ ID: '2', Labels... |
3,781 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/mailbox/tests/MailboxContainerPlaceholder.test.tsx | import { screen } from '@testing-library/react';
import { CHECKLIST_DISPLAY_TYPE } from '@proton/shared/lib/interfaces';
import {
ContextState,
useGetStartedChecklist,
} from '../../../containers/onboardingChecklist/provider/GetStartedChecklistProvider';
import { render } from '../../../helpers/test/helper';
... |
3,782 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/onboardingChecklist | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/onboardingChecklist/hooks/useChecklist.test.ts | import { useUserSettings } from '@proton/components/hooks';
import { addApiMock, renderHook } from 'proton-mail/helpers/test/helper';
import useChecklist from './useChecklist';
const getChecklist = jest.fn(() => {
return {
Code: 10,
Items: [],
};
});
const paidChecklist = jest.fn(() => {
... |
3,785 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/onboardingChecklist | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/containers/onboardingChecklist/provider/GetStartedChecklistProvider.test.tsx | import useLoading from '@proton/hooks/useLoading';
import { CHECKLIST_DISPLAY_TYPE, ChecklistId, ChecklistKey } from '@proton/shared/lib/interfaces';
import { renderHook } from 'proton-mail/helpers/test/render';
import useChecklist from '../hooks/useChecklist';
import { useGetStartedChecklist } from './GetStartedChec... |
3,792 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/counter.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { LabelCount } from '@proton/shared/lib/interfaces/Label';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { getCountersByLabelId, updateCounters, updateCountersForMarkAs } from './counter';
describe('counters', () =... |
3,794 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/date.test.ts | import {
formatDateToHuman,
formatDistanceToNow,
formatFileNameDate,
formatFullDate,
formatScheduledTimeString,
formatSimpleDate,
} from './date';
describe('formatSimpleDate', () => {
afterEach(() => {
jest.useRealTimers();
});
it('should return today date correctly formatt... |
3,798 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/dom.test.ts | import { isElement, isHTMLEmpty, matches, parseInDiv } from './dom';
describe('isElement', () => {
it('should be an element', () => {
const el = document.createElement('p');
expect(isElement(el)).toBeTruthy();
});
it('should not be an element', () => {
const el = null;
ex... |
3,800 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/elements.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { MailSettings } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { Conversation, ConversationLabel } from '../models/conversation';
import { getCounterMap, getDate, isConversation... |
3,803 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/encryptionType.test.ts | import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { I18N, getEncryptionType, getFromType } from './encryptionType';
describe('getFromType', () => {
it('should be sent encrypted', () => {
const message = {
... |
3,804 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/errors.test.ts | import { ConversationErrors } from '../logic/conversations/conversationsTypes';
import { MessageErrors, MessageState } from '../logic/messages/messagesTypes';
import { hasError, hasErrorType, isDecryptionError, isNetworkError, pickMessageInfosForSentry } from './errors';
import { createDocument } from './test/message';... |
3,806 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/expiration.test.ts | import { add, addDays, differenceInMinutes, getUnixTime, sub } from 'date-fns';
import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { UserModel } from '@proton/shared/lib/interfaces';
import { MessageState } from '../logic/messages/messagesTypes';
import { canSetExpiration, getExpirationTime, get... |
3,808 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/labels.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { MessageWithOptionalBody } from '../logic/messages/messagesTypes';
import { Conversation } from '../models/conversation';
import {
applyLabelChangesOnConversation,
applyLabelChangesOnMessage,
applyLabelChangesOnOneMessageOfAConversat... |
3,810 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/mail.test.ts | import { combineHeaders, splitMail } from './mail';
describe('combineHeaders', () => {
it('should combine headers', async () => {
const baseHeader = `Return-Path: <address1@pm.me>
X-Original-To: address2@pm.me
Delivered-To: address1@pm.me
Content-Type: text/html
Date: Mon, 6 Feb 2023 16:47:37 +0100`;
... |
3,812 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/mailSettings.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { VIEW_MODE } from '@proton/shared/lib/mail/mailSettings';
import { isConversationMode } from './mailSettings';
describe('mailSettings', () => {
describe('isConversationMode', () => {
const emptyLocation = { pathname: '', search: '',... |
3,815 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/moveToFolder.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { Label, MailSettings } from '@proton/shared/lib/interfaces';
import { SPAM_ACTION } from '@proton/shared/lib/mail/mailSettings';
import { addApiMock, apiMock } from '@proton/testing/lib/api';
import {
askToUnsubscribe,
getNotificationTex... |
3,817 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/paging.test.ts | import { expectedPageLength, pageCount } from './paging';
describe('paging helper', () => {
describe('pageCount', () => {
it('should be 1 when total is less than size', () => {
expect(pageCount(10)).toBe(1);
});
it('should be the number of pages the user can see', () => {
... |
3,819 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/parserHtml.test.ts | import { toText } from './parserHtml';
describe('toText', () => {
it('should not escape single underline', () => {
const string = 'MONO_TLS_PROVIDER';
expect(toText(string)).toEqual(string);
});
it('should not escape multiple underlines', () => {
const string = '___';
expec... |
3,821 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/recipients.test.ts | import { Recipient } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { Conversation } from '../models/conversation';
import { getElementSenders } from './recipients';
describe('recipients helpers', () => {
const sender: Recipient = {
Addre... |
3,823 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/schedule.test.ts | import { getMinScheduleTime } from './schedule';
describe('getMinScheduleTime', () => {
afterEach(() => {
jest.useRealTimers();
});
it('should get the correct min scheduled time if selected date is not today', () => {
const fakeNow = new Date(2021, 0, 1, 9, 20, 0);
jest.useFakeTime... |
3,825 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/sidebar.test.ts | import { FolderWithSubFolders } from '@proton/shared/lib/interfaces/Folder';
import { UnreadCounts } from '../components/sidebar/MailSidebarList';
import { getUnreadCount } from './sidebar';
const EXPANDED = 1;
const COLLAPSED = 0;
describe('getUnreadCount', () => {
const counterMap = { A: 3, B: 1, C: 2, D: 0 } ... |
3,827 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/string.test.ts | import { extractChevrons, htmlEntities, replaceLineBreaks, toUnsignedString, ucFirst } from './string';
describe('toUnsignedString', () => {
it('should convert integer to unsigned string', () => {
const value = 1000;
const result = toUnsignedString(value, 1);
expect(result).not.toContain('... |
3,829 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/textToHtml.test.ts | import { MailSettings } from '@proton/shared/lib/interfaces';
import { textToHtml } from './textToHtml';
describe('textToHtml', () => {
it('should convert simple string from plain text to html', () => {
expect(textToHtml('This a simple string', '', undefined, undefined)).toEqual('This a simple string');
... |
3,832 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/url.test.ts | import { protonizer } from '@proton/shared/lib/sanitize';
import { removeLineBreaks } from './test/message';
import { mailtoParser, toAddresses } from './url';
const address1 = 'address1@pm.me';
const address2 = 'address2@pm.me';
const address3 = 'address3@pm.me';
const address4 = 'address4@pm.me';
const addressName... |
3,841 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment/test/attachmentConverter.test.ts | import { MIMEAttachment, WorkerDecryptionResult } from '@proton/crypto';
import { stringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { ATTACHMENT_DISPOSITION } from '@proton/shared/lib/mail/constants';
import { ENCRYPTED_STATUS ... |
3,842 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment/test/attachmentDownloader.test.ts | import { encodeBase64 } from '@proton/crypto/lib/utils';
import * as browser from '@proton/shared/lib/helpers/browser';
import * as downloadFile from '@proton/shared/lib/helpers/downloadFile';
import { stringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { Attachment } from '@proton/shared/lib/interf... |
3,843 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment/test/attachmentLoader.test.ts | import { encodeBase64 } from '@proton/crypto/lib/utils';
import { stringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { Attachment } from '@proton/shared/lib/interfaces/mail/Message';
import { MessageKeys, MessageVerification } from '../../../logic/messages/messagesTypes';
import { addApiMock, api ... |
3,844 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment/test/attachmentThumbnails.test.ts | import { MAILBOX_LABEL_IDS, MIME_TYPES } from '@proton/shared/lib/constants';
import { AttachmentsMetadata, Message } from '@proton/shared/lib/interfaces/mail/Message';
import {
canShowAttachmentThumbnails,
filterAttachmentToPreview,
getOtherAttachmentsTitle,
} from 'proton-mail/helpers/attachment/attachme... |
3,845 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/attachment/test/attachments.test.ts | import { Attachment } from '@proton/shared/lib/interfaces/mail/Message';
import { ATTACHMENT_DISPOSITION } from '@proton/shared/lib/mail/constants';
import { MessageState } from '../../../logic/messages/messagesTypes';
import { getPureAttachments, updateKeyPackets } from '../attachment';
describe('updateKeyPackets', ... |
3,847 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/calendar/invite.test.ts | import { generateAttendeeToken } from '@proton/shared/lib/calendar/attendees';
import { ICAL_ATTENDEE_RSVP, ICAL_ATTENDEE_STATUS, ICAL_METHOD } from '@proton/shared/lib/calendar/constants';
import { generateVeventHashUID } from '@proton/shared/lib/calendar/helper';
import {
EVENT_INVITATION_ERROR_TYPE,
EventInv... |
3,852 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/checklist/checkedItemsStorage.test.ts | import { deleteCheckedItemsForUser, getSavedCheckedItemsForUser, saveCheckedItemsForUser } from './checkedItemsStorage';
describe('checkedItemsStorage', () => {
it('Should save checked items', () => {
saveCheckedItemsForUser('testUserId', ['checkedAccount']);
const savedItems = getSavedCheckedItems... |
3,864 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/icon.test.ts | import { PublicKeyReference } from '@proton/crypto';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { KeyTransparencyActivation } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { SIGNATURE_START, VERIFICATION_STATUS } from '@proton/s... |
3,867 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageBlockquote.test.ts | import mails from './__fixtures__/messageBlockquote.fixtures';
import { locateBlockquote } from './messageBlockquote';
/**
* Creating a whole document each time is needed because locate blockquote is using xpath request
* which will fail if the content is not actually in the document
*/
const createDocument = (cont... |
3,869 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageContent.test.ts | import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Address, MailSettings, UserSettings } from '@proton/shared/lib/interfaces';
import { Attachment, Message } from '@proton/shared/lib/interfaces/mail/Message';
import { PM_SIGNATURE } from '@proton/shared/lib/mail/mailSettings';
import { data, fromField... |
3,873 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageDraft.test.ts | import { addPlusAlias } from '@proton/shared/lib/helpers/email';
import { Address, MailSettings, Recipient, UserSettings } from '@proton/shared/lib/interfaces';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { FORWARDED_MESSAGE, FW_PREFIX, RE_PREFIX, formatSubject } from '@proton/shared/lib/m... |
3,875 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageEmbeddeds.test.tsx | import { stringToUint8Array } from '@proton/shared/lib/helpers/encoding';
import { Attachment } from '@proton/shared/lib/interfaces/mail/Message';
import { MessageEmbeddedImage, MessageImage, PartialMessageState } from '../../logic/messages/messagesTypes';
import { createDocument } from '../test/message';
import {
... |
3,877 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageExpandable.test.ts | import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { MESSAGE_FLAGS } from '@proton/shared/lib/mail/constants';
import { findMessageToExpand } from './messageExpandable';
describe('messageExpandable', () => {
it('should ret... |
3,881 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageHead.test.ts | import mails from './__fixtures__/messageHead.fixtures';
import { locateHead } from './messageHead';
/**
* Creating a whole document each time is needed because locate blockquote is using xpath request
* which will fail if the content is not actually in the document
*/
const createDocument = (content: string) => {
... |
3,883 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/helpers/message/messageImages.test.ts | import { MessageImage, MessageImages, MessageState } from '../../logic/messages/messagesTypes';
import { createDocument } from '../test/message';
import { removeProxyURLAttributes, replaceProxyWithOriginalURLAttributes } from './messageImages';
const imageURL = 'imageURL';
const originalImageURL = 'originalImageURL';
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.