<commit_before>module generated_uitests

open generated_forms
open generated_validation
open canopy

let run () =
  start chrome

  context "Product"

  once (fun _ -> url "http://localhost:8083/product/create"; click ".btn")

  "Name is required" &&& fun _ ->
    displayed "Name is required"

  "Description is required" &&& fun _ ->
    displayed "Description is required"

  "Price is required" &&& fun _ ->
    displayed "Price is required"

  "Price must be a valid double" &&& fun _ ->
    displayed "Price is not a valid number (decimal)"

  "Category is required" &&& fun _ ->
    displayed "Category is required"


  context "Cart"

  once (fun _ -> url "http://localhost:8083/cart/create"; click ".btn")

  "Register FK must be a valid integer" &&& fun _ ->
    displayed "Register FK is not a valid number (int)"


  context "CartItem"

  once (fun _ -> url "http://localhost:8083/cartItem/create"; click ".btn")

  "Cart FK must be a valid integer" &&& fun _ ->
    displayed "Cart FK is not a valid number (int)"

  "Product FK must be a valid integer" &&& fun _ ->
    displayed "Product FK is not a valid number (int)"


  context "Checkout"

  once (fun _ -> url "http://localhost:8083/checkout/create"; click ".btn")

  "Cart FK must be a valid integer" &&& fun _ ->
    displayed "Cart FK is not a valid number (int)"



  canopy.runner.run()

  quit()
<commit_msg>some ui tests<commit_after>module generated_uitests

open generated_forms
open generated_validation
open canopy

let run () =
  start chrome

  context "Register"

  once (fun _ -> url "http://localhost:8083/register"; click "Submit")

  "New registration validation" &&& fun _ ->
    displayed "First Name is required"
    displayed "Last Name is required"
    displayed "Email is not a valid email"
    displayed "Email is required"
    displayed "Password must be between 6 and 100 characters"
    displayed "Password is required"
    displayed "Confirm Password must be between 6 and 100 characters"
    displayed "Confirm Password is required"

  context "Product"

  once (fun _ -> url "http://localhost:8083/product/create"; click ".btn")

  "New product validation" &&& fun _ ->
    displayed "Name is required"
    displayed "Description is required"
    displayed "Price is required"
    displayed "Price is not a valid number (decimal)"
    displayed "Category is required"

  context "Cart"

  once (fun _ -> url "http://localhost:8083/cart/create"; click ".btn")

  "Register FK must be a valid integer" &&& fun _ ->
    displayed "Register FK is not a valid number (int)"


  context "CartItem"

  once (fun _ -> url "http://localhost:8083/cartItem/create"; click ".btn")

  "Cart FK must be a valid integer" &&& fun _ ->
    displayed "Cart FK is not a valid number (int)"

  "Product FK must be a valid integer" &&& fun _ ->
    displayed "Product FK is not a valid number (int)"


  context "Checkout"

  once (fun _ -> url "http://localhost:8083/checkout/create"; click ".btn")

  "Cart FK must be a valid integer" &&& fun _ ->
    displayed "Cart FK is not a valid number (int)"

  canopy.runner.run()

  quit()

{'fraction_non_alphanumeric': 0.1158908507223114, 'fraction_numerical': 0.014125200642054575, 'mean_word_length': 3.239455782312925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '2221326', 'n_tokens_mistral': 973, 'n_tokens_neox': 906, 'n_words': 366}