<commit_before>require! {
  chai: {expect}
}

It = global.it

describe 'Game Screen' ->
  describe 'Stage 1' ->
    before ->
      @nightmare
      .refresh!
      .wait -> document.readyState is 'complete'
      .click 'button.select'
      .click '.stage-name:nth-child(1)'
      .click '.modal .close'

    It 'navigates to game screen' ->
      @nightmare
      .evaluate -> document.query-selector '.screens' .classList.contains 'gaming'
      .then -> expect it .to.be.true

    It 'can place blocks' ->
      @nightmare
      .click '.panel > .block[data-type=wireI]'
      .click '.board .block[data-x="1"][data-y="0"]'
      .then ~>
        @nightmare
        .evaluate ->
          document.query-selector '.board .block[data-x="1"][data-y="0"]'
          .get-attribute 'data-type'
      .then ~>
        expect it .to.equal 'wireI'

        @nightmare
        .evaluate ->
          document.query-selector '.board .block[data-x="1"][data-y="0"]'
          .get-attribute 'data-rotate'
      .then ->
        expect it .to.equal '0'

    It 'fails when executed' ->
      @nightmare
      .click 'button.execute'
      .wait -> document.query-selector-all '.data' .length is 0
      .evaluate -> document.query-selector '.statement' .text-content
      .then -> expect it .to.equal '入り口と出口をつなげてみよう!'

    It 'succeeds when placed more blocks correctly' ->
      @nightmare
      .click '.panel > .block[data-type=wireI]'
      .click '.board .block[data-x="1"][data-y="1"]'
      .click '.board .block[data-x="1"][data-y="2"]'
      .click 'button.execute'
      .wait -> document.query-selector-all '.data' .length is 0
      .evaluate -> document.query-selector '.result' |> get-computed-style
      .then -> expect it.display .to.equal 'block'<commit_msg>Mark some functional tests pending<commit_after>require! {
  chai: {expect}
}

It = global.it

describe 'Game Screen' ->
  describe 'Stage 1' ->
    before ->
      @nightmare
      .refresh!
      .wait -> document.readyState is 'complete'
      .click 'button.select'
      .click '.stage-name:nth-child(1)'
      .click '.modal .close'

    It 'navigates to game screen' ->
      @nightmare
      .evaluate -> document.query-selector '.screens' .classList.contains 'gaming'
      .then -> expect it .to.be.true

    It.skip 'can place blocks' ->
      @nightmare
      .click '.panel > .block[data-type=wireI]'
      .click '.board .block[data-x="1"][data-y="0"]'
      .then ~>
        @nightmare
        .evaluate ->
          document.query-selector '.board .block[data-x="1"][data-y="0"]'
          .get-attribute 'data-type'
      .then ~>
        expect it .to.equal 'wireI'

        @nightmare
        .evaluate ->
          document.query-selector '.board .block[data-x="1"][data-y="0"]'
          .get-attribute 'data-rotate'
      .then ->
        expect it .to.equal '0'

    It.skip 'fails when executed' ->
      @nightmare
      .click 'button.execute'
      .wait -> document.query-selector-all '.data' .length is 0
      .evaluate -> document.query-selector '.statement' .text-content
      .then -> expect it .to.equal '入り口と出口をつなげてみよう!'

    It.skip 'succeeds when placed more blocks correctly' ->
      @nightmare
      .click '.panel > .block[data-type=wireI]'
      .click '.board .block[data-x="1"][data-y="1"]'
      .click '.board .block[data-x="1"][data-y="2"]'
      .click 'button.execute'
      .wait -> document.query-selector-all '.data' .length is 0
      .evaluate -> document.query-selector '.result' |> get-computed-style
      .then -> expect it.display .to.equal 'block'
{'fraction_non_alphanumeric': 0.16508379888268157, 'fraction_numerical': 0.008379888268156424, 'mean_word_length': 2.1085069444444446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 51, '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': '4857754', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1168, 'n_words': 267}