<commit_before>import { click, currentRouteName, visit } from '@ember/test-helpers';
import { module, test } from 'qunit';
import setupAuthentication from 'ilios/tests/helpers/setup-authentication';

import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { getElementText, getText } from 'ilios-common';

const url = '/curriculum-inventory-reports/1';

module('Acceptance | curriculum inventory report', function (hooks) {
  setupApplicationTest(hooks);
  setupMirage(hooks);

  hooks.beforeEach(async function () {
    this.school = this.server.create('school');
    this.user = await setupAuthentication({ school: this.school });
  });

  test('create new sequence block Issue #2108', async function (assert) {
    this.user.update({ directedSchools: [this.school] });
    const program = this.server.create('program', { school: this.school });
    const report = this.server.create('curriculumInventoryReport', { program });
    this.server.create('curriculumInventorySequence', { report });

    const sequenceBlockList = '.curriculum-inventory-sequence-block-list';
    const addSequenceBlock = `${sequenceBlockList} .expand-button`;
    const newBlockForm = '.new-curriculum-inventory-sequence-block';
    const newFormTitle = `${newBlockForm} h2.title`;

    await visit(url);
    assert.equal(currentRouteName(), 'curriculumInventoryReport.index');
    assert.dom(newBlockForm).doesNotExist();
    assert.dom(newFormTitle).doesNotExist();
    await click(addSequenceBlock);
    assert.dom(newBlockForm).exists({ count: 1 });
    assert.dom(newFormTitle).exists({ count: 1 });<commit_msg>updates css class selector to target component.<commit_after>import { click, currentRouteName, visit } from '@ember/test-helpers';
import { module, test } from 'qunit';
import setupAuthentication from 'ilios/tests/helpers/setup-authentication';

import { setupApplicationTest } from 'ember-qunit';
import setupMirage from 'ember-cli-mirage/test-support/setup-mirage';
import { getElementText, getText } from 'ilios-common';

const url = '/curriculum-inventory-reports/1';

module('Acceptance | curriculum inventory report', function (hooks) {
  setupApplicationTest(hooks);
  setupMirage(hooks);

  hooks.beforeEach(async function () {
    this.school = this.server.create('school');
    this.user = await setupAuthentication({ school: this.school });
  });

  test('create new sequence block Issue #2108', async function (assert) {
    this.user.update({ directedSchools: [this.school] });
    const program = this.server.create('program', { school: this.school });
    const report = this.server.create('curriculumInventoryReport', { program });
    this.server.create('curriculumInventorySequence', { report });

    const sequenceBlockList = '.curriculum-inventory-sequence-block-list';
    const addSequenceBlock = `${sequenceBlockList} .expand-button`;
    const newBlockForm = '.curriculum-inventory-new-sequence-block';
    const newFormTitle = `${newBlockForm} h2.title`;

    await visit(url);
    assert.equal(currentRouteName(), 'curriculumInventoryReport.index');
    assert.dom(newBlockForm).doesNotExist();
    assert.dom(newFormTitle).doesNotExist();
    await click(addSequenceBlock);
    assert.dom(newBlockForm).exists({ count: 1 });
    assert.dom(newFormTitle).exists({ count: 1 });
{'fraction_non_alphanumeric': 0.13908659549228944, 'fraction_numerical': 0.004744958481613286, 'mean_word_length': 5.088447653429603, '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': '525731', 'n_tokens_mistral': 966, 'n_tokens_neox': 979, 'n_words': 204}