From bbf6914d8099b494d6e9f46b3bf369ba771f8b95 Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Fri, 10 Jan 2025 00:35:41 -0500 Subject: [PATCH 1/3] disable cloud computing filter for addons --- .../addons-service/manager/component.ts | 14 +++++++------- .../user-addons-manager/component.ts | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/osf-components/addon/components/addons-service/manager/component.ts b/lib/osf-components/addon/components/addons-service/manager/component.ts index bf17608bc7..5f4d7e30bc 100644 --- a/lib/osf-components/addon/components/addons-service/manager/component.ts +++ b/lib/osf-components/addon/components/addons-service/manager/component.ts @@ -44,7 +44,7 @@ enum PageMode { export enum FilterTypes { STORAGE = 'additional-storage', CITATION_MANAGER = 'citation-manager', - CLOUD_COMPUTING = 'cloud-computing', + // CLOUD_COMPUTING = 'cloud-computing', // disabled because BOA is down } interface Args { @@ -75,12 +75,12 @@ export default class AddonsServiceManagerComponent extends Component { list: A([]), configuredAddons: A([]), }, - [FilterTypes.CLOUD_COMPUTING]: { - modelName: 'external-computing-service', - task: taskFor(this.getComputingAddonProviders), - list: A([]), - configuredAddons: A([]), - }, + // [FilterTypes.CLOUD_COMPUTING]: { + // modelName: 'external-computing-service', + // task: taskFor(this.getComputingAddonProviders), + // list: A([]), + // configuredAddons: A([]), + // }, }; filterTypeMapper = new TrackedObject(this.mapper); @tracked filterText = ''; diff --git a/lib/osf-components/addon/components/addons-service/user-addons-manager/component.ts b/lib/osf-components/addon/components/addons-service/user-addons-manager/component.ts index cd5624dbbd..3be4f39fc2 100644 --- a/lib/osf-components/addon/components/addons-service/user-addons-manager/component.ts +++ b/lib/osf-components/addon/components/addons-service/user-addons-manager/component.ts @@ -65,14 +65,14 @@ export default class UserAddonManagerComponent extends Component { authorizedAccounts: [] as AuthorizedCitationAccountModel[], authorizedServiceIds: [] as string[], }, - [FilterTypes.CLOUD_COMPUTING]: { - modelName: 'external-computing-service', - fetchProvidersTask: taskFor(this.getComputingAddonProviders), - list: A([]) as EmberArray, - getAuthorizedAccountsTask: taskFor(this.getAuthorizedComputingAccounts), - authorizedAccounts: [] as AuthorizedComputingAccountModel[], - authorizedServiceIds: [] as string[], - }, + // [FilterTypes.CLOUD_COMPUTING]: { + // modelName: 'external-computing-service', + // fetchProvidersTask: taskFor(this.getComputingAddonProviders), + // list: A([]) as EmberArray, + // getAuthorizedAccountsTask: taskFor(this.getAuthorizedComputingAccounts), + // authorizedAccounts: [] as AuthorizedComputingAccountModel[], + // authorizedServiceIds: [] as string[], + // }, }; @tracked filterText = ''; @tracked activeFilterType = FilterTypes.STORAGE; From 1a47573ca5b37355ad44195bac9dd552add6a9fc Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Fri, 10 Jan 2025 00:55:22 -0500 Subject: [PATCH 2/3] fix tests --- tests/acceptance/guid-node/addons-test.ts | 10 +++++----- .../addons-service/manager/component-test.ts | 6 +++--- .../user-addons-manager/component-test.ts | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/acceptance/guid-node/addons-test.ts b/tests/acceptance/guid-node/addons-test.ts index cacb611c54..d247ef864c 100644 --- a/tests/acceptance/guid-node/addons-test.ts +++ b/tests/acceptance/guid-node/addons-test.ts @@ -45,7 +45,7 @@ module('Acceptance | guid-node/addons', hooks => { .hasAttribute('aria-selected', 'true', 'All addons tab is selected'); // check additonal storage providers - assert.dom('[data-test-addon-list-filter]').exists({ count: 3 }, '3 addon filters are present'); + assert.dom('[data-test-addon-list-filter]').exists({ count: 2 }, '2 addon filters are present'); assert.dom('[data-test-addon-list-filter="additional-storage"]') .hasClass(styles.active, 'Additional storage filter is active'); assert.dom('[data-test-addon-card-connect]').exists({ count: 9 }, '9 storage addons are present'); @@ -57,10 +57,10 @@ module('Acceptance | guid-node/addons', hooks => { assert.dom('[data-test-addon-card-connect]').exists({ count: 2 }, '2 citation addons are present'); // Check cloud-computing providers - await click('[data-test-addon-list-filter="cloud-computing"]'); - assert.dom('[data-test-addon-list-filter="cloud-computing"]') - .hasClass(styles.active, 'Additional citation filter is active'); - assert.dom('[data-test-addon-card-connect]').exists({ count: 1 }, '1 cloud computing addon is present'); + // await click('[data-test-addon-list-filter="cloud-computing"]'); + // assert.dom('[data-test-addon-list-filter="cloud-computing"]') + // .hasClass(styles.active, 'Additional citation filter is active'); + // assert.dom('[data-test-addon-card-connect]').exists({ count: 1 }, '1 cloud computing addon is present'); // Reset to additional storage await click('[data-test-addon-list-filter="additional-storage"]'); diff --git a/tests/integration/components/addons-service/manager/component-test.ts b/tests/integration/components/addons-service/manager/component-test.ts index 3d703ecf63..ad6e98295c 100644 --- a/tests/integration/components/addons-service/manager/component-test.ts +++ b/tests/integration/components/addons-service/manager/component-test.ts @@ -76,8 +76,8 @@ module('Integration | Component | addons-service | manager', hooks => { assert.dom('[data-test-provider]').hasText('Zotero', 'Filtered down to just Zotero'); // Filter by cloud computing - await click('[data-test-filter=cloud-computing]'); - assert.dom('[data-test-provider]').exists({ count: 1 }, 'Has cloud providers'); - assert.dom('[data-test-provider]').hasText('Boa', 'Has loaded Boa'); + // await click('[data-test-filter=cloud-computing]'); + // assert.dom('[data-test-provider]').exists({ count: 1 }, 'Has cloud providers'); + // assert.dom('[data-test-provider]').hasText('Boa', 'Has loaded Boa'); }); }); diff --git a/tests/integration/components/addons-service/user-addons-manager/component-test.ts b/tests/integration/components/addons-service/user-addons-manager/component-test.ts index 21c14d531d..e7f93608ac 100644 --- a/tests/integration/components/addons-service/user-addons-manager/component-test.ts +++ b/tests/integration/components/addons-service/user-addons-manager/component-test.ts @@ -109,9 +109,9 @@ module('Integration | Component | addons-service | user-addons-manager', hooks = assert.dom('[data-test-provider]').hasText('Zotero', 'Filtered down to just Zotero'); // Filter by cloud computing - await click('[data-test-filter=cloud-computing]'); - assert.dom('[data-test-provider]').exists({ count: 1 }, 'Has cloud providers'); - assert.dom('[data-test-provider]').hasText('Boa', 'Has loaded Boa'); + // await click('[data-test-filter=cloud-computing]'); + // assert.dom('[data-test-provider]').exists({ count: 1 }, 'Has cloud providers'); + // assert.dom('[data-test-provider]').hasText('Boa', 'Has loaded Boa'); }); test('it traverses page modes for new account creation', async function(this: AddonManagerTestContext, assert) { From d6297fa1796f5240439475cff33cc5e6e40986da Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Fri, 10 Jan 2025 11:04:10 -0500 Subject: [PATCH 3/3] fix another test --- tests/acceptance/settings/addons-test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/settings/addons-test.ts b/tests/acceptance/settings/addons-test.ts index 88134ca019..996edd80f8 100644 --- a/tests/acceptance/settings/addons-test.ts +++ b/tests/acceptance/settings/addons-test.ts @@ -71,11 +71,11 @@ module('Acceptance | settings | addons', hooks => { assert.dom('[data-test-provider="Box"]').isNotVisible(); assert.dom('[data-test-provider="Mendeley"]').isVisible(); - await click('[data-test-user-addon-list-filter="cloud-computing"]'); + // await click('[data-test-user-addon-list-filter="cloud-computing"]'); - assert.dom('[data-test-provider="Box"]').isNotVisible(); - assert.dom('[data-test-provider="Mendeley"]').isNotVisible(); - assert.dom('[data-test-all-addons-tab]').containsText('No results found'); + // assert.dom('[data-test-provider="Box"]').isNotVisible(); + // assert.dom('[data-test-provider="Mendeley"]').isNotVisible(); + // assert.dom('[data-test-all-addons-tab]').containsText('No results found'); }); test('Connected account tab works', async function(assert) {