Skip to content

Commit

Permalink
Comment out button to add new configured addon for a given provider (C…
Browse files Browse the repository at this point in the history
…enterForOpenScience#2329)

-   Ticket: []
-   Feature flag: n/a

## Purpose
- Disallow configuring multiple accounts for a given external-storage-services

## Summary of Changes
- Comment out button that allows users to connect another account for a given external-storage-service
  • Loading branch information
futa-ikeda authored Sep 19, 2024
1 parent 8a429a0 commit cc36f18
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 44 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
key: cached_node_modules_${{ secrets.CACHE_VERSION }}_${{ hashFiles('**/yarn.lock') }}
restore-keys: cached_node_modules_${{ secrets.CACHE_VERSION }}_
- run: yarn build:test
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist
Expand All @@ -67,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
Expand All @@ -91,7 +91,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
Expand All @@ -115,7 +115,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
Expand All @@ -139,7 +139,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
Expand Down
5 changes: 3 additions & 2 deletions app/guid-node/addons/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@
</div>
{{/each}}
</div>
<div local-class='float-right'>
{{!-- Remove ability to add a new configured addon for now --}}
{{!-- <div local-class='float-right'>
<Button
data-test-add-another-location-button
data-analytics-name='Add another location'
Expand All @@ -219,7 +220,7 @@
>
{{t 'addons.list.add-another-location'}}
</Button>
</div>
</div> --}}
<OsfDialog
@isOpen={{manager.confirmRemoveConnectedLocation}}
@onClose={{action (mut manager.confirmRemoveConnectedLocation) false}}
Expand Down
75 changes: 38 additions & 37 deletions tests/acceptance/guid-node/addons-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { click as untrackedClick, fillIn } from '@ember/test-helpers';
import { fillIn } from '@ember/test-helpers';
import { setupMirage } from 'ember-cli-mirage/test-support';
import { percySnapshot } from 'ember-percy';
import { module, test } from 'qunit';
Expand Down Expand Up @@ -301,41 +301,42 @@ module('Acceptance | guid-node/addons', hooks => {
await click('[data-test-addons-tab-connected-accounts]');
assert.dom('[data-test-addon-card]').exists({ count: 2 }, '2 providers with configured accounts are present');

// Add new Box account from configured accounts list page
await click('[data-test-addon-card="Box"] [data-test-addon-card-configure]');
await click('[data-test-add-another-location-button]');
// Terms page
assert.dom('[data-test-addon-accept-terms-button]').exists('Terms shown first for new account');
await click('[data-test-addon-accept-terms-button]');
// New or existing account page
assert.dom('[data-test-addon-existing-account-button]')
.exists('Existing account button is present for a provider with authorized account');
assert.dom('[data-test-addon-new-account-button]').exists('New account button is present');
await click('[data-test-addon-existing-account-button]');
// Existing account page
assert.dom('[data-test-existing-authorized-accounts-input]')
.exists({ count: 1 }, 'Options for choosing existing authorized account present');
assert.dom('[data-test-addon-authorize-button]')
.doesNotExist('Authorize button is not present before choosing an account');
await untrackedClick('[data-test-existing-authorized-accounts-input]');
assert.dom('[data-test-addon-authorize-button]')
.exists('Authorize button is present after choosing an account');
await percySnapshot('Acceptance | guid-node/addons | Adding new configured addons | existing account page');
await click('[data-test-addon-authorize-button]');
// Confirm setup page
assert.dom('[data-test-addon-confirm-setup-button]').exists('Confirm setup button is present');
await percySnapshot('Acceptance | guid-node/addons | Adding new configured addons | confirm setup page');
await click('[data-test-addon-confirm-setup-button]');
// Configure page
assert.dom('[data-test-display-name-input]').exists('Name input is present');
assert.dom('[data-test-root-folder-save]').isDisabled('Save button is disabled');
await fillIn('[data-test-display-name-input]', 'New Box Account Display Name');
await click('[data-test-root-folder-option]:first-child');
await click('[data-test-root-folder-save]');

// check to see if new account is added
await click('[data-test-addon-card="Box"] [data-test-addon-card-configure]');
assert.dom('[data-test-edit-connected-location]').exists({ count: 2 }, 'Two editable accounts are present');
assert.dom('[data-test-remove-connected-location]').exists({ count: 2 }, 'Two remove buttons are present');
// Skip adding new account, as this is no longer part of the requirements
// // Add new Box account from configured accounts list page
// await click('[data-test-addon-card="Box"] [data-test-addon-card-configure]');
// await click('[data-test-add-another-location-button]');
// // Terms page
// assert.dom('[data-test-addon-accept-terms-button]').exists('Terms shown first for new account');
// await click('[data-test-addon-accept-terms-button]');
// // New or existing account page
// assert.dom('[data-test-addon-existing-account-button]')
// .exists('Existing account button is present for a provider with authorized account');
// assert.dom('[data-test-addon-new-account-button]').exists('New account button is present');
// await click('[data-test-addon-existing-account-button]');
// // Existing account page
// assert.dom('[data-test-existing-authorized-accounts-input]')
// .exists({ count: 1 }, 'Options for choosing existing authorized account present');
// assert.dom('[data-test-addon-authorize-button]')
// .doesNotExist('Authorize button is not present before choosing an account');
// await untrackedClick('[data-test-existing-authorized-accounts-input]');
// assert.dom('[data-test-addon-authorize-button]')
// .exists('Authorize button is present after choosing an account');
// await percySnapshot('Acceptance | guid-node/addons | Adding new configured addons | existing account page');
// await click('[data-test-addon-authorize-button]');
// // Confirm setup page
// assert.dom('[data-test-addon-confirm-setup-button]').exists('Confirm setup button is present');
// await percySnapshot('Acceptance | guid-node/addons | Adding new configured addons | confirm setup page');
// await click('[data-test-addon-confirm-setup-button]');
// // Configure page
// assert.dom('[data-test-display-name-input]').exists('Name input is present');
// assert.dom('[data-test-root-folder-save]').isDisabled('Save button is disabled');
// await fillIn('[data-test-display-name-input]', 'New Box Account Display Name');
// await click('[data-test-root-folder-option]:first-child');
// await click('[data-test-root-folder-save]');

// // check to see if new account is added
// await click('[data-test-addon-card="Box"] [data-test-addon-card-configure]');
// assert.dom('[data-test-edit-connected-location]').exists({ count: 2 }, 'Two editable accounts are present');
// assert.dom('[data-test-remove-connected-location]').exists({ count: 2 }, 'Two remove buttons are present');
});
});

0 comments on commit cc36f18

Please sign in to comment.