mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* add prefix to API resources * fix pw tests * refactor config * remove unnecessary prefixes in resource names * fixes * update screenshots
27 lines
839 B
TypeScript
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();
|
|
});
|