<commit_before>import {TodoListItems} from "../screenplay/questions/todo_list_items";
const
    chai = require('chai').use(require('chai-as-promised')),
    expect = chai.expect;

import {binding, given, when, then} from "cucumber-tsflow";
import {Actor} from "../../serenity_screenplay/actor";
import {AddATodoItem} from "../screenplay/tasks/add_a_todo_item";
import {Start} from "../screenplay/tasks/start";
import {listOf} from "../../text_functions";

@binding()
class TodoUserSteps {

    private james: Actor = Actor.named("james");

    @given(/^.*has an empty todo list$/)
    private starts_with_an_empty_list () {

        this.james.attemptsTo(
            Start.withAnEmptyTodoList()
        );
    };

    @given(/^.*has a todo list containing (.*)$/)
    public has_a_list_with (items: string) {

        this.james.attemptsTo(
            Start.withATodoListContaining(items)
        );
    }


    @when(/^he adds '(.*?)' to (?:his|her) list$/)<commit_msg>Clean up<commit_after>const
    chai = require('chai').use(require('chai-as-promised')),
    expect = chai.expect;

import {binding, given, when, then} from "cucumber-tsflow";
import {Actor} from "../../serenity_screenplay/actor";
import {AddATodoItem} from "../screenplay/tasks/add_a_todo_item";
import {Start} from "../screenplay/tasks/start";
import {TodoListItems} from "../screenplay/questions/todo_list_items";
import {listOf} from "../../text_functions";

@binding()
class TodoUserSteps {

    private james: Actor = Actor.named("james");

    @given(/^.*has an empty todo list$/)
    private starts_with_an_empty_list () {

        this.james.attemptsTo(
            Start.withAnEmptyTodoList()
        );
    };

    @given(/^.*has a todo list containing (.*)$/)
    public has_a_list_with (items: string) {

        this.james.attemptsTo(
            Start.withATodoListContaining(items)
        );
    }


    @when(/^s?he adds '(.*?)' to (?:his|her) list$/)
{'fraction_non_alphanumeric': 0.16743946419371458, 'fraction_numerical': 0.0, 'mean_word_length': 3.185344827586207, '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': '6714383', 'n_tokens_mistral': 670, 'n_tokens_neox': 645, 'n_words': 128}