<commit_before>/**
 * Layer tests
 */

import React from 'react';
import { describe, beforeEach, it } from '@bigtest/mocha';
import { Interactor } from '@bigtest/interactor';
import { expect } from 'chai';

import { mount } from '../../../tests/helpers';

import Button from '../../Button';
import LayerHarness from './LayerHarness';
import LayerInteractor from './interactor';
import ButtonInteractor from '../../Button/tests/interactor';


const layer = new LayerInteractor();
const showButton = new ButtonInteractor('[data-test-show-layer]');
const overlayButton = new ButtonInteractor('[data-test-overlay-button]');
const hideButton = new ButtonInteractor('[data-test-hide-layer]');

function focusButton(id) {
  const btn = document.getElementById(id);
  btn.focus();
}

describe.only('Layer', () => {
  let layerHasClosed = false;
  let layerHasOpened = false;

  beforeEach(async () => {
    await mount(
      <LayerHarness
        contentLabel="test layer label"
        afterClose={() => { layerHasClosed = true; }}
        afterOpen={() => { layerHasOpened = true; }}
      ><commit_msg>remove only<commit_after>/**
 * Layer tests
 */

import React from 'react';
import { describe, beforeEach, it } from '@bigtest/mocha';
import { Interactor } from '@bigtest/interactor';
import { expect } from 'chai';

import { mount } from '../../../tests/helpers';

import Button from '../../Button';
import LayerHarness from './LayerHarness';
import LayerInteractor from './interactor';
import ButtonInteractor from '../../Button/tests/interactor';


const layer = new LayerInteractor();
const showButton = new ButtonInteractor('[data-test-show-layer]');
const overlayButton = new ButtonInteractor('[data-test-overlay-button]');
const hideButton = new ButtonInteractor('[data-test-hide-layer]');

function focusButton(id) {
  const btn = document.getElementById(id);
  btn.focus();
}

describe('Layer', () => {
  let layerHasClosed = false;
  let layerHasOpened = false;

  beforeEach(async () => {
    await mount(
      <LayerHarness
        contentLabel="test layer label"
        afterClose={() => { layerHasClosed = true; }}
        afterOpen={() => { layerHasOpened = true; }}
      >
{'fraction_non_alphanumeric': 0.16034719049794427, 'fraction_numerical': 0.0, 'mean_word_length': 3.9659863945578233, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3195278', 'n_tokens_mistral': 642, 'n_tokens_neox': 632, 'n_words': 167}