From 54e3605721bced80e3de00d5c717fd3081806c1f Mon Sep 17 00:00:00 2001 From: Isla Koenigsknecht Date: Thu, 18 Apr 2024 17:20:37 -0400 Subject: [PATCH 1/2] Change invite link to invite code in components --- .../JoinCommunity/JoinCommunity.test.tsx | 2 +- .../components/CreateJoinCommunity/community.dictionary.tsx | 4 ++-- .../src/renderer/components/LoadingPanel/LoadingPanel.tsx | 2 +- .../desktop/src/renderer/forms/fields/communityFields.ts | 2 +- packages/e2e-tests/src/selectors.ts | 6 +++--- packages/e2e-tests/src/tests/multipleClients.test.ts | 6 +++--- packages/e2e-tests/src/tests/userProfile.test.ts | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.test.tsx b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.test.tsx index 6d3d270fc8..9d6b94520b 100644 --- a/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.test.tsx +++ b/packages/desktop/src/renderer/components/CreateJoinCommunity/JoinCommunity/JoinCommunity.test.tsx @@ -229,7 +229,7 @@ describe('join community', () => { /> ) - const input = screen.getByPlaceholderText('Invite code') + const input = screen.getByPlaceholderText('Invite link') const button = screen.getByText('Continue') await userEvent.type(input, url) diff --git a/packages/desktop/src/renderer/components/CreateJoinCommunity/community.dictionary.tsx b/packages/desktop/src/renderer/components/CreateJoinCommunity/community.dictionary.tsx index 50f3d29424..d3e506465e 100644 --- a/packages/desktop/src/renderer/components/CreateJoinCommunity/community.dictionary.tsx +++ b/packages/desktop/src/renderer/components/CreateJoinCommunity/community.dictionary.tsx @@ -62,8 +62,8 @@ export const JoinCommunityDictionary = (handleRedirection?: () => void): Perform } return { header: 'Join community', - label: 'Paste your invite code to join an existing community', - placeholder: 'Invite code', + label: 'Paste your invite link to join an existing community', + placeholder: 'Invite link', hint: '', button: 'Continue', field: inviteLinkField(), diff --git a/packages/desktop/src/renderer/components/LoadingPanel/LoadingPanel.tsx b/packages/desktop/src/renderer/components/LoadingPanel/LoadingPanel.tsx index 76afa9ce3c..6b0d0dc37d 100644 --- a/packages/desktop/src/renderer/components/LoadingPanel/LoadingPanel.tsx +++ b/packages/desktop/src/renderer/components/LoadingPanel/LoadingPanel.tsx @@ -35,7 +35,7 @@ const LoadingPanel = () => { if (isConnected) { if (currentCommunity && isChannelReplicated && owner && isOnlyOneUser) { const notification = new Notification('Community created!', { - body: 'Visit Settings for an invite code you can share.', + body: 'Visit Settings for an invite link you can share.', icon: '../../build' + '/icon.png', silent: true, }) diff --git a/packages/desktop/src/renderer/forms/fields/communityFields.ts b/packages/desktop/src/renderer/forms/fields/communityFields.ts index c278373780..957a4e78cd 100644 --- a/packages/desktop/src/renderer/forms/fields/communityFields.ts +++ b/packages/desktop/src/renderer/forms/fields/communityFields.ts @@ -29,7 +29,7 @@ export const inviteLinkField = (name = 'name'): FieldData => { label: '', name, type: 'password', - placeholder: 'Invite code', + placeholder: 'Invite link', }, validation: { required: FieldErrors.Required, diff --git a/packages/e2e-tests/src/selectors.ts b/packages/e2e-tests/src/selectors.ts index 4ecbfdb7f9..68b6461849 100644 --- a/packages/e2e-tests/src/selectors.ts +++ b/packages/e2e-tests/src/selectors.ts @@ -281,9 +281,9 @@ export class JoinCommunityModal { await link.click() } - async typeCommunityCode(code: string) { - const communityNameInput = await this.driver.findElement(By.xpath('//input[@placeholder="Invite code"]')) - await communityNameInput.sendKeys(code) + async typeCommunityInviteLink(inviteLink: string) { + const communityNameInput = await this.driver.findElement(By.xpath('//input[@placeholder="Invite link"]')) + await communityNameInput.sendKeys(inviteLink) } async submit() { diff --git a/packages/e2e-tests/src/tests/multipleClients.test.ts b/packages/e2e-tests/src/tests/multipleClients.test.ts index 41a3806992..40571ad3b2 100644 --- a/packages/e2e-tests/src/tests/multipleClients.test.ts +++ b/packages/e2e-tests/src/tests/multipleClients.test.ts @@ -156,7 +156,7 @@ describe('Multiple Clients', () => { const isJoinCommunityModal = await joinCommunityModal.element.isDisplayed() expect(isJoinCommunityModal).toBeTruthy() console.log({ invitationCode }) - await joinCommunityModal.typeCommunityCode(invitationCode) + await joinCommunityModal.typeCommunityInviteLink(invitationCode) await joinCommunityModal.submit() }) @@ -225,7 +225,7 @@ describe('Multiple Clients', () => { const isJoinCommunityModal = await joinCommunityModal.element.isDisplayed() expect(isJoinCommunityModal).toBeTruthy() console.log({ invitationCode }) - await joinCommunityModal.typeCommunityCode(invitationCode) + await joinCommunityModal.typeCommunityInviteLink(invitationCode) await joinCommunityModal.submit() }) @@ -443,7 +443,7 @@ describe('Multiple Clients', () => { const joinCommunityModal = new JoinCommunityModal(users.user1.app.driver) const isJoinCommunityModal = await joinCommunityModal.element.isDisplayed() expect(isJoinCommunityModal).toBeTruthy() - await joinCommunityModal.typeCommunityCode(invitationCode) + await joinCommunityModal.typeCommunityInviteLink(invitationCode) await joinCommunityModal.submit() }) it('Leave community - Guest registers new username', async () => { diff --git a/packages/e2e-tests/src/tests/userProfile.test.ts b/packages/e2e-tests/src/tests/userProfile.test.ts index 6584dc5175..3636d5317b 100644 --- a/packages/e2e-tests/src/tests/userProfile.test.ts +++ b/packages/e2e-tests/src/tests/userProfile.test.ts @@ -180,7 +180,7 @@ describe('User Profile Feature', () => { const joinCommunityModal = new JoinCommunityModal(users.user1.app.driver) const isJoinCommunityModal = await joinCommunityModal.element.isDisplayed() expect(isJoinCommunityModal).toBeTruthy() - await joinCommunityModal.typeCommunityCode(invitationCode) + await joinCommunityModal.typeCommunityInviteLink(invitationCode) await joinCommunityModal.submit() }) From 9ee9028e040f2bb82cafcc67af34a317b3309c4c Mon Sep 17 00:00:00 2001 From: Isla Koenigsknecht Date: Thu, 18 Apr 2024 17:21:52 -0400 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56600bb044..6b0b05413a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ # Fixes +* Fixes references to 'invite code' to be 'invite link' in UI ([#2441](https://github.com/TryQuiet/quiet/issues/2441)) + # Chores * Cleanup data directory at end of e2e tests