<commit_before>@MMIA @dev
Feature: MMIA

  Background: Navigate to Home Page
    Given I try to log in with "mmia" "<PASSWORD>"

  Scenario: Initial a MMIA
    Given I have initialized inventory with MMIA user
    And I press "Stock Card Overview"
    Then I wait for "Stock Overview" to appear
    Then I wait for 1 second
    And I make a movement "[08S42B]" "Issues" "PAV" "issued" "2"
    Then I wait for "Stock Overview" to appear
    Then I wait for 1 second
    Then I navigate back
    And I press "MMIA"
    Then I wait for "MMIA" to appear
    Then I should see text containing "No MMIA has been created."

    Then I press "Complete Inventory"
    And I wait for "inventory" to appear
    Then I do physical inventory for mmia items

    Then I wait for "MMIA" to appear
    Then I should see text containing "Create MMIA"

    Then I press "Create MMIA"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    Then I scroll down until I see the "Zidovudina/Lamivudina/Nevirapi; 60mg+30mg+50mg"
    Then I swipe right
    Then I wait for 1 second
    Then I should see issued movement "2"
    Then I should see inventory "121"
    Then I swipe left
    And I enter patient totals

    Then I navigate back
    Then I should see text containing "Are you sure you want to quit without saving your work?"
    Then I press "Yes"
    Then I wait for 1 second

    Then I press "Create MMIA"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    Then I scroll "scrollView" down to "Submit for Approval"
    And I should see empty patient total

    And I enter regimen totals
    Then I navigate back
    Then I should see text containing "Are you sure you want to quit without saving your work?"
    Then I press "No"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    Then I press "Save"
    Then I wait for 1 second
    Then I should see text containing "Continue Working on MMIA"

    And I press "Continue Working on MMIA"
    And I wait for "MMIA -" to appear
    Then I scroll "scrollView" down to "Submit for Approval"
    And I enter patient totals
    Then I press "Submit for Approval"
    And I sign requisition with "superuser" "testUser" and complete

    Then I should see text containing "Your MMIA form has been successfully saved,"
    Then I wait for "MMIA" to appear

    Then I navigate back
    Then I wait for "Stock Card Overview" to appear<commit_msg>CS - #523 - functional test : Check invalid input condition<commit_after>@MMIA @dev
Feature: MMIA

  Background: Navigate to Home Page
    Given I try to log in with "mmia" "<PASSWORD>"

  Scenario: Initial a MMIA
    Given I have initialized inventory with MMIA user
    And I press "Stock Card Overview"
    Then I wait for "Stock Overview" to appear
    Then I wait for 1 second
    And I make a movement "[08S42B]" "Issues" "PAV" "issued" "2"
    Then I wait for "Stock Overview" to appear
    Then I wait for 1 second
    Then I navigate back
    And I press "MMIA"
    Then I wait for "MMIA" to appear
    Then I should see text containing "No MMIA has been created."

    Then I press "Complete Inventory"
    And I wait for "inventory" to appear
    Then I do physical inventory for mmia items

    Then I wait for "MMIA" to appear
    Then I should see text containing "Create MMIA"

    Then I press "Create MMIA"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    Then I scroll down until I see the "Zidovudina/Lamivudina/Nevirapi; 60mg+30mg+50mg"
    Then I swipe right
    Then I wait for 1 second
    Then I should see issued movement "2"
    Then I should see inventory "121"
    Then I swipe left
    
    Then I scroll "scrollView" down to "Submit for Approval"
    Then I press "Submit for Approval"
    Then I should see "Invalid Input"
    
    And I enter patient totals

    Then I navigate back
    Then I should see text containing "Are you sure you want to quit without saving your work?"
    Then I press "Yes"
    Then I wait for 1 second

    Then I press "Create MMIA"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    Then I scroll "scrollView" down to "Submit for Approval"
    And I should see empty patient total

    And I enter regimen totals
    Then I navigate back
    Then I should see text containing "Are you sure you want to quit without saving your work?"
    Then I press "No"
    Then I wait for "MMIA -" to appear
    Then I wait for 1 second
    
    Then I scroll "scrollView" down to "Submit for Approval"
    Then I press "Submit for Approval"
    Then I should see "Invalid Input"
    
    Then I press "Save"
    Then I wait for 1 second
    Then I should see text containing "Continue Working on MMIA"

    And I press "Continue Working on MMIA"
    And I wait for "MMIA -" to appear
    Then I scroll "scrollView" down to "Submit for Approval"
    And I enter patient totals
    Then I press "Submit for Approval"
    And I sign requisition with "superuser" "testUser" and complete

    Then I should see text containing "Your MMIA form has been successfully saved,"
    Then I wait for "MMIA" to appear

    Then I navigate back
    Then I wait for "Stock Card Overview" to appear
{'fraction_non_alphanumeric': 0.046413502109704644, 'fraction_numerical': 0.009397775220560031, 'mean_word_length': 2.759913482335977, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '655408', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1459, 'n_words': 846}