<commit_before>describe('Add a new todo', function() {

    beforeEach(function () {
        browser.get('#!/add');
    });

    it('should have the save button disabled', function() {
        var saveButton = element(by.css('[type="submit"]'));

        expect(saveButton.isEnabled()).toEqual(false);
    });

    it('should have the save button enabled after filling in the fields', function() {
        var saveButton;

        element(by.model("formData.title")).sendKeys("Create E2E spec");
        element(by.model("formData.description")).sendKeys("for the entire app");

        saveButton = element(by.css('[type="submit"]'));

        expect(saveButton.isEnabled()).toEqual(true);
    });

    it('should save new todo', function() {
        var saveButton;

        element(by.model("formData.title")).sendKeys("Create E2E spec");
        element(by.model("formData.description")).sendKeys("for the entire app");

        saveButton = element(by.css('[type="submit"]'));

        saveButton.click();

        expect(element(by.repeater("todo in todos").row(0).column('title')).getText()).toEqual("Create E2E spec");
        expect(element(by.repeater("todo in todos").row(0).column('description')).getText()).toEqual("for the entire app");
    });

});

describe('Edit the saved todo', function() {

    beforeEach(function () {
        browser.get("#!/");
    });

    it('should open the saved todo', function() {

        element(by.repeater("todo in todos").row(0).column("title")).click();

        expect(element(by.model("formData.title")).getAttribute("value")).toEqual("Create E2E spec");
        expect(element(by.model("formData.description")).getAttribute("value")).toEqual("for the entire app");
    });

    it('should edit the saved todo', function() {
        var saveButton;

        saveButton = element(by.css('[type="submit"]'));

        element(by.repeater("todo in todos").row(0).column("title")).click();

        element(by.model("formData.title")).clear();
        element(by.model("formData.title")).sendKeys("Create Protractor E2E spec");

        element(by.model("formData.description")).clear();
        element(by.model("formData.description")).sendKeys("for the entire app really easy");

        saveButton.click();

        expect(element(by.repeater("todo in todos").row(0).column('title')).getText()).toEqual("Create Protractor E2E spec");
        expect(element(by.repeater("todo in todos").row(0).column('description')).getText()).toEqual("for the entire app really easy");
    });
});

describe('Delete the saved todo', function() {
    it('should delete the todo', function () {
<commit_msg>Cosmetics.<commit_after>describe('Add a new todo', function() {

    beforeEach(function () {
        browser.get('#!/add');
    });

    it('should have the save button disabled', function() {
        var saveButton = element(by.css('[type="submit"]'));

        expect(saveButton.isEnabled()).toEqual(false);
    });

    it('should have the save button enabled after filling in the fields', function() {
        var saveButton = element(by.css('[type="submit"]'));

        element(by.model("formData.title")).sendKeys("Create E2E spec");
        element(by.model("formData.description")).sendKeys("for the entire app");

        expect(saveButton.isEnabled()).toEqual(true);
    });

    it('should save new todo', function() {
        var saveButton = element(by.css('[type="submit"]'));

        element(by.model("formData.title")).sendKeys("Create E2E spec");
        element(by.model("formData.description")).sendKeys("for the entire app");

        saveButton.click();

        expect(element(by.repeater("todo in todos").row(0).column('title')).getText()).toEqual("Create E2E spec");
        expect(element(by.repeater("todo in todos").row(0).column('description')).getText()).toEqual("for the entire app");
    });

});

describe('Edit the saved todo', function() {

    beforeEach(function () {
        browser.get("#!/");
    });

    it('should open the saved todo', function() {

        element(by.repeater("todo in todos").row(0).column("title")).click();

        expect(element(by.model("formData.title")).getAttribute("value")).toEqual("Create E2E spec");
        expect(element(by.model("formData.description")).getAttribute("value")).toEqual("for the entire app");
    });

    it('should edit the saved todo', function() {
        var saveButton = element(by.css('[type="submit"]'));

        element(by.repeater("todo in todos").row(0).column("title")).click();

        element(by.model("formData.title")).clear();
        element(by.model("formData.title")).sendKeys("Create Protractor E2E spec");

        element(by.model("formData.description")).clear();
        element(by.model("formData.description")).sendKeys("for the entire app really easy");

        saveButton.click();

        expect(element(by.repeater("todo in todos").row(0).column('title')).getText()).toEqual("Create Protractor E2E spec");
        expect(element(by.repeater("todo in todos").row(0).column('description')).getText()).toEqual("for the entire app really easy");
    });
});

describe('Delete the saved todo', function() {
    it('should delete the todo', function () {

{'fraction_non_alphanumeric': 0.1896551724137931, 'fraction_numerical': 0.004597701149425287, 'mean_word_length': 3.7636861313868613, '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': '6371902', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1486, 'n_words': 283}