<commit_before>@no_mobile
@as_student
Feature: Submittable multi

Background:
  # Ideally we would create a student account that has a teacher so that we don't need
  # force_submittable to be passed through.
  Given I am on "http://learn.code.org/s/allthethings/stage/9/puzzle/3?noautoplay=true&force_submittable=true"
  Then I rotate to landscape
  And I wait to see ".submitButton"
  And element ".submitButton" is visible

Scenario: Loading the level
  And element ".multi-question" has text "What is your favorite color?"

Scenario: Submit anything, unsubmit, be able to resubmit.
  # First, submit something.
  And element ".submitButton:first" is disabled
  And element ".submitButton:last" is disabled
  And I press ".answerbutton[index=2]" using jQuery
  And element ".submitButton:first" is not disabled
  And element ".submitButton:last" is not disabled
  And I press ".submitButton:first" using jQuery
  And I wait to see ".modal"

  # Reload the page to see that unsubmit is the option.
  And I reload the page
  And I wait to see ".unsubmitButton"
  And element ".unsubmitButton:first" is visible
  And element ".submitButton:first" is not visible
  And element ".submitButton:last" is not visible

  # Unsubmit.
  And I press ".unsubmitButton:first" using jQuery
  And I wait to see ".modal"
  And I press "#continue-button" using jQuery

  # Make sure that submit is the option after the page reloads.
  And I wait to see ".submitButton"
  And element ".submitButton:first" is not disabled
  And element ".submitButton:last" is not disabled<commit_msg>Fix multi_submittable.feature on slow browsers<commit_after>@no_mobile
@as_student
Feature: Submittable multi

Background:
  # Ideally we would create a student account that has a teacher so that we don't need
  # force_submittable to be passed through.
  Given I am on "http://learn.code.org/s/allthethings/stage/9/puzzle/3?noautoplay=true&force_submittable=true"
  Then I rotate to landscape
  And I wait to see ".submitButton"
  And element ".submitButton" is visible

Scenario: Loading the level
  And element ".multi-question" has text "What is your favorite color?"

Scenario: Submit anything, unsubmit, be able to resubmit.
  # First, submit something.
  And element ".submitButton:first" is disabled
  And element ".submitButton:last" is disabled
  And I press ".answerbutton[index=2]" using jQuery
  And element ".submitButton:first" is not disabled
  And element ".submitButton:last" is not disabled
  And I press ".submitButton:first" using jQuery
  And I wait to see ".modal"

  # Reload the page to see that unsubmit is the option.
  And I reload the page
  And I wait to see ".unsubmitButton"
  And element ".unsubmitButton:first" is visible
  And element ".submitButton:first" is not visible
  And element ".submitButton:last" is not visible

  # Unsubmit.
  And I press ".unsubmitButton:first" using jQuery
  And I wait to see ".modal"
  And I press "#continue-button" using jQuery

  # Make sure that submit is the option after the page reloads.
  And I wait for 1 second
  And I wait to see ".submitButton"
  And element ".submitButton:first" is not disabled
  And element ".submitButton:last" is not disabled
{'fraction_non_alphanumeric': 0.07605633802816901, 'fraction_numerical': 0.002190923317683881, 'mean_word_length': 4.121794871794871, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6098975', 'n_tokens_mistral': 929, 'n_tokens_neox': 906, 'n_words': 407}