<commit_before>const baseUrl = Cypress.env("LUMEN_URL") || 'http://t1.lumen.local:3030/';
const username = Cypress.env("LUMEN_USER") || 'jerome';
const password = Cypress.env("LUMEN_PASSWORD") || 'password';
const DATASET_LINK = 'https://github.com/lawlesst/vivo-sample-data/raw/master/data/csv/people.csv';
const datasetName = `Dataset ${Date.now().toString()}`;

context('Kitchen Sink', () => {
  before(() => {
    cy.visit(baseUrl);
    cy.get('#username')
      .type(username)
      .should('have.value', username);
    cy.get('#password')
      .type(password)
      .should('have.value', password);
    cy.get('#kc-login').click();
  });

  after(() => {
    const tryDelete = () => {
      cy.get('.LibraryListingItem').filter(`:contains(${datasetName})`).each((el, i) => {
        if(i > 0) return;
        cy.wrap(el)
          .find('[data-test-id="show-controls"]')
          .click({ force: true });
        cy.wrap(el)
          .find('[data-test-id="delete"]')
          .click({ force: true });
        cy.get('.DeleteConfirmationModal button.delete')
          .click();
        setTimeout(5000, tryDelete);
      })
    };
    tryDelete();
  });

  it('create dataset: link', () => {
    cy.get('button[data-test-id="dataset"]').click();
    // Select link option
    cy.get('input[data-test-id="source-option"][value="LINK"]').click();
    cy.get('button[data-test-id="next"]').click();
    cy.get('#linkFileInput').type(DATASET_LINK);
    cy.get('button[data-test-id="next"]').click();
    // Insert name
    cy.get('input[data-test-id="dataset-name"]').type(datasetName);
    // Import
    cy.get('button[data-test-id="next"]').click();
    cy.get(`[data-test-name="${datasetName}"]:not(.PENDING)`, { timeout: 20000 }).should('exist');
  });

  it('create visualisation', () => {
    cy.get('button[data-test-id="visualisation"]').click();
    cy.get('li[data-test-id="button-pivot-table"]', { timeout: 20000 }).click();
    cy.get('[data-test-id="dataset-menu"] .Select-control').click();
    // Finding dataset option
    cy.get('[role="option"]')
      .contains("aasdfasdfsadfsdfasdsadffdas")
      .should('have.attr', 'idxadfasdfqw12312312323423421341')
      .then(optionId => {
        // Selecting dataset
        cy.get(`#${optionId}`).click();
        // open column menu
        cy.get('[data-test-id="column-menu"] .Select-control').click();
        // Finding column to select
        return cy.get('[role="option"]')
          .contains('title (text)')
          .should('have.attr', 'id');
      })
      .then(columnId => {
        const title = `Visualisation of ${datasetName}`;
        // Selecting column
        cy.get(`#${columnId}`).click();
        // Focusing title
        cy.get('div[data-test-id="entity-title"]').click();
        // Typing visualisation name<commit_msg>[#1443] Revert: Breaking test to test CI<commit_after>const baseUrl = Cypress.env("LUMEN_URL") || 'http://t1.lumen.local:3030/';
const username = Cypress.env("LUMEN_USER") || 'jerome';
const password = Cypress.env("LUMEN_PASSWORD") || 'password';
const DATASET_LINK = 'https://github.com/lawlesst/vivo-sample-data/raw/master/data/csv/people.csv';
const datasetName = `Dataset ${Date.now().toString()}`;

context('Kitchen Sink', () => {
  before(() => {
    cy.visit(baseUrl);
    cy.get('#username')
      .type(username)
      .should('have.value', username);
    cy.get('#password')
      .type(password)
      .should('have.value', password);
    cy.get('#kc-login').click();
  });

  after(() => {
    const tryDelete = () => {
      cy.get('.LibraryListingItem').filter(`:contains(${datasetName})`).each((el, i) => {
        if(i > 0) return;
        cy.wrap(el)
          .find('[data-test-id="show-controls"]')
          .click({ force: true });
        cy.wrap(el)
          .find('[data-test-id="delete"]')
          .click({ force: true });
        cy.get('.DeleteConfirmationModal button.delete')
          .click();
        setTimeout(5000, tryDelete);
      })
    };
    tryDelete();
  });

  it('create dataset: link', () => {
    cy.get('button[data-test-id="dataset"]').click();
    // Select link option
    cy.get('input[data-test-id="source-option"][value="LINK"]').click();
    cy.get('button[data-test-id="next"]').click();
    cy.get('#linkFileInput').type(DATASET_LINK);
    cy.get('button[data-test-id="next"]').click();
    // Insert name
    cy.get('input[data-test-id="dataset-name"]').type(datasetName);
    // Import
    cy.get('button[data-test-id="next"]').click();
    cy.get(`[data-test-name="${datasetName}"]:not(.PENDING)`, { timeout: 20000 }).should('exist');
  });

  it('create visualisation', () => {
    cy.get('button[data-test-id="visualisation"]').click();
    cy.get('li[data-test-id="button-pivot-table"]', { timeout: 20000 }).click();
    cy.get('[data-test-id="dataset-menu"] .Select-control').click();
    // Finding dataset option
    cy.get('[role="option"]')
      .contains(datasetName)
      .should('have.attr', 'id')
      .then(optionId => {
        // Selecting dataset
        cy.get(`#${optionId}`).click();
        // open column menu
        cy.get('[data-test-id="column-menu"] .Select-control').click();
        // Finding column to select
        return cy.get('[role="option"]')
          .contains('title (text)')
          .should('have.attr', 'id');
      })
      .then(columnId => {
        const title = `Visualisation of ${datasetName}`;
        // Selecting column
        cy.get(`#${columnId}`).click();
        // Focusing title
        cy.get('div[data-test-id="entity-title"]').click();
        // Typing visualisation name
{'fraction_non_alphanumeric': 0.22265694469144584, 'fraction_numerical': 0.011381824648764005, 'mean_word_length': 2.941135248773651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 2, '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': '4662828', 'n_tokens_mistral': 1898, 'n_tokens_neox': 1857, 'n_words': 257}