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 error that invite link doesn't work inside chat #2246

Merged
merged 27 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f9f2c60
chore: added a small update and Cypress try
Silver-IT Jul 19, 2024
4991725
chore: added comment and Cypress retry
Silver-IT Jul 19, 2024
4eacdaf
chore: check if group-chat passes three times in a row
Silver-IT Jul 19, 2024
fec63dd
chore: group-chat passes 4 times in a row
Silver-IT Jul 19, 2024
5afb858
chore: 5 times pass in a row means it fixes the heisenbug? maybe it's…
Silver-IT Jul 19, 2024
fb2fdcf
fix: error in invitelink
Silver-IT Jul 22, 2024
f266872
feat: update Cypress according to the updated invitelink format
Silver-IT Jul 22, 2024
53a035c
fix: cypress errors according to the changes of inviteLink format
Silver-IT Jul 23, 2024
073ed15
chore: added comment and Cypress retry
Silver-IT Jul 23, 2024
acf6cb9
chore: updated comment and Cypress retry
Silver-IT Jul 23, 2024
77df8ce
fix: added cy.wait and Cypress try
Silver-IT Jul 23, 2024
7b189d9
chore: added comment and Cypress retry
Silver-IT Jul 23, 2024
a1aa3ec
fix: removing cy.wait
Silver-IT Jul 23, 2024
65ae37c
chore: updated comment and check Cypress passed 2 times in a row
Silver-IT Jul 23, 2024
cde5c76
chore: really passes 3 times in a row?
Silver-IT Jul 23, 2024
57d7c2e
Merge branch '2226-heisenbug-in-group-chatspecjs-more-persistent-one'…
Silver-IT Jul 23, 2024
a4a9879
chore: updated comment and Cypress retry
Silver-IT Jul 23, 2024
60ffd1c
chore: cypress retry
Silver-IT Jul 23, 2024
6988a2d
chore: Cypress retry
Silver-IT Jul 23, 2024
268837d
Merge branch 'master' into 2240-invite-links-not-working-reliably
Silver-IT Jul 23, 2024
e220d33
chore: Cypress retry
Silver-IT Jul 23, 2024
7d35a2b
chore: Cypress retry
Silver-IT Jul 23, 2024
c5ba7fc
chore: Cypress retry
Silver-IT Jul 23, 2024
9ae5dc3
fix: heisenbug in group-proposal
Silver-IT Jul 24, 2024
93d4c32
feat: changed query to hash for security problem
Silver-IT Jul 25, 2024
64c7ff1
fix: reverted the format of hash param
Silver-IT Jul 25, 2024
6330f3d
fix: eslint error
Silver-IT Jul 25, 2024
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: 1 addition & 1 deletion frontend/controller/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const loginGuard = {

const inviteGuard = {
guard: (to, from) => {
// ex: http://localhost:8000/app/join#groupId=21XWnNRE7vggw4ngGqmQz5D4vAwPYqcREhEkGop2mYZTKVkx8H&secret=5157
// ex: http://localhost:8000/app/join#?groupId=21XWnNRE7vggw4ngGqmQz5D4vAwPYqcREhEkGop2mYZTKVkx8H&secret=5157
return !(to.hash.includes('groupId=') && to.hash.includes('secret='))
},
redirect: (to, from) => ({ path: '/' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const RenderMessageWithMarkdown: any = {
query[key] = value
}
routerOptions.route = { path, query }
if (url.hash) {
routerOptions.route['hash'] = url.hash
}
routerOptions.href = this.$router.resolve(routerOptions.route).href
routerOptions.isInAppRouter = true
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/views/pages/Join.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default ({
pageStatus: 'LOADING',
invitation: {},
groupInfo: {},
query: null
hash: null
}
}
},
Expand All @@ -102,7 +102,7 @@ export default ({
}
},
mounted () {
// For some reason in some Cypress tests it loses the route query when initialized is called
// For some reason in some Cypress tests it loses the route hash when initialized is called
this.ephemeral.hash = new URLSearchParams(this.$route.hash.slice(1))
if (syncFinished || !this.ourIdentityContractId) {
this.initialize()
Expand Down
5 changes: 5 additions & 0 deletions test/cypress/integration/group-proposals.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ describe('Proposals - Add members', () => {
cy.getByDT('openAllProposals').click()
cy.get('[data-test="modal"] > .c-container .c-title').should('contain', 'Archived proposals')
cy.getByDT('modal').within(() => {
// NOTE: this is to wait until all of the 4 proposals are loaded inside the modal
cy.get('.c-container > .c-header-info .has-text-1').should('contain', '4 proposals')
assertInvitationLinkFor(2, 'user4')
assertInvitationLinkFor(1, 'user6')
})
Expand Down Expand Up @@ -408,6 +410,9 @@ describe('Proposals - Add members', () => {
cy.getByDT('openAllProposals').click()
cy.get('[data-test="modal"] > .c-container .c-title').should('contain', 'Archived proposals')
cy.getByDT('modal').within(() => {
// NOTE: this is to wait until all of the 5 proposals are loaded inside the modal
cy.get('.c-container > .c-header-info .has-text-1').should('contain', '5 proposals')

getProposalItems().eq(2).within(() => {
cy.getByDT('title', 'p').should('contain', 'You proposed')
cy.getByDT('statusDescription')
Expand Down
Loading