<commit_before>import React from 'react';
import ChallengeDetails from './ChallengeDetails';
import { mount } from 'enzyme';
import { fromJS } from 'immutable';

describe('ChallengeDetails', () => {

    let sut;
    let challenge;

    beforeEach(() => {
        challenge = fromJS({
            title: 'testTitle',
            level: 'testLevel',
            description: 'testDescription',
            user: {
                firstName: 'userName',
                lastName: 'userLastName',
                rating: 1
            }
        });

        sut = mount(<ChallengeDetails challenge={challenge} />);
    });

    it('should show challenge title', () => {
        sut.find('.challenge-info__title')
            .text().should.equal('testTitle');
    });

    it('should show challenge level', () => {
        sut.find('.challenge-info-level__value')
            .text().should.equal('testLevel');
    });

    it('should show challenge description', () => {
        sut.find('.challenge-info__description')
            .text().should.equal('testDescription');
    });

    it('should show user firstName and lastName', () => {
        sut.find('.challenge-info-author__name')
            .text().should.equal('userName userLastName');
    });

    it('should show user rating', () => {
        sut.find('.challenge-info-author__rating-val')
            .text().should.equal('1');
    });
});
<commit_msg>Feature #32, new design partly implemented<commit_after>import React from 'react';
import ChallengeDetails from './ChallengeDetails';
import { mount } from 'enzyme';
import { fromJS } from 'immutable';

describe('ChallengeDetails', () => {

    let sut;
    let challenge;

    beforeEach(() => {
        challenge = fromJS({
            image: '',
            title: 'testTitle',
            level: 'testLevel',
            description: '',
            categories: [],
            location: '',
            user: {
                firstName: 'userName',
                lastName: 'userLastName'
            }
        });

        sut = mount(<ChallengeDetails challenge={challenge} />);
    });

    it('should show challenge title', () => {
        sut.find('.challenge-header__title')
            .text().should.equal('testTitle');
    });

    it('should show challenge level', () => {
        sut.find('.challenge-info-level .challenge-info__text')
            .text().should.equal('testLevel');
    });

    it('should show user firstName and lastName', () => {
        sut.find('.challenge-info-author .challenge-info__text')
            .text().should.equal('userName userLastName');
    });
});

{'fraction_non_alphanumeric': 0.16113020236731576, 'fraction_numerical': 0.0015273004963726614, 'mean_word_length': 2.1490384615384617, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7151412', 'n_tokens_mistral': 747, 'n_tokens_neox': 689, 'n_words': 141}