<commit_before>describe("chorus.views.JobTaskItem", function () {
    beforeEach(function() {
        this.model = backboneFixtures.job().tasks().at(0);
        this.view = new chorus.views.JobTaskItem({ model: this.model });
        this.view.render();
    });

    it("links the task's name to its show page", function() {
        expect(this.view.$(".name")).toHaveText(this.model.get("name"));
    });

    it("includes the correct task icon", function() {
        this.model.set('action', 'run_work_flow');
        expect(this.view.$("img")).toHaveAttr("src", "/images/workfiles/icon/afm.png");

        this.model.set('action', 'run_sql_file');
        expect(this.view.$("img")).toHaveAttr("src", "/images/workfiles/icon/sql.png");

        this.model.set('action', 'import_source_data');
        expect(this.view.$("img")).toHaveAttr("src", "/images/import_icon.png");
    });

    it("links the task's name to its show page", function() {
        expect(this.view.$(".action")).toContainTranslation("job_task.action." + this.model.get("action"));
    });

    describe("when the model received an 'invalidated' trigger", function() {<commit_msg>Jobtask icon test reflects new reality.<commit_after>describe("chorus.views.JobTaskItem", function () {
    beforeEach(function() {
        this.model = backboneFixtures.job().tasks().at(0);
        this.view = new chorus.views.JobTaskItem({ model: this.model });
        this.view.render();
    });

    it("links the task's name to its show page", function() {
        expect(this.view.$(".name")).toHaveText(this.model.get("name"));
    });

    it("includes the correct task icon", function() {
        this.model.set('action', 'run_work_flow');
        expect(this.view.$("img")).toHaveAttr("src", "/images/jobs/afm-task.png");

        this.model.set('action', 'run_sql_file');
        expect(this.view.$("img")).toHaveAttr("src", "/images/workfiles/icon/sql.png");

        this.model.set('action', 'import_source_data');
        expect(this.view.$("img")).toHaveAttr("src", "/images/import_icon.png");
    });

    it("links the task's name to its show page", function() {
        expect(this.view.$(".action")).toContainTranslation("job_task.action." + this.model.get("action"));
    });

    describe("when the model received an 'invalidated' trigger", function() {
{'fraction_non_alphanumeric': 0.19793902962644913, 'fraction_numerical': 0.0008587376556462001, 'mean_word_length': 3.489402697495183, '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': '4041900', 'n_tokens_mistral': 727, 'n_tokens_neox': 703, 'n_words': 121}