Skip to content

Commit

Permalink
[ENG-5158] Add node addons acceptance tests (#2264)
Browse files Browse the repository at this point in the history
-   Ticket: [ENG-5158]
-   Feature flag: n/a

## Purpose
- Add acceptance tests for node addons workflows

## Summary of Changes
- Add tests
- Add data-test selectors
- Some minor bugfixes discovered along the way
- Discovered an issue where adding a configured account doesn't show up on the addons page. Will address this in a later PR
  • Loading branch information
futa-ikeda authored Jul 15, 2024
1 parent 04d73d2 commit e7168fd
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 10 deletions.
30 changes: 25 additions & 5 deletions app/guid-node/addons/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<div local-class='account-select'>
<label>
<Input
data-test-existing-authorized-accounts-input
name='account-select'
@value={{account.id}}
@type='radio'
Expand Down Expand Up @@ -163,7 +164,10 @@
<h4>{{t 'addons.list.connected-locations'}}</h4>
</div>
{{#each provider.configuredAddons as |configuredAddon|}}
<div local-class='configured-addon-display-name'>
<div
data-test-configured-addon-name
local-class='configured-addon-display-name'
>
{{configuredAddon.displayName}}
<span local-class='float-right'>
<Button
Expand All @@ -189,7 +193,10 @@
</Button>
</span>
</div>
<div local-class='configured-addon-root-folder'>
<div
data-test-configured-addon-root-folder
local-class='configured-addon-root-folder'
>
{{#if configuredAddon.rootFolder}}
{{configuredAddon.rootFolder}}
{{else}}
Expand Down Expand Up @@ -277,8 +284,18 @@
local-class='tab-list'
as |tablist|
>
<tablist.tab data-analytics-name='Select All Addons tab'>{{t 'addons.list.all-addons'}}</tablist.tab>
<tablist.tab data-analytics-name='Select Connected Accounts tab'>{{t 'addons.list.connected-accounts'}}</tablist.tab>
<tablist.tab
data-test-addons-tab-all-addons
data-analytics-name='Select All Addons tab'
>
{{t 'addons.list.all-addons'}}
</tablist.tab>
<tablist.tab
data-test-addons-tab-connected-accounts
data-analytics-name='Select Connected Accounts tab'
>
{{t 'addons.list.connected-accounts'}}
</tablist.tab>
</tab.tabList>
<tab.tabPanel
data-test-all-addons-tab
Expand Down Expand Up @@ -349,7 +366,10 @@
</Button>
{{/each}}
</div>
<div local-class='addon-cards-wrapper'>
<div
data-test-configured-provider-list
local-class='addon-cards-wrapper'
>
{{#if manager.currentListIsLoading}}
<LoadingIndicator @dark={{true}} />
{{else}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface InputFieldObject {
labelText: string;
inputType: string;
inputPlaceholder: string;
inputValue: string;
inputValue?: string;
autocomplete?: string;
postText?: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
autocomplete={{field.autocomplete}}
@type={{field.inputType}}
@value={{field.inputValue}}
{{on 'keyup' @onInput}}
{{on 'input' @onInput}}
/>
{{/let}}
{{/each}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class ConfiguredAddonEdit extends Component<Args> {
};

get invalidDisplayName() {
return this.displayName.trim().length === 0;
return this.displayName?.trim().length === 0;
}

get folderChanged() {
Expand Down
Loading

0 comments on commit e7168fd

Please sign in to comment.