<commit_before>/* eslint-disable no-undef */
const chai = require('chai');
const assert = chai.assert;
chai.should();

describe('Testing Hierarchy 1', () => {
  it('Should render hierarchy', () => {
    browser.url('/#!/hierarchy/40-49');
    browser.pause(200);

    const text = browser.getText('.selected .dk5')[0];
    assert.equal(text, '40-49', 'title is present');

    const level = browser.getText('.selected .hierarchy-level')[0];
    assert.include(level, 'Geografi og rejser i alm.', 'sublevel is present');
  });

  it('Click on sublevel', () => {
    browser.url('/#!/hierarchy/40-49');
    browser.pause(500);
    browser.click('[href="#!/hierarchy/40"]');
    browser.pause(500);

    const sel = browser.getText('.selected');
    console.log('sel', sel);
    const dk5 = browser.getText('.dk5');
    console.log('dk5', dk5);
    const text2 = browser.getText('.selected .dk5');
    console.log('text2', text2);
    const h2 = browser.getText('.h2');
    console.log('h2', h2);<commit_msg>start each test from start page<commit_after>/* eslint-disable no-undef */
const chai = require('chai');
const assert = chai.assert;
chai.should();

describe('Testing Hierarchy', () => {
  beforeEach(() => {
    browser.url('/');
    browser.pause(200);
  });

  it('Should render hierarchy', () => {
    browser.url('/#!/hierarchy/40-49');
    browser.pause(200);

    const text = browser.getText('.selected .dk5')[0];
    assert.equal(text, '40-49', 'title is present');

    const level = browser.getText('.selected .hierarchy-level')[0];
    assert.include(level, 'Geografi og rejser i alm.', 'sublevel is present');
  });

  it('Click on sublevel', () => {
    browser.url('/#!/hierarchy/40-49');
    browser.pause(200);
    browser.click('[href="#!/hierarchy/40"]');
    browser.pause(200);

    const sel = browser.getText('.selected');
    console.log('sel', sel);
    const dk5 = browser.getText('.dk5');
    console.log('dk5', dk5);
    const text2 = browser.getText('.selected .dk5');
    console.log('text2', text2);
    const h2 = browser.getText('.h2');
    console.log('h2', h2);
{'fraction_non_alphanumeric': 0.20857142857142857, 'fraction_numerical': 0.0380952380952381, 'mean_word_length': 3.597374179431072, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1193976', 'n_tokens_mistral': 744, 'n_tokens_neox': 697, 'n_words': 142}