Skip to content

Commit

Permalink
data-test-mleh -> data-test-mfa
Browse files Browse the repository at this point in the history
  • Loading branch information
hashishaw committed May 20, 2022
1 parent cac3f67 commit 31430df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions ui/app/templates/components/mfa-login-enforcement-header.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if @isInline}}
<h3 class="title is-5" data-test-mleh-title>Enforcement</h3>
<h3 class="title is-5" data-test-mfa-title>Enforcement</h3>
{{else}}
<PageHeader as |p|>
<p.top>
Expand All @@ -15,15 +15,15 @@
</nav>
</p.top>
<p.levelLeft>
<h1 class="title is-3" data-test-mleh-title>
<h1 class="title is-3" data-test-mfa-title>
<Icon @name="lock" @size="24" />
{{@heading}}
</h1>
</p.levelLeft>
</PageHeader>
{{/if}}
<div class="has-border-top-light">
<p class="has-top-margin-m" data-test-mleh-description>
<p class="has-top-margin-m" data-test-mfa-description>
{{#if @isInline}}
An enforcement includes the authentication types, authentication methods, groups, and entities that will require this
MFA method. This is optional and can be added later.
Expand All @@ -43,7 +43,7 @@
@value="new"
@groupValue={{@radioCardGroupValue}}
@onChange={{@onRadioCardSelect}}
data-test-mleh-radio="new"
data-test-mfa-radio="new"
/>
<RadioCard
@title="Use existing"
Expand All @@ -53,7 +53,7 @@
@groupValue={{@radioCardGroupValue}}
@disabled={{not this.enforcements.length}}
@onChange={{@onRadioCardSelect}}
data-test-mleh-radio="existing"
data-test-mfa-radio="existing"
/>
<RadioCard
@title="Skip this step"
Expand All @@ -62,7 +62,7 @@
@value="skip"
@groupValue={{@radioCardGroupValue}}
@onChange={{@onRadioCardSelect}}
data-test-mleh-radio="skip"
data-test-mfa-radio="skip"
/>
</div>
{{#if (eq @radioCardGroupValue "existing")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ module('Integration | Component | mfa-login-enforcement-header', function (hooks
test('it renders heading', async function (assert) {
await render(hbs`<MfaLoginEnforcementHeader @heading="New enforcement" />`);

assert.dom('[data-test-mleh-title]').includesText('New enforcement');
assert.dom('[data-test-mleh-title] svg').hasClass('flight-icon-lock', 'Lock icon renders');
assert.dom('[data-test-mfa-title]').includesText('New enforcement');
assert.dom('[data-test-mfa-title] svg').hasClass('flight-icon-lock', 'Lock icon renders');
assert
.dom('[data-test-mleh-description]')
.dom('[data-test-mfa-description]')
.includesText('An enforcement will define which auth types', 'Description renders');
assert.dom('[data-test-mleh-radio]').doesNotExist('Radio cards are hidden when not inline display mode');
assert.dom('[data-test-mfa-radio]').doesNotExist('Radio cards are hidden when not inline display mode');
assert
.dom('[data-test-component="search-select"]')
.doesNotExist('Search select is hidden when not inline display mode');
Expand Down Expand Up @@ -46,13 +46,13 @@ module('Integration | Component | mfa-login-enforcement-header', function (hooks
/>
`);

assert.dom('[data-test-mleh-title]').includesText('Enforcement');
assert.dom('[data-test-mfa-title]').includesText('Enforcement');
assert
.dom('[data-test-mleh-description]')
.dom('[data-test-mfa-description]')
.includesText('An enforcement includes the authentication types', 'Description renders');

for (const option of ['new', 'existing', 'skip']) {
await click(`[data-test-mleh-radio="${option}"] input`);
await click(`[data-test-mfa-radio="${option}"] input`);
assert.equal(this.value, option, 'Value is updated on radio select');
if (option === 'existing') {
await click('.ember-basic-dropdown-trigger');
Expand Down

0 comments on commit 31430df

Please sign in to comment.