Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(2441): Change invite link to invite code in components #2461

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 @@ -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()
})

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

Expand Down Expand Up @@ -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 () => {
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 @@ -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()
})

Expand Down
Loading