<commit_before>import React from 'react';
import { mount, shallow } from 'enzyme';
import { expect } from 'chai';
import assert from 'assert';

import Toggle from '../src/js/popup/toggle.js'

/*
*  Tests for Toggle component in src/js/popup/toggle.js.
*/
describe('<Toggle />', function() {
    before(function () {
        global.chrome = chrome;
    });

    it('enableFokus() successfully set boolean in localStorage', function() {
        const wrapper = shallow(<Toggle />);
        localStorage.setItem('fokus-toggle', 'disable');
        wrapper.instance().enableFokus();
        expect(localStorage.getItem('fokus-toggle')).equals('enable');
    });

    it('disableFokus() successfully set boolean in localStorage', function() {
        const wrapper = shallow(<Toggle />);
        localStorage.setItem('fokus-toggle', 'disable');
        wrapper.instance().disableFokus();
        expect(localStorage.getItem('fokus-toggle')).equals('disable');
    });

    it('modifyCss() successfully updated color of elements in popup window', function() {
        const wrapper = shallow(<Toggle />);
        wrapper.instance().modifyCss("#000000");
        //expect(wrapper.find('#domain-container')).getAttribute("color").to.equal("#000000");<commit_msg>no unit testing for client side CSS change<commit_after>import React from 'react';
import { mount, shallow } from 'enzyme';
import { expect } from 'chai';
import assert from 'assert';

import Toggle from '../src/js/popup/toggle.js'
import Domains from '../src/js/popup/Domains.js'

/*
*  Tests for Toggle component in src/js/popup/toggle.js.
*/
describe('<Toggle />', function() {
    before(function () {
        global.chrome = chrome;
    });

    it('enableFokus() successfully set boolean in localStorage', function() {
        const wrapper = shallow(<Toggle />);
        localStorage.setItem('fokus-toggle', 'disable');
        wrapper.instance().enableFokus();
        expect(localStorage.getItem('fokus-toggle')).equals('enable');
    });

    it('disableFokus() successfully set boolean in localStorage', function() {
        const wrapper = shallow(<Toggle />);
        localStorage.setItem('fokus-toggle', 'disable');
        wrapper.instance().disableFokus();
        expect(localStorage.getItem('fokus-toggle')).equals('disable');
{'fraction_non_alphanumeric': 0.16275021758050479, 'fraction_numerical': 0.005221932114882507, 'mean_word_length': 3.625754527162978, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '4583995', 'n_tokens_mistral': 652, 'n_tokens_neox': 634, 'n_words': 145}