Files
tom goriunovandGitHub fae4990e1f API resource refactoring (#2699)
* add prefix to API resources

* fix pw tests

* refactor config

* remove unnecessary prefixes in resource names

* fixes

* update screenshots
2025-05-01 15:22:38 +02:00

27 lines
839 B
TypeScript

import type { BrowserContext } from '@playwright/test';
import React from 'react';
import * as profileMock from 'mocks/user/profile';
import { contextWithAuth } from 'playwright/fixtures/auth';
import { test as base, expect } from 'playwright/lib';
import MyProfile from './MyProfile';
const test = base.extend<{ context: BrowserContext }>({
context: contextWithAuth,
});
test('without address', async({ render, mockApiResponse }) => {
await mockApiResponse('general:user_info', profileMock.base);
const component = await render(<MyProfile/>);
await expect(component).toHaveScreenshot();
});
test('without email', async({ render, mockApiResponse }) => {
await mockApiResponse('general:user_info', profileMock.withoutEmail);
const component = await render(<MyProfile/>);
await expect(component).toHaveScreenshot();
});