<commit_before>import expect from 'expect.js';
import * as u from '../acceptance_test_utils';

describe(".emailcode acceptance", function() {
  before(u.stubWebApis);
  after(u.restoreWebApis);

  describe("constructing a Lock", function() {
    before(function() {
      this.lock = u.constructLock();
    });

    it("doesn't render a thing", function() {
      expect(u.isRendered(this.lock)).to.not.be.ok();
    });
  });

  describe.skip("opening a Lock", function() {
    before(function() {
      this.lock = u.constructLock();
      u.openLock(this.lock, "emailcode");
    });

    after(function() {
      u.closeLock(this.lock);
    });

    it("renders the widget and opens it after a few ms", function(done) {
      expect(u.isRendered(this.lock)).to.be.ok();
      expect(u.isOpened(this.lock)).to.not.be.ok();
      setTimeout(() => {
        expect(u.isOpened(this.lock)).to.be.ok();
        done();<commit_msg>Activate test for opening a emailcode Lock<commit_after>import expect from 'expect.js';
import * as u from '../acceptance_test_utils';

describe(".emailcode acceptance", function() {
  before(u.stubWebApis);
  after(u.restoreWebApis);

  describe("constructing a Lock", function() {
    before(function() {
      this.lock = u.constructLock();
    });

    it("doesn't render a thing", function() {
      expect(u.isRendered(this.lock)).to.not.be.ok();
    });
  });

  describe("opening a Lock", function() {
    before(function() {
      this.lock = u.constructLock();
    });

    after(function() {
      u.closeLock(this.lock);
    });

    it("doesn't open the Lock immediately", function() {
      u.openLock(this.lock, "emailcode");

      expect(u.isRendered(this.lock)).to.be.ok();
      expect(u.isOpened(this.lock)).to.not.be.ok();
    });

    it("opens it after a few ms", function(done) {
      setTimeout(() => {
        expect(u.isOpened(this.lock)).to.be.ok();
        done();
{'fraction_non_alphanumeric': 0.18333333333333332, 'fraction_numerical': 0.0, 'mean_word_length': 3.0872340425531917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5995638', 'n_tokens_mistral': 641, 'n_tokens_neox': 622, 'n_words': 115}