Skip to content

Commit

Permalink
Fix(2441): Change invite link to invite code in components (#2461)
Browse files Browse the repository at this point in the history
* Change invite link to invite code in components

* Update CHANGELOG.md
  • Loading branch information
Isla Koenigsknecht authored May 7, 2024
1 parent 0f3c72f commit d05fe8d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Disable spellCheck/autoCorrect on non-spelling sensitive fields like usernames and channels ([#373](https://github.com/TryQuiet/quiet/issues/373))
* Fixes issue with reconnecting to peers on resume on iOS ([#2424](https://github.com/TryQuiet/quiet/issues/2424))

* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const inviteLinkField = (name = 'name'): FieldData => {
label: '',
name,
type: 'password',
placeholder: 'Invite code',
placeholder: 'Invite link',
},
validation: {
required: FieldErrors.Required,
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/src/tests/multipleClients.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,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()
})

Expand Down Expand Up @@ -220,7 +220,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()
})

Expand Down Expand Up @@ -426,7 +426,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 () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/src/tests/userProfile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,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()
})

Expand Down

0 comments on commit d05fe8d

Please sign in to comment.