level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
1,820 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/swc | petrpan-code/web-infra-dev/modern.js/tests/integration/swc/tests/minify-js.test.ts | import path from 'path';
import { readdirSync, readFileSync } from 'fs';
import { modernBuild } from '../../../utils/modernTestUtils';
const fixtures = path.resolve(__dirname, '../fixtures');
const getJsFiles = (appDir: string) =>
readdirSync(path.resolve(appDir, 'dist/static/js')).filter(filepath =>
/\.js$/.te... |
1,821 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/swc | petrpan-code/web-infra-dev/modern.js/tests/integration/swc/tests/transform-fail.test.ts | import path from 'path';
import type { ChildProcess } from 'child_process';
import getPort from 'get-port';
import { runModernCommandDev } from '../../../utils/modernTestUtils';
const fixtures = path.resolve(__dirname, '../fixtures');
describe('swc transform failed minify', () => {
test('should not exit unexpectly ... |
1,848 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss/tests/tailwindcss-v2.test.ts | import path from 'path';
import { fixtures, launchAppWithPage } from './utils';
describe('use tailwindcss v2', () => {
test(`should show style by use tailwindcss text-black`, async () => {
const appDir = path.resolve(fixtures, 'tailwindcss-v2');
const { page, clear } = await launchAppWithPage(appDir);
c... |
1,849 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss/tests/tailwindcss-v3.test.ts | import path from 'path';
import { fixtures, launchAppWithPage } from './utils';
describe('use tailwindcss v3', () => {
test(`should show style by use tailwindcss text-black`, async () => {
const appDir = path.resolve(fixtures, 'tailwindcss-v3');
const { page, clear } = await launchAppWithPage(appDir);
c... |
1,851 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss/tests/twin.macro-v2.test.ts | import path from 'path';
import { fixtures, launchAppWithPage } from './utils';
describe('use twin.macro v2', () => {
test(`should show style by use tailwindcss theme when use twin.macro v2`, async () => {
const appDir = path.resolve(fixtures, 'twin.macro-v2');
const { page, clear } = await launchAppWithPage... |
1,852 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss | petrpan-code/web-infra-dev/modern.js/tests/integration/tailwindcss/tests/twin.macro-v3.test.ts | import path from 'path';
import { fixtures, launchAppWithPage } from './utils';
describe('use twin.macro v2', () => {
test(`should show style by use tailwindcss theme when use twin.macro v2`, async () => {
const appDir = path.resolve(fixtures, 'twin.macro-v3');
const { page, clear } = await launchAppWithPage... |
1,860 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/temp-dir | petrpan-code/web-infra-dev/modern.js/tests/integration/temp-dir/tests/index.test.ts | import fs from 'fs';
import path from 'path';
import { modernBuild } from '../../../utils/modernTestUtils';
const appDir = path.resolve(__dirname, '../');
function existsSync(filePath: string) {
return fs.existsSync(path.join(appDir, filePath));
}
describe('test temp-dir', () => {
let buildRes: { code: number };... |
1,866 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/testing-plugin | petrpan-code/web-infra-dev/modern.js/tests/integration/testing-plugin/tests/index.test.ts | import { DummyClass } from '../src';
describe('basic test', () => {
test('should compile legacy decorator correctly', () => {
expect(new DummyClass()).toEqual({});
});
});
|
1,874 | 0 | petrpan-code/web-infra-dev/modern.js/tests/integration/write-to-dist | petrpan-code/web-infra-dev/modern.js/tests/integration/write-to-dist/tests/index.test.ts | import path from 'path';
import fs from 'fs';
import puppeteer, { Browser, Page } from 'puppeteer';
import {
launchApp,
killApp,
getPort,
launchOptions,
} from '../../../utils/modernTestUtils';
const appDir = path.resolve(__dirname, '../');
function existsSync(filePath: string) {
return fs.existsSync(path.j... |
2,048 | 0 | petrpan-code/ProtonMail/WebClients/applications/account/src/app | petrpan-code/ProtonMail/WebClients/applications/account/src/app/public/LayoutFooter.test.tsx | import { render } from '@testing-library/react';
import LayoutFooter from './LayoutFooter';
describe('<LayoutFooter />', () => {
// NOTE: Don't remove this test. Often forget the old-link class, let's make sure it's always there.
it('adds the old-link class', () => {
const { getByText } = render(<Layo... |
2,072 | 0 | petrpan-code/ProtonMail/WebClients/applications/account/src/app | petrpan-code/ProtonMail/WebClients/applications/account/src/app/signup/AccountStep.test.tsx | import { MemoryRouter } from 'react-router-dom';
import { render } from '@testing-library/react';
import { CLIENT_TYPES, SSO_PATHS } from '@proton/shared/lib/constants';
import { applyHOCs, withConfig } from '@proton/testing/index';
import AccountStep, { AccountStepProps } from './AccountStep';
import { SignupType }... |
2,078 | 0 | petrpan-code/ProtonMail/WebClients/applications/account/src/app | petrpan-code/ProtonMail/WebClients/applications/account/src/app/signup/PaymentStep.test.tsx | import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { PAYMENT_TOKEN_STATUS, PaymentMethodStatus } from '@proton/components/payments/core';
import { queryPaymentMethodStatus } from '@proton/shared/lib/api/payments';
import { CYCLE, PLANS, PLAN_TYPES } from '@prot... |
2,091 | 0 | petrpan-code/ProtonMail/WebClients/applications/account/src/app | petrpan-code/ProtonMail/WebClients/applications/account/src/app/signup/searchParams.test.ts | import { SERVICES } from './interfaces';
import { getProductParams } from './searchParams';
describe('search params helper', () => {
const values = [
{
params: 'product=mail',
pathname: '/signup',
expectation: { product: SERVICES.mail, productParam: SERVICES.mail },
... |
2,119 | 0 | petrpan-code/ProtonMail/WebClients/applications/account/src/app | petrpan-code/ProtonMail/WebClients/applications/account/src/app/single-signup-v2/PlanCardSelector.test.tsx | import { render } from '@testing-library/react';
import { CYCLE, PLANS } from '@proton/shared/lib/constants';
import { PlansMap } from '@proton/shared/lib/interfaces';
import { PlanCard, PlanCardSelector } from './PlanCardSelector';
const onSelect = jest.fn();
beforeEach(() => {
jest.clearAllMocks();
});
const... |
2,550 | 0 | petrpan-code/ProtonMail/WebClients/applications/calendar/src/app | petrpan-code/ProtonMail/WebClients/applications/calendar/src/app/helpers/attendees.test.ts | import { SimpleMap } from '@proton/shared/lib/interfaces';
import { ContactEmail } from '@proton/shared/lib/interfaces/contacts';
import { DisplayNameEmail } from '../containers/calendar/interface';
import { getOrganizerDisplayData } from './attendees';
const generateDummyContactEmail = ({
email,
name,
co... |
2,554 | 0 | petrpan-code/ProtonMail/WebClients/applications/calendar/src/app | petrpan-code/ProtonMail/WebClients/applications/calendar/src/app/helpers/event.test.ts | import { MAX_ATTENDEES } from '@proton/shared/lib/calendar/constants';
import { ADDRESS_SEND } from '@proton/shared/lib/constants';
import { addressBuilder } from '@proton/testing/lib/builders';
import {
getCanChangeCalendarOfEvent,
getCanDeleteEvent,
getCanDuplicateEvent,
getCanEditEvent,
getCanEd... |
2,716 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/FileBrowser | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/FileBrowser/hooks/useSelectionControls.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { SelectionState, useSelectionControls } from './useSelectionControls';
const ALL_IDS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
describe('useSelection', () => {
let hook: {
current: ReturnType<typeof useSelectionControls>... |
2,859 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/revisions/getCategorizedRevisions.test.ts | import { DriveFileRevision } from '../../store';
import { getCategorizedRevisions } from './getCategorizedRevisions';
describe('getCategorizedRevisions', () => {
beforeEach(() => {
jest.useFakeTimers().setSystemTime(new Date('2023-03-17T20:00:00'));
});
afterEach(() => {
jest.useRealTimers... |
2,936 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/sections/Photos | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/sections/Photos/grid/formatVideoDuration.test.ts | import { formatVideoDuration } from './formatVideoDuration';
jest.mock('@proton/shared/lib/i18n', () => ({
dateLocale: {
code: 'en-US',
formatLong: {
time: jest.fn(),
},
},
}));
describe('formatVideoDuration()', () => {
it('format a duration without hours', () => {
... |
2,940 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/sections/Photos | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/components/sections/Photos/hooks/usePhotosSelection.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { isPhotoGroup } from '../../../../store/_photos';
import type { PhotoGroup } from '../../../../store/_photos/interface';
import { getGroupLinkIds, usePhotosSelection } from './usePhotosSelection';
const groups: Record<PhotoGroup, string[]> = {
... |
3,004 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/hooks/drive/useDesktopDownloads.test.tsx | import { expect, jest } from '@jest/globals';
import { renderHook } from '@testing-library/react-hooks';
import { fetchDesktopVersion } from '@proton/shared/lib/apps/desktopVersions';
import { appPlatforms } from '../../utils/appPlatforms';
import useDesktopDownloads from './useDesktopDownloads';
jest.mock('@proton/... |
3,032 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_devices/useDevicesListing.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { sendErrorReport } from '../../utils/errorHandling';
import { VolumesStateProvider } from '../_volumes/useVolumesState';
import { Device } from './interface';
import { useDevicesListingProvider } from './useDevicesListing';
const SHARE_ID_0 = 'sh... |
3,044 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadControl.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { FILE_CHUNK_SIZE, SupportedMimeTypes } from '@proton/shared/lib/drive/constants';
import { TransferState } from '../../../components/TransferManager/transfer';
import { LinkDownload } from '../interface';
import { Download } from './interface';
i... |
3,047 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/DownloadProvider/useDownloadQueue.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { TransferState } from '../../../components/TransferManager/transfer';
import { LinkDownload } from '../interface';
import { Download, UpdateCallback, UpdateData, UpdateFilter, UpdateState } from './interface';
import useDownloadQueue from './useDo... |
3,050 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/archiveGenerator.test.ts | import { fromUnixTime } from 'date-fns';
import { ReadableStream } from 'web-streams-polyfill';
import { asyncGeneratorToArray } from '../../../utils/test/generator';
import ArchiveGenerator from './archiveGenerator';
type TestLink = {
isFile: boolean;
name: string;
fileModifyTime?: number;
path?: str... |
3,052 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/concurrentIterator.test.ts | import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants';
import { wait } from '@proton/shared/lib/helpers/promise';
import { asyncGeneratorToArray } from '../../../utils/test/generator';
import { MAX_DOWNLOADING_BLOCKS_LOAD, MAX_DOWNLOADING_FILES_LOAD } from '../constants';
import { DownloadCallbacks } fr... |
3,057 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadBlocks.test.ts | import { ReadableStream } from 'web-streams-polyfill';
import { createApiError, createOfflineError } from '@proton/shared/lib/fetch/ApiError';
import { DriveFileBlock } from '@proton/shared/lib/interfaces/drive/file';
import mergeUint8Arrays from '@proton/utils/mergeUint8Arrays';
import { TransferCancel } from '../..... |
3,060 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_downloads/download/downloadLinkFolder.test.ts | import { ChildrenLinkMeta, LinkDownload } from '../interface';
import { FolderTreeLoader } from './downloadLinkFolder';
type Tree = {
[linkId: string]: Tree | number;
};
/**
* Key is linkId and name.
* Value is either
* - object representing folder's children,
* - or number representing file's size.
*/
con... |
3,070 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_events/useDriveEventManager.test.ts | import { act } from 'react-dom/test-utils';
import { RenderResult, renderHook } from '@testing-library/react-hooks';
import { EVENT_TYPES } from '@proton/shared/lib/drive/constants';
import createEventManager, { EventManager } from '@proton/shared/lib/eventManager/eventManager';
import { Api } from '@proton/shared/li... |
3,072 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/extendedAttributes.test.ts | import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants';
import { mockGlobalFile, testFile } from '../../utils/test/file';
import {
ExtendedAttributes,
ParsedExtendedAttributes,
XAttrCreateParams,
createFileExtendedAttributes,
createFolderExtendedAttributes,
parseExtendedAttributes... |
3,076 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/link.test.ts | import { adjustName, splitLinkName } from './link';
describe('adjustName', () => {
it('should add index to a file with extension', () => {
expect(adjustName(3, 'filename', 'ext')).toBe('filename (3).ext');
});
it('should add index to a file without extension', () => {
expect(adjustName(3, ... |
3,078 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLink.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants';
import { decryptSigned } from '@proton/shared/lib/keys/driveKeys';
import { decryptPassphrase } from '@proton/shared/lib/keys/drivePassphrase';
import { ShareType } from '../_shares';
im... |
3,082 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksActions.test.tsx | import { renderHook } from '@testing-library/react-hooks';
import { RESPONSE_CODE } from '@proton/shared/lib/drive/constants';
import isTruthy from '@proton/utils/isTruthy';
import { VolumesStateProvider } from '../_volumes/useVolumesState';
import { useLinksActions } from './useLinksActions';
jest.mock('@proton/com... |
3,084 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksKeys.test.tsx | import { LinksKeys } from './useLinksKeys';
describe('useLinksKeys', () => {
let keys: LinksKeys;
beforeEach(() => {
keys = new LinksKeys();
});
it('returns empty passphrase when not set', () => {
keys.setPassphrase('shareId', 'linkId', 'pass');
expect(keys.getPassphrase('shar... |
3,086 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksQueue.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { useLinksQueue } from './useLinksQueue';
const mockedLoadLinksMeta = jest.fn();
jest.mock('./useLinksListing', () => ({
useLinksListing: () => ({
loadLinksMeta: mockedLoadLinksMeta,
}),
}));
const mockedGetLink = jest.fn();
jest.... |
3,088 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksState.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { EVENT_TYPES } from '@proton/shared/lib/drive/constants';
import { DriveEvents } from '../_events';
import { DecryptedLink, EncryptedLink, LinkShareUrl } from './interface';
import {
Link,
LinksState,
addOrUpdate,
deleteLinks,
... |
3,093 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListing.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { SORT_DIRECTION } from '@proton/shared/lib/constants';
import { VolumesStateProvider } from '../../_volumes/useVolumesState';
import { EncryptedLink } from '../interface';
import { LinksStateProvider } from '../useLinksState';
import { useLinksLi... |
3,095 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useLinksListingGetter.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { wait } from '@proton/shared/lib/helpers/promise';
import { VolumesStateProvider } from '../../_volumes/useVolumesState';
import { EncryptedLink } from '../interface';
import { useLinksListingProvider } from './useLinksListing';
jest.mock('../..... |
3,098 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useSharedLinksListing.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { VolumesStateProvider } from '../../_volumes/useVolumesState';
import { LinksStateProvider } from '../useLinksState';
import { PAGE_SIZE } from './useLinksListingHelpers';
import { useSharedLinksListing } from './useSharedLinksListing';
jest.mock... |
3,100 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_links/useLinksListing/useTrashedLinksListing.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { VolumesStateProvider } from '../../_volumes/useVolumesState';
import { LinksStateProvider } from '../useLinksState';
import { PAGE_SIZE } from './useLinksListingHelpers';
import { useTrashedLinksListing } from './useTrashedLinksListing';
jest.mo... |
3,107 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos/usePhotosRecovery.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { SupportedMimeTypes } from '@proton/shared/lib/drive/constants';
import { getItem, removeItem, setItem } from '@proton/shared/lib/helpers/storage';
import { DecryptedLink, useLinksActions, useLinksListing } from '../_links';
import useSharesState... |
3,109 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos/utils/convertSubjectAreaToSubjectCoordinates.test.ts | import { convertSubjectAreaToSubjectCoordinates } from './convertSubjectAreaToSubjectCoordinates';
describe('convertSubjectAreaToSubjectCoordinates()', () => {
it("should correctly convert exif's SubjectArea with X,Y to SubjectCoordinates", () => {
const subjectArea = [232, 643];
expect(convertSubj... |
3,112 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos/utils/formatExifDateTime.test.ts | import { formatExifDateTime } from './formatExifDateTime';
describe('formatExifDateTime()', () => {
it("should correctly format exif's DateTime to standard Date format", () => {
const exifDateTime = '2023:07:21 22:12:01';
expect(formatExifDateTime(exifDateTime)).toEqual('2023-07-21 22:12:01');
... |
3,116 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_photos/utils/sortWithCategories.test.ts | import { fromUnixTime, getUnixTime } from 'date-fns';
import { PhotoLink } from '../interface';
import { sortWithCategories } from './sortWithCategories';
jest.mock('@proton/shared/lib/i18n', () => ({
dateLocale: {
code: 'en-US',
formatLong: {
time: jest.fn(),
},
},
}));
de... |
3,120 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_revisions/useRevisions.test.ts | import { renderHook } from '@testing-library/react-hooks';
import { VERIFICATION_STATUS } from '@proton/crypto';
import { getIsConnectionIssue } from '@proton/shared/lib/api/helpers/apiErrorHelper';
import { sendErrorReport } from '../../utils/errorHandling';
import { useDriveCrypto } from '../_crypto';
import { useD... |
3,137 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_search | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_search/indexing/useKeysCache.test.ts | import { CryptoApiInterface, CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { LinkType } from '@proton/shared/lib/interfaces/drive/link';
import { KeyCache, createKeysCache } from './useKeysCache';
const linkMock = {
CreateTime: 123456,
Hash: '',
Index: 0,
LinkID: 'link-mock-id',
... |
3,140 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_settings/sorting.test.ts | import { SORT_DIRECTION } from '@proton/shared/lib/constants';
import { SortField } from '../_views/utils/useSorting';
import * as sorting from './sorting';
describe('sorting', () => {
it('should return SortSetting identifier given SortParams', () => {
expect(sorting.getSetting({ sortField: SortField.name... |
3,145 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/shareUrl.test.ts | import { SharedURLFlags } from '@proton/shared/lib/interfaces/drive/sharing';
import { hasCustomPassword, hasGeneratedPasswordIncluded, splitGeneratedAndCustomPassword } from './shareUrl';
describe('Password flags checks', () => {
describe('Missing data check', () => {
it('returns false if flags are undef... |
3,149 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/useDefaultShare.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { VolumesStateProvider } from '../_volumes/useVolumesState';
import useDefaultShare from './useDefaultShare';
const mockRequest = jest.fn();
const mockCreateVolume = jest.fn();
const mockGetDefaultShareId = jest.fn();
const mockGetShare = jest.fn(... |
3,155 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/useSharesKeys.test.tsx | import { SharesKeysStorage } from './useSharesKeys';
describe('useSharesKeys', () => {
let keys: SharesKeysStorage;
beforeEach(() => {
keys = new SharesKeysStorage();
});
it('returns empty passphrase when not set', () => {
// @ts-ignore: We simplify types in tests, so we don't have to... |
3,157 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/useSharesState.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { Share, ShareState, ShareType } from './interface';
import { useSharesStateProvider } from './useSharesState';
function createTestShare(
shareId: string,
volumeId: string,
flags = {
isLocked: false,
isDefault: false,
... |
3,161 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/useLockedVolume/useLockedVolume.test.tsx | import { act, renderHook } from '@testing-library/react-hooks';
import { User } from '@proton/shared/lib/interfaces';
import { getDecryptedUserKeysHelper } from '@proton/shared/lib/keys';
import { getUserKey } from '@proton/shared/test/keys/keyDataHelper';
import { generateAddress, releaseCryptoProxy, setupCryptoProx... |
3,163 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_shares/useLockedVolume/utils.test.ts | import { DecryptedKey, User } from '@proton/shared/lib/interfaces';
import { getDecryptedUserKeysHelper } from '@proton/shared/lib/keys';
import { getUserKey } from '@proton/shared/test/keys/keyDataHelper';
import { generateAddress, releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../utils/test/crypto';
im... |
3,181 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadConflict.test.tsx | import { ReactNode } from 'react';
import { act, renderHook } from '@testing-library/react-hooks';
import { ModalsProvider } from '@proton/components';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { TransferC... |
3,183 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadControl.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { MAX_BLOCKS_PER_UPLOAD } from... |
3,188 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadQueue.add.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { UploadFileList } from '../interface';
import { FileUpload, FolderUpload, UploadQueue } from './inte... |
3,189 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadQueue.attributes.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { UploadFileList } from '../interface';
import { FileUpload, FolderUpload } from './interface';
impor... |
3,190 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadQueue.remove.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { UploadFileList } from '../interface';
import { FileUpload, FolderUpload, UpdateCallback, UpdateFilter } from './interface';
import useUploadQueue from './useUploadQueue';
descr... |
3,192 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/UploadProvider/useUploadQueue.update.test.ts | import { act, renderHook } from '@testing-library/react-hooks';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { UploadFileList } from '../interface';
import { FileUpload, FolderUpload, UpdateCallback, UpdateData... |
3,194 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/media/getMediaInfo.test.ts | import { getMediaInfo } from './getMediaInfo';
describe('makeThumbnail', () => {
it('does nothing when mime type is not supported', async () => {
await expect(getMediaInfo(new Promise((resolve) => resolve('png')), new Blob(), true)).resolves.toEqual(
undefined
);
await expect(
... |
3,196 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/media/image.test.ts | import { SupportedMimeTypes, THUMBNAIL_MAX_SIZE } from '@proton/shared/lib/drive/constants';
import { scaleImageFile } from './image';
import { ThumbnailType } from './interface';
describe('scaleImageFile', () => {
beforeEach(() => {
global.URL.createObjectURL = jest.fn(() => 'url');
// Image unde... |
3,201 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/media/util.test.ts | import { THUMBNAIL_MAX_SIDE } from '@proton/shared/lib/drive/constants';
import { calculateThumbnailSize } from './util';
describe('calculateThumbnailSize', () => {
it('keeps smaller images as is', () => {
expect(calculateThumbnailSize({ width: 200, height: 200 })).toEqual([200, 200]);
});
it('re... |
3,206 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/worker/buffer.test.ts | import noop from '@proton/utils/noop';
import { MAX_ENCRYPTED_BLOCKS, MAX_UPLOADING_BLOCKS, MAX_UPLOAD_JOBS } from '../constants';
import { EncryptedBlock } from '../interface';
import { ThumbnailType } from '../media';
import UploadWorkerBuffer from './buffer';
import {
createBlock,
createLink,
createThum... |
3,208 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/worker/encryption.test.ts | import { CryptoProxy } from '@proton/crypto';
import { FILE_CHUNK_SIZE } from '@proton/shared/lib/drive/constants';
import noop from '@proton/utils/noop';
import {
generatePrivateKey,
generateSessionKey,
releaseCryptoProxy,
setupCryptoProxyForTesting,
} from '../../../utils/test/crypto';
import { async... |
3,213 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/worker/upload.test.ts | import { MAX_RETRIES_BEFORE_FAIL } from '../constants';
import { UploadingBlockControl } from './interface';
import { Pauser } from './pauser';
import { createUploadingBlockControl } from './testHelpers';
import startUploadJobs, { XHRError } from './upload';
describe('upload jobs', () => {
const mockUploadBlockFin... |
3,215 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_uploads/worker/verifier.test.ts | import { CryptoProxy } from '@proton/crypto';
import { generateSessionKey, releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../utils/test/crypto';
import { createVerifier } from './verifier';
jest.setTimeout(20000);
describe('verifier implementation', () => {
beforeAll(async () => {
await set... |
3,220 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_utils/useDebouncedFunction.test.tsx | import * as React from 'react';
import { renderHook } from '@testing-library/react-hooks';
import { CacheProvider } from '@proton/components';
import createCache from '@proton/shared/lib/helpers/cache';
import useDebouncedFunction from './useDebouncedFunction';
describe('useDebouncedFunction', () => {
let debou... |
3,242 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_views | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_views/utils/objectId.test.ts | import { getArrayIdNoMatterTheOrder, getObjectId } from './objectId';
describe('objectsId', () => {
const object1 = { a: 1 };
const object2 = { a: 1 };
const object3 = { a: 1 };
const array12 = [object1, object2];
const array13 = [object1, object3];
const array21 = [object2, object1];
it('... |
3,251 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/store/_volumes/useVolumesState.test.tsx | import { RenderResult, renderHook } from '@testing-library/react-hooks';
import { useVolumesStateProvider } from './useVolumesState';
const VOLUME_ID_1 = 'volumeId-1';
const VOLUME_ID_2 = 'volumeId-2';
describe('useDriveEventManager', () => {
let hook: RenderResult<ReturnType<typeof useVolumesStateProvider>>;
... |
3,253 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/utils/appPlatforms.test.ts | import { fetchDesktopVersion } from '@proton/shared/lib/apps/desktopVersions';
import { DESKTOP_PLATFORMS } from '@proton/shared/lib/constants';
import { isMac, isWindows } from '@proton/shared/lib/helpers/browser';
import { appPlatforms, fetchDesktopDownloads } from './appPlatforms';
jest.mock('@proton/shared/lib/ap... |
3,257 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/utils/formatters.test.ts | import { COUNT_PLACEHOLDER, formatAccessCount } from './formatters';
describe('Formatters', () => {
describe('formatAccessCount()', () => {
it('should return `...` if input value it undefined', () => {
expect(formatAccessCount(undefined)).toBe(COUNT_PLACEHOLDER);
});
it('should ... |
3,260 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/utils/retryOnError.test.ts | import retryOnError from './retryOnError';
const errorMessage = 'STRI-I-I-I-I-I-ING';
describe('retryOnError', () => {
let throwingFunction: () => Promise<void>;
let throwingFunction2: () => Promise<void>;
beforeEach(() => {
throwingFunction = jest.fn().mockImplementation(() => {
thro... |
3,264 | 0 | petrpan-code/ProtonMail/WebClients/applications/drive/src/app | petrpan-code/ProtonMail/WebClients/applications/drive/src/app/utils/transfer.test.ts | import { ProgressBarStatus } from '../components/TransferManager/ProgressBar';
import { Transfer, TransferState, TransfersStats } from '../components/TransferManager/transfer';
import {
calculateProgress,
getProgressBarStatus,
isTransferActive,
isTransferCancelError,
isTransferCanceled,
isTransf... |
3,342 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/attachment/AttachmentList.test.tsx | import { Attachment, Message } from '@proton/shared/lib/interfaces/mail/Message';
import { clearAll, createEmbeddedImage, createMessageImages, render } from '../../helpers/test/helper';
import AttachmentList, { AttachmentAction } from './AttachmentList';
const localID = 'localID';
const cid = 'cid';
const normalAttac... |
3,348 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/checklist/UsersOnboardingChecklist.test.tsx | import { fireEvent } from '@testing-library/react';
import { CHECKLIST_DISPLAY_TYPE } from '@proton/shared/lib/interfaces';
import {
ContextState,
useGetStartedChecklist,
} from 'proton-mail/containers/onboardingChecklist/provider/GetStartedChecklistProvider';
import { minimalCache, render } from 'proton-mail... |
3,351 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/checklist | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/checklist/modals/AccountsLoginModal.test.tsx | import { useUserSettings } from '@proton/components/hooks';
import { render } from 'proton-mail/helpers/test/render';
import AccountsLoginModal from './AccountsLoginModal';
import { getOnlineAccounts } from './OnlineAccounts';
jest.mock('@proton/components/hooks/useUserSettings');
const mockedUserSettings = useUserS... |
3,379 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/addresses/Addresses.test.tsx | import { MutableRefObject } from 'react';
import { fireEvent, getAllByRole, screen } from '@testing-library/react';
import { act, getByText } from '@testing-library/react';
import { pick } from '@proton/shared/lib/helpers/object';
import { Recipient } from '@proton/shared/lib/interfaces';
import { ContactEmail } from... |
3,383 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/addresses/AddressesEditor.test.tsx | import { MutableRefObject } from 'react';
import { fireEvent, screen } from '@testing-library/react';
import { getByText } from '@testing-library/react';
import { pick } from '@proton/shared/lib/helpers/object';
import { Recipient } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/int... |
3,389 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/addresses/AddressesSummary.test.tsx | import { screen } from '@testing-library/react';
import { ContactGroup } from '@proton/shared/lib/interfaces/contacts';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import noop from '@proton/utils/noop';
import { getRecipientLabel } from '../../../helpers/message/messageRecipients';
import { ... |
3,421 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/quickReply | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/quickReply/tests/QuickReply.compose.test.tsx | import {
GeneratedKey,
clearAll,
generateKeys,
releaseCryptoProxy,
removeLineBreaks,
setFeatureFlags,
setupCryptoProxyForTesting,
} from '../../../../helpers/test/helper';
import { messageID } from '../../../message/tests/Message.test.helpers';
import { data, fromFields, recipients } from '.... |
3,422 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/quickReply | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/quickReply/tests/QuickReply.replyType.test.tsx | import { MESSAGE_ACTIONS } from '../../../../constants';
import {
GeneratedKey,
clearAll,
generateKeys,
releaseCryptoProxy,
setFeatureFlags,
setupCryptoProxyForTesting,
} from '../../../../helpers/test/helper';
import { messageID } from '../../../message/tests/Message.test.helpers';
import { dat... |
3,425 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.attachments.test.tsx | import { fireEvent, getByTitle, waitFor } from '@testing-library/react';
import { act } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Address, Key } from '@proton/shared/lib/interfaces';
import { arrayToBase64 } from '../... |
3,426 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.autosave.test.tsx | import { fireEvent, getByTestId, waitFor } from '@testing-library/react';
import { act } from '@testing-library/react';
import { ROOSTER_EDITOR_ID } from '@proton/components/components/editor/constants';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import noop from '@proton/utils/noop';
import { release... |
3,427 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.expiration.test.tsx | import { fireEvent } from '@testing-library/react';
import { act, getByTestId as getByTestIdDefault, getByText as getByTextDefault } from '@testing-library/react';
import { format } from 'date-fns';
import loudRejection from 'loud-rejection';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { addDays ... |
3,428 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.hotkeys.test.tsx | import { fireEvent } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { SHORTCUTS } from '@proton/shared/lib/mail/mailSettings';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../helpers/test/crypto';
import {
GeneratedKey,
addApiKeys,
... |
3,429 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.outsideEncryption.test.tsx | import { fireEvent, getByTestId as getByTestIdDefault } from '@testing-library/react';
import { act } from '@testing-library/react';
import { addHours } from 'date-fns';
import loudRejection from 'loud-rejection';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { releaseCryptoProxy, setupCryptoProxy... |
3,430 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.plaintext.test.tsx | import { fireEvent } from '@testing-library/react';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { clearAll, createDocument, waitForSpyCall } from '../../../helpers/test/helper';
import { render } from '../../../helpers/test/render';
import * as useSaveDraft from '../../../hooks/message/useSaveDr... |
3,431 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.reply.test.tsx | import { fireEvent } from '@testing-library/react';
import { act } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { MailSettings } from '@proton/shared/lib/interfaces';
import {
GeneratedKey,
addApiKeys,
addKeysT... |
3,432 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.schedule.test.tsx | import {
act,
fireEvent,
getByTestId as getByTestIdDefault,
getByText as getByTextDefault,
screen,
waitFor,
} from '@testing-library/react';
import { format, getUnixTime } from 'date-fns';
import { enUS } from 'date-fns/locale';
import loudRejection from 'loud-rejection';
import { MAILBOX_LABEL... |
3,433 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.sending.test.tsx | import { fireEvent, getByTestId } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { ROOSTER_EDITOR_ID } from '@proton/components/components/editor/constants';
import { WorkerDecryptionResult } from '@proton/crypto/lib';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import... |
3,435 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/composer/tests/Composer.verifySender.test.tsx | import { getByText as getByTextDefault } from '@testing-library/react';
import loudRejection from 'loud-rejection';
import { MIME_TYPES } from '@proton/shared/lib/constants';
import { Address, Recipient } from '@proton/shared/lib/interfaces';
import { addToCache, minimalCache } from '../../../helpers/test/cache';
imp... |
3,438 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/conversation/ConversationView.test.tsx | import { fireEvent, waitFor } from '@testing-library/react';
import { act } from '@testing-library/react';
import { wait } from '@proton/shared/lib/helpers/promise';
import { MailSettings } from '@proton/shared/lib/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import range from '@p... |
3,450 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown/tests/CustomFilterDropdown.test.tsx | import { fireEvent } from '@testing-library/react';
import { act } from '@testing-library/react';
import { ConditionType } from '@proton/components/containers/filters/interfaces';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { render, tick } from '../../../helpers/test/render';
import ... |
3,451 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown/tests/LabelDropdown.test.tsx | import { fireEvent } from '@testing-library/react';
import { act, getByTestId as getByTestIdDefault, screen } from '@testing-library/react';
import { ACCENT_COLORS } from '@proton/shared/lib/colors';
import { LABEL_TYPE, MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { wait } from '@proton/shared/lib/... |
3,452 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/dropdown/tests/MoveDropdownd.test.tsx | import { act, fireEvent, getByTestId as getByTestIdDefault, screen } from '@testing-library/react';
import { ACCENT_COLORS } from '@proton/shared/lib/colors';
import { LABEL_TYPE, MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants';
import { wait } from '@proton/shared/lib/helpers/promise';
import { Label } from '... |
3,453 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/EORedirect.test.tsx | import { EOGetHistory, EORender } from '../../helpers/test/eo/EORender';
import { EOClearAll } from '../../helpers/test/eo/helpers';
import { MessageState } from '../../logic/messages/messagesTypes';
import EORedirect from './EORedirect';
describe('Encrypted Outside Redirection', () => {
afterEach(EOClearAll);
... |
3,455 | 0 | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo | petrpan-code/ProtonMail/WebClients/applications/mail/src/app/components/eo/message/EOExpirationTime.test.tsx | import { add, addHours, addMinutes, addSeconds, getUnixTime } from 'date-fns';
import { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { clearAll, render, tick } from '../../../helpers/test/helper';
import EOExpirationTime from './EOExpirationTime';
describe('EOExpirationTime', () => {
const... |
3,464 | 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.attachments.test.tsx | import { fireEvent, waitFor, within } from '@testing-library/react';
import humanSize from '@proton/shared/lib/helpers/humanSize';
import { VERIFICATION_STATUS } from '@proton/shared/lib/mail/constants';
import { assertIcon } from '../../../../helpers/test/assertion';
import { releaseCryptoProxy, setupCryptoProxyForT... |
3,465 | 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.banners.test.tsx | import { screen, waitFor } from '@testing-library/react';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOClearAll } from '../../../../helpers/test/eo/helpers';
import { setup } from './ViewEOMessage.test.helpers';
describe('Encrypted Outside message banner... |
3,466 | 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.encryption.test.tsx | import { findByText, waitFor } from '@testing-library/react';
import { releaseCryptoProxy, setupCryptoProxyForTesting } from '../../../../helpers/test/crypto';
import { EOBody, EOClearAll, EOSubject } from '../../../../helpers/test/eo/helpers';
import { getIframeRootDiv } from '../../../message/tests/Message.test.help... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.