diff --git a/frontend/controller/router.js b/frontend/controller/router.js index f16ce7644..0f2c1ca89 100644 --- a/frontend/controller/router.js +++ b/frontend/controller/router.js @@ -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: '/' }) diff --git a/frontend/views/containers/chatroom/chat-mentions/RenderMessageWithMarkdown.js b/frontend/views/containers/chatroom/chat-mentions/RenderMessageWithMarkdown.js index bb1a3cf42..d17a02f65 100644 --- a/frontend/views/containers/chatroom/chat-mentions/RenderMessageWithMarkdown.js +++ b/frontend/views/containers/chatroom/chat-mentions/RenderMessageWithMarkdown.js @@ -37,7 +37,7 @@ const RenderMessageWithMarkdown: any = { for (const [key, value] of url.searchParams) { query[key] = value } - routerOptions.route = { path, query } + routerOptions.route = { path, query, hash: url.hash } routerOptions.href = this.$router.resolve(routerOptions.route).href routerOptions.isInAppRouter = true } diff --git a/frontend/views/pages/Join.vue b/frontend/views/pages/Join.vue index ace156c61..d41359fa8 100644 --- a/frontend/views/pages/Join.vue +++ b/frontend/views/pages/Join.vue @@ -83,7 +83,7 @@ export default ({ pageStatus: 'LOADING', invitation: {}, groupInfo: {}, - query: null + hash: null } } }, @@ -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() diff --git a/test/cypress/integration/group-proposals.spec.js b/test/cypress/integration/group-proposals.spec.js index f34e75c15..c4099575d 100644 --- a/test/cypress/integration/group-proposals.spec.js +++ b/test/cypress/integration/group-proposals.spec.js @@ -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') }) @@ -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')