From 16c06e1d607f2614e13b26510f15462f9a954cfc Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 17 Jun 2022 07:47:21 -0400 Subject: [PATCH] Temporarily disable for non-PLEROMA/MASTODON --- .../__tests__/subscribe-button.test.tsx | 258 +++++++++--------- app/soapbox/utils/features.ts | 2 +- 2 files changed, 130 insertions(+), 130 deletions(-) diff --git a/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx b/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx index 4b0efc88e..3efa4d617 100644 --- a/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx +++ b/app/soapbox/features/ui/components/__tests__/subscribe-button.test.tsx @@ -24,155 +24,155 @@ describe('', () => { }); }); - describe('with "accountNotifies" enabled', () => { - beforeEach(() => { - store = { - ...store, - instance: normalizeInstance({ - version: '3.4.1 (compatible; TruthSocial 1.0.0)', - software: 'TRUTHSOCIAL', - pleroma: ImmutableMap({}), - }), - }; - }); + // describe('with "accountNotifies" enabled', () => { + // beforeEach(() => { + // store = { + // ...store, + // instance: normalizeInstance({ + // version: '3.4.1 (compatible; TruthSocial 1.0.0)', + // software: 'TRUTHSOCIAL', + // pleroma: ImmutableMap({}), + // }), + // }; + // }); - describe('when the relationship is requested', () => { - beforeEach(() => { - account = normalizeAccount({ ...account, relationship: normalizeRelationship({ requested: true }) }); + // describe('when the relationship is requested', () => { + // beforeEach(() => { + // account = normalizeAccount({ ...account, relationship: normalizeRelationship({ requested: true }) }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button')).toBeInTheDocument(); - }); + // it('renders the button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button')).toBeInTheDocument(); + // }); - describe('when the user "isSubscribed"', () => { - beforeEach(() => { - account = normalizeAccount({ - ...account, - relationship: normalizeRelationship({ requested: true, notifying: true }), - }); + // describe('when the user "isSubscribed"', () => { + // beforeEach(() => { + // account = normalizeAccount({ + // ...account, + // relationship: normalizeRelationship({ requested: true, notifying: true }), + // }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the unsubscribe button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button').title).toEqual(`Unsubscribe to notifications from @${account.acct}`); - }); - }); + // it('renders the unsubscribe button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button').title).toEqual(`Unsubscribe to notifications from @${account.acct}`); + // }); + // }); - describe('when the user is not "isSubscribed"', () => { - beforeEach(() => { - account = normalizeAccount({ - ...account, - relationship: normalizeRelationship({ requested: true, notifying: false }), - }); + // describe('when the user is not "isSubscribed"', () => { + // beforeEach(() => { + // account = normalizeAccount({ + // ...account, + // relationship: normalizeRelationship({ requested: true, notifying: false }), + // }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the unsubscribe button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button').title).toEqual(`Subscribe to notifications from @${account.acct}`); - }); - }); - }); + // it('renders the unsubscribe button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button').title).toEqual(`Subscribe to notifications from @${account.acct}`); + // }); + // }); + // }); - describe('when the user is not following the account', () => { - beforeEach(() => { - account = normalizeAccount({ ...account, relationship: normalizeRelationship({ following: false }) }); + // describe('when the user is not following the account', () => { + // beforeEach(() => { + // account = normalizeAccount({ ...account, relationship: normalizeRelationship({ following: false }) }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders nothing', () => { - render(, null, store); - expect(screen.queryAllByTestId('icon-button')).toHaveLength(0); - }); - }); + // it('renders nothing', () => { + // render(, null, store); + // expect(screen.queryAllByTestId('icon-button')).toHaveLength(0); + // }); + // }); - describe('when the user is following the account', () => { - beforeEach(() => { - account = normalizeAccount({ ...account, relationship: normalizeRelationship({ following: true }) }); + // describe('when the user is following the account', () => { + // beforeEach(() => { + // account = normalizeAccount({ ...account, relationship: normalizeRelationship({ following: true }) }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button')).toBeInTheDocument(); - }); + // it('renders the button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button')).toBeInTheDocument(); + // }); - describe('when the user "isSubscribed"', () => { - beforeEach(() => { - account = normalizeAccount({ - ...account, - relationship: normalizeRelationship({ requested: true, notifying: true }), - }); + // describe('when the user "isSubscribed"', () => { + // beforeEach(() => { + // account = normalizeAccount({ + // ...account, + // relationship: normalizeRelationship({ requested: true, notifying: true }), + // }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the unsubscribe button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button').title).toEqual(`Unsubscribe to notifications from @${account.acct}`); - }); - }); + // it('renders the unsubscribe button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button').title).toEqual(`Unsubscribe to notifications from @${account.acct}`); + // }); + // }); - describe('when the user is not "isSubscribed"', () => { - beforeEach(() => { - account = normalizeAccount({ - ...account, - relationship: normalizeRelationship({ requested: true, notifying: false }), - }); + // describe('when the user is not "isSubscribed"', () => { + // beforeEach(() => { + // account = normalizeAccount({ + // ...account, + // relationship: normalizeRelationship({ requested: true, notifying: false }), + // }); - store = { - ...store, - accounts: ImmutableMap({ - '1': account, - }), - }; - }); + // store = { + // ...store, + // accounts: ImmutableMap({ + // '1': account, + // }), + // }; + // }); - it('renders the unsubscribe button', () => { - render(, null, store); - expect(screen.getByTestId('icon-button').title).toEqual(`Subscribe to notifications from @${account.acct}`); - }); - }); - }); - }); + // it('renders the unsubscribe button', () => { + // render(, null, store); + // expect(screen.getByTestId('icon-button').title).toEqual(`Subscribe to notifications from @${account.acct}`); + // }); + // }); + // }); + // }); }); diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index 8c3f3636c..0d9d8e9b7 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -126,7 +126,7 @@ const getInstanceFeatures = (instance: Instance) => { accountNotifies: any([ v.software === MASTODON && gte(v.compatVersion, '3.3.0'), v.software === PLEROMA && gte(v.version, '2.4.50'), - v.software === TRUTHSOCIAL, + // v.software === TRUTHSOCIAL, ]), /**