mirror of
https://github.com/getredash/redash.git
synced 2026-05-10 15:00:16 -04:00
* Update DynamicForm export * Move UserShow to users folder * Migrate User profile header and create DynamicForm for basic data * Update UserShow to use UserProfile prop * Add API Key input * Add handler to regenerate API Key button * Handle user profile save * Add readOnly prop to DynamicForm and begin disabled user behavior * Add Change Password Modal * Remove action buttons for disabled users * Add send password reset behavior * Add minLength and password comparison to Password Modal * Resend Invitation button * Add Convert User Info * Fix UserShow test * Some code updates * Add enable/disable user button * Add UserPolicy as an idea * Remove UserPolicy * Create Edit Profile spec * Move User profile screenshot to Edit Profile Spec * Add tests for saving user and changing password errors * CC is back :) - Fix trailing spaces * Add test for succesful password update * A few improvements from code review * Remove Toggle User button when seeing your own profile * Create InputWithCopy * Fix possible errors when network is off and improve Email not sent alert * Add default response object for $http possible errors * Changes in UserEdit - removed onClick from methods name - regenerate API Key now uses InputWithCopy - Password title added * Update UserEdit render behavior and styling - Password title changed to h5 - change rendering rules for actions - Password modal is now closed when password is changed - change DynamicForm readOnly to the fields and add hideSubmitButton * Create ChangePasswordDialog and update UserEdit * Fix possible console error * Remove password match assertion from spec * Fix typo
17 lines
420 B
JavaScript
17 lines
420 B
JavaScript
import React from 'react';
|
|
import renderer from 'react-test-renderer';
|
|
import { UserShow } from './UserShow';
|
|
|
|
test('renders correctly', () => {
|
|
const user = {
|
|
id: 2,
|
|
name: 'John Doe',
|
|
email: 'john@doe.com',
|
|
profileImageUrl: 'http://www.images.com/llama.jpg',
|
|
};
|
|
|
|
const component = renderer.create(<UserShow user={user} />);
|
|
const tree = component.toJSON();
|
|
expect(tree).toMatchSnapshot();
|
|
});
|