Export/import attachments in integration tests

This commit is contained in:
Fedor Indutny 2024-10-11 12:14:28 -07:00 committed by GitHub
parent d42df4b201
commit 9ff6c75eb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 292 additions and 116 deletions

View file

@ -5,6 +5,7 @@ import React from 'react';
import type { Meta, StoryFn } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { setupI18n } from '../../util/setupI18n';
import { InstallScreenBackupStep } from '../../types/InstallScreen';
import enMessages from '../../../_locales/en/messages.json';
import type { PropsType } from './InstallScreenBackupImportStep';
import { InstallScreenBackupImportStep } from './InstallScreenBackupImportStep';
@ -27,25 +28,36 @@ const Template: StoryFn<PropsType> = (args: PropsType) => (
export const NoBytes = Template.bind({});
NoBytes.args = {
backupStep: InstallScreenBackupStep.Download,
currentBytes: undefined,
totalBytes: undefined,
};
export const Bytes = Template.bind({});
Bytes.args = {
backupStep: InstallScreenBackupStep.Download,
currentBytes: 500 * 1024,
totalBytes: 1024 * 1024,
};
export const Full = Template.bind({});
Full.args = {
backupStep: InstallScreenBackupStep.Download,
currentBytes: 1024,
totalBytes: 1024,
};
export const Error = Template.bind({});
Error.args = {
backupStep: InstallScreenBackupStep.Download,
currentBytes: 500 * 1024,
totalBytes: 1024 * 1024,
hasError: true,
};
export const Processing = Template.bind({});
Processing.args = {
backupStep: InstallScreenBackupStep.Process,
currentBytes: 500 * 1024,
totalBytes: 1024 * 1024,
};