From 85d65225bd2085a5a0efbddd982b5ef1e9de1284 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 6 Mar 2024 14:14:38 +0100 Subject: [PATCH] feat: Rename circles to teams in a few more places Signed-off-by: Jonas --- DEVELOPING.md | 12 +++---- README.md | 4 +-- appinfo/info.xml | 4 +-- cypress/e2e/apps.spec.js | 4 +-- cypress/e2e/circle-with-group.spec.js | 6 ++-- cypress/e2e/collective.spec.js | 30 ++++++++-------- cypress/e2e/collectives-trash.spec.js | 2 +- cypress/support/commands.js | 4 +-- docs/content/_index.md | 2 +- docs/content/administration/_index.md | 12 +++---- docs/content/usage/_index.md | 4 +-- lib/Command/ExpirePageVersions.php | 2 +- lib/Command/IndexCollectives.php | 2 +- lib/Service/CircleHelper.php | 6 ++-- lib/Service/CollectiveService.php | 6 ++-- src/components/Icon/CirclesIcon.vue | 36 ------------------- src/components/Icon/TeamsIcon.vue | 36 +++++++++++++++++++ src/components/Member/MemberPicker.vue | 4 +-- src/components/Nav/CollectiveSettings.vue | 6 ++-- src/components/Nav/NewCollectiveModal.vue | 10 +++--- src/components/Navigation.vue | 2 +- src/store/circles.js | 38 ++++++++++---------- src/store/collectives.js | 4 +-- tests/Unit/Service/CollectiveServiceTest.php | 10 +++--- 24 files changed, 123 insertions(+), 123 deletions(-) delete mode 100644 src/components/Icon/CirclesIcon.vue create mode 100644 src/components/Icon/TeamsIcon.vue diff --git a/DEVELOPING.md b/DEVELOPING.md index f691cbdcb..f9132c62f 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -10,7 +10,7 @@ The following tools are required for app development: * php `dom` and `sqlite` extension * composer for installing php dependencies * nextcloud server for running php tests -* circles app for passing some php tests that depend on it +* teams app for passing some php tests that depend on it * gh, the Github console command, for releasing to Github ## Developer installation @@ -18,7 +18,7 @@ The following tools are required for app development: To install the app manually: 0. Install a [development setup](https://docs.nextcloud.com/server/latest/developer_manual/app_development/tutorial.html#setup) of nextcloud. -1. Install the circles, text and viewer apps by cloning them to the `apps` folder +1. Install the teams, text and viewer apps by cloning them to the `apps` folder 2. Clone this repository into the `apps` folder of your Nextcloud 3. Install build tools and dependencies by running `make setup-dev` 4. Compile NodeJS assets by running `make build` @@ -50,7 +50,7 @@ available in the `nextcloud-docker-dev` repo. ### Development environment Development environments often do not use proper hostnames and are not -using ssl. In order to make the circles API work in such environments, +using ssl. In order to make the teams API work in such environments, a few configuration settings need to be adjusted. You can do so by running the following commands on the nextcloud server: @@ -84,10 +84,10 @@ we want the collective pages to be owned and maintained by the collective. That's why the Collectives app implements an own storage and uses mountpoints to mount the collective folders to members home directories. -## Development Background: Circles integration +## Development Background: Teams integration -Every collective is bound to a circle. Currently, the app automatically creates -a new secret circle with every new collective. +Every collective is bound to a team. Currently, the app automatically creates +a new secret team with every new collective. ## Prepare a release diff --git a/README.md b/README.md index dca1fbb4b..deaea893b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Collectives is a Nextcloud App for activist and community projects to organize together. Come and gather in collectives to build shared knowledge. * 👥 **Collective and non-hierarchical workflow by heart**: Collectives are - tied to a [Nextcloud Circle](https://github.com/nextcloud/circles) and + tied to a [Nextcloud Team](https://github.com/nextcloud/circles) and owned by the collective. * 📝 **Collaborative page editing** like known from Etherpad thanks to the [Text app](https://github.com/nextcloud/text). @@ -17,7 +17,7 @@ organize together. Come and gather in collectives to build shared knowledge. ## Installation In your Nextcloud instance, simply navigate to **»Apps«**, find the -**»Circles«** and **»Collectives«** apps and enable them. +**»Teams«** and **»Collectives«** apps and enable them. ## Requirements diff --git a/appinfo/info.xml b/appinfo/info.xml index 7b13b177f..f2123e8e1 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,7 +9,7 @@ Collectives is a Nextcloud App for activist and community projects to organize t Come and gather in collectives to build shared knowledge. * 👥 **Collective and non-hierarchical workflow by heart**: Collectives are - tied to a [Nextcloud Circle](https://github.com/nextcloud/circles) and + tied to a [Nextcloud Team](https://github.com/nextcloud/circles) and owned by the collective. * 📝 **Collaborative page editing** like known from Etherpad thanks to the [Text app](https://github.com/nextcloud/text). @@ -19,7 +19,7 @@ Come and gather in collectives to build shared knowledge. ## Installation In your Nextcloud instance, simply navigate to **»Apps«**, find the -**»Circles«** and **»Collectives«** apps and enable them. +**»Teams«** and **»Collectives«** apps and enable them. ]]> 2.10.0 diff --git a/cypress/e2e/apps.spec.js b/cypress/e2e/apps.spec.js index 35e349d7e..a8e737ccc 100644 --- a/cypress/e2e/apps.spec.js +++ b/cypress/e2e/apps.spec.js @@ -33,12 +33,12 @@ describe('The apps', function() { /** * Regression test for #110 and #117. - * Without the circles app the whole server became unresponsive. + * Without the teams app the whole server became unresponsive. * If we have this regression this test will not only fail * it will also break all following tests. * */ - describe('Disabled circles app does not break files view', function() { + describe('Disabled teams app does not break files view', function() { before(function() { cy.loginAs('admin') diff --git a/cypress/e2e/circle-with-group.spec.js b/cypress/e2e/circle-with-group.spec.js index e45bcc8ad..660ea3e2f 100644 --- a/cypress/e2e/circle-with-group.spec.js +++ b/cypress/e2e/circle-with-group.spec.js @@ -22,14 +22,14 @@ /** * Regression test for #121. - * When user is not a direct member of a circle, - * but is a member of a group linked to the circle, + * When user is not a direct member of a team, + * but is a member of a group linked to the team, * then access to the collective only works half-way: * You can see the collective on the list, * but you can't see a list of pages or access any page. * */ -describe('Pages are accessible via group membership to circle', function() { +describe('Pages are accessible via group membership to team', function() { before(function() { cy.loginAs('jane') cy.deleteAndSeedCollective('Group Collective') diff --git a/cypress/e2e/collective.spec.js b/cypress/e2e/collective.spec.js index dbef99654..eb77d2001 100644 --- a/cypress/e2e/collective.spec.js +++ b/cypress/e2e/collective.spec.js @@ -25,17 +25,17 @@ describe('Collective', function() { before(function() { cy.loginAs('bob') - cy.deleteCollective('Preexisting Circle') + cy.deleteCollective('Preexisting Team') cy.deleteCollective('History Club') cy.deleteCollective(specialCollective) cy.deleteAndSeedCollective('Preexisting Collective') cy.circleFind('Preexisting Collective') .circleAddMember('jane') - cy.seedCircle('Preexisting Circle') + cy.seedCircle('Preexisting Team') cy.seedCircle('History Club', { visible: true, open: true }) cy.loginAs('jane') - cy.deleteCollective('Foreign Circle') - cy.seedCircle('Foreign Circle', { visible: true, open: true }) + cy.deleteCollective('Foreign Team') + cy.seedCircle('Foreign Team', { visible: true, open: true }) }) describe('in the files app', function() { @@ -57,10 +57,10 @@ describe('Collective', function() { }) describe('name conflicts', function() { - it('Reports existing circle', function() { + it('Reports existing team', function() { cy.loginAs('bob') cy.visit('apps/collectives') - cy.createCollective('Foreign Circle') + cy.createCollective('Foreign Team') cy.get('.modal-collective-name-error').should('contain', 'A collective with this name already exists') }) it('Reports existing collective', function() { @@ -71,12 +71,12 @@ describe('Collective', function() { cy.get('.toast-warning').should('contain', 'Could not create the collective') cy.get('.toast-warning').should('contain', 'Collective already exists') }) - it('creates collectives by picking circle', + it('creates collectives by picking team', function() { cy.loginAs('bob') cy.visit('apps/collectives') cy.get('button').contains('New collective').click() - cy.get('button span.circles-icon').click() + cy.get('button span.teams-icon').click() // cy.get('.circle-selector ul').should('not.contain', 'Foreign') cy.get('.circle-selector li [title*=History]').click() cy.get('button').contains('Add members').click() @@ -84,27 +84,27 @@ describe('Collective', function() { cy.get('#titleform input').invoke('val').should('contain', 'History Club') cy.get('.toast-info').should('contain', - 'Created collective "History Club" for existing circle.', + 'Created collective "History Club" for existing team.', ) }) - it('collectives of visible circles only show for members', + it('collectives of visible teams only show for members', function() { cy.loginAs('jane') cy.visit('apps/collectives') cy.get('.app-navigation-entry').should('not.contain', 'History Club') }) - it('creates collectives for admins of corresponding circle', + it('creates collectives for admins of corresponding team', function() { cy.loginAs('bob') cy.visit('apps/collectives') - cy.createCollective('Preexisting Circle') - cy.get('#titleform input').invoke('val').should('contain', 'Preexisting Circle') + cy.createCollective('Preexisting Team') + cy.get('#titleform input').invoke('val').should('contain', 'Preexisting Team') cy.get('.toast-info').should('contain', - 'Created collective "Preexisting Circle" for existing circle.', + 'Created collective "Preexisting Team" for existing team.', ) }) after(function() { - cy.deleteCollective('Preexisting Circle') + cy.deleteCollective('Preexisting Team') cy.deleteCollective('History Club') }) }) diff --git a/cypress/e2e/collectives-trash.spec.js b/cypress/e2e/collectives-trash.spec.js index f90fede89..9a11ba721 100644 --- a/cypress/e2e/collectives-trash.spec.js +++ b/cypress/e2e/collectives-trash.spec.js @@ -64,7 +64,7 @@ describe('Collectives trash', function() { cy.get('.collectives_trash_list_item') .should('contain', 'Delete me') }) - it('Allows deleting the collective and circle from trash', function() { + it('Allows deleting the collective and team from trash', function() { cy.loginAs('bob') cy.visit('apps/collectives') cy.get('#collectives-trash') diff --git a/cypress/support/commands.js b/cypress/support/commands.js index c8c08a3ac..45f1be105 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -353,7 +353,7 @@ Cypress.Commands.add('uploadContent', (path, content, mimetype = 'text/markdown' }) /** - * Create a circle (optionally with given config) + * Create a team (optionally with given config) */ Cypress.Commands.add('seedCircle', (name, config = null) => { Cypress.log() @@ -397,7 +397,7 @@ Cypress.Commands.add('circleFind', (name) => { }) /** - * Add someone to a circle + * Add someone to a team */ Cypress.Commands.add('circleAddMember', { prevSubject: true }, diff --git a/docs/content/_index.md b/docs/content/_index.md index 5a5772819..2c25978f4 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -13,7 +13,7 @@ organize together. Come and gather in collectives to build shared knowledge. ## Features * 👥 **Collective and non-hierarchical workflow by heart**: Collectives are - tied to a [Nextcloud Circle](https://github.com/nextcloud/circles) and + tied to a [Nextcloud Team](https://github.com/nextcloud/circles) and owned by the collective. * 📝 **Collaborative page editing** like known from Etherpad thanks to the [Text app](https://github.com/nextcloud/text). diff --git a/docs/content/administration/_index.md b/docs/content/administration/_index.md index fa54d175d..65063ac8d 100644 --- a/docs/content/administration/_index.md +++ b/docs/content/administration/_index.md @@ -9,7 +9,7 @@ alwaysopen = false This app requires the following apps to be enabled: -* [**Circles**](https://apps.nextcloud.com/apps/circles) +* [**Teams**](https://apps.nextcloud.com/apps/circles) * [**Text**](https://apps.nextcloud.com/apps/text) * **Viewer** * **files_versions** @@ -33,7 +33,7 @@ limitations](https://docs.nextcloud.com/server/latest/admin_manual/configuration ## Collectives and guest users In order to allow guest users (as provided by the [guests](https://github.com/nextcloud/guests/) -app) to access collectives, add the Collectives and Circles apps to the list +app) to access collectives, add the Collectives and Teams apps to the list of enabled apps for guest users in admin settings. Please note that this enables guest users to create new collectives. @@ -70,9 +70,9 @@ collectives directory instead. ### Allow for groups in your collectives -You can configure the circles app to allow adding groups to circles. -Since the collectives app relies on the circles app for user management +You can configure the teams app to allow adding groups to teams. +Since the collectives app relies on the teams app for user management this also allows adding entire groups to collectives. -Keep in mind thought that in contrast to circles -groups can only be managed by server admins. +Keep in mind thought that in contrast to teams, groups can only be +managed by server admins. diff --git a/docs/content/usage/_index.md b/docs/content/usage/_index.md index 6fc9169ed..4bd2ffdf5 100644 --- a/docs/content/usage/_index.md +++ b/docs/content/usage/_index.md @@ -47,8 +47,8 @@ to adjust it to your collectives needs. Follow the "manage members" link that you find in the action menu inside the collectives list on the left to manage members. -If your Nextcloud instance is configured to allow groups in circles -you can even add entire groups to your collectives. +If your Nextcloud instance is configured to allow groups in teams you +can even add entire groups to your collectives. ## Also good to know diff --git a/lib/Command/ExpirePageVersions.php b/lib/Command/ExpirePageVersions.php index 0c032935d..b5e818e54 100644 --- a/lib/Command/ExpirePageVersions.php +++ b/lib/Command/ExpirePageVersions.php @@ -36,7 +36,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 0; } catch (MissingDependencyException $e) { $output->writeln(''); - $output->writeln(' Looks like the circles app is not active. '); + $output->writeln(' Looks like the teams app is not active. '); $output->writeln(' Please enable it: '); $output->writeln(' occ app:enable circles '); $output->writeln($e->getMessage()); diff --git a/lib/Command/IndexCollectives.php b/lib/Command/IndexCollectives.php index 0c2d34d0f..506dd5b9d 100644 --- a/lib/Command/IndexCollectives.php +++ b/lib/Command/IndexCollectives.php @@ -48,7 +48,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('Creating index for ' . $circleName . ' ... '); $this->searchService->indexCollective($collective); } catch (MissingDependencyException|NotFoundException|NotPermittedException) { - $output->writeln("Failed to find circle associated with collective with ID={$collective->getId()}"); + $output->writeln("Failed to find team associated with collective with ID={$collective->getId()}"); return 1; } catch (FileSearchException) { $output->writeln('Failed to save the indices to the collectives folder.'); diff --git a/lib/Service/CircleHelper.php b/lib/Service/CircleHelper.php index 801bb1bd2..4532d40ee 100644 --- a/lib/Service/CircleHelper.php +++ b/lib/Service/CircleHelper.php @@ -26,7 +26,7 @@ public function __construct(ContainerInterface $appContainer) { try { $this->circlesManager = $appContainer->get(CirclesManager::class); } catch (QueryException|AutoloadNotAllowedException $e) { - // Could not instantiate - probably circles app is disabled + // Could not instantiate - probably teams app is disabled $this->dependencyInjectionError = $e->getMessage(); } } @@ -169,7 +169,7 @@ private function existsCircle(string $name): bool { public function createCircle(string $name, string $userId): Circle { try { if ($this->existsCircle($name)) { - throw new CircleExistsException('A circle with that name exists'); + throw new CircleExistsException('A team with that name exists'); } $this->startSession($userId); $circle = $this->circlesManager->createCircle($name, null, false, false); @@ -221,7 +221,7 @@ public function unflagCircleAsAppManaged(string $circleId): void { */ public function destroyCircle(string $circleId, string $userId): void { if (!$this->isOwner($circleId, $userId)) { - throw new NotPermittedException('Not allowed to destroy circle ' . $circleId); + throw new NotPermittedException('Not allowed to destroy team ' . $circleId); } try { $this->unflagCircleAsAppManaged($circleId); diff --git a/lib/Service/CollectiveService.php b/lib/Service/CollectiveService.php index f3fb67393..1e90584fb 100644 --- a/lib/Service/CollectiveService.php +++ b/lib/Service/CollectiveService.php @@ -146,19 +146,19 @@ public function createCollective(string $userId, throw new UnprocessableEntityException('Empty collective name is not allowed'); } - // Create a new circle + // Create a new team $message = ''; try { $circle = $this->circleHelper->createCircle($safeName, $userId); } catch (CircleExistsException $e) { $circle = $this->circleHelper->findCircle($safeName, $userId, Member::LEVEL_ADMIN); if ($circle === null) { - // We don't have admin access to the circle + // We don't have admin access to the team throw $e; } $this->circleHelper->flagCircleAsAppManaged($circle->getSingleId()); $message = $this->l10n->t( - 'Created collective "%s" for existing circle.', + 'Created collective "%s" for existing team.', [$safeName] ); } diff --git a/src/components/Icon/CirclesIcon.vue b/src/components/Icon/CirclesIcon.vue deleted file mode 100644 index 35b911fba..000000000 --- a/src/components/Icon/CirclesIcon.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/src/components/Icon/TeamsIcon.vue b/src/components/Icon/TeamsIcon.vue new file mode 100644 index 000000000..ee9737f4d --- /dev/null +++ b/src/components/Icon/TeamsIcon.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/Member/MemberPicker.vue b/src/components/Member/MemberPicker.vue index 77de1a234..bd76dcac6 100644 --- a/src/components/Member/MemberPicker.vue +++ b/src/components/Member/MemberPicker.vue @@ -165,7 +165,7 @@ export default { }, 250), async fetchSearchResults() { - // Search for users, groups and circles + // Search for users, groups and teams const searchShareTypes = [shareTypes.TYPE_USER, shareTypes.TYPE_GROUP, shareTypes.TYPE_CIRCLE] try { @@ -187,7 +187,7 @@ export default { } }, - // Filter out circle itself and current members + // Filter out team itself and current members filterSearchResults(item) { return !this.currentMembers.find(m => { return (item.source === 'circlesx' && item.id === this.circleId) diff --git a/src/components/Nav/CollectiveSettings.vue b/src/components/Nav/CollectiveSettings.vue index 2c9a00c2c..131747b01 100644 --- a/src/components/Nav/CollectiveSettings.vue +++ b/src/components/Nav/CollectiveSettings.vue @@ -307,7 +307,7 @@ export default { }, /** - * Rename circle and reload collective + * Rename team and reload collective */ async renameCollective() { // Ignore rename to same name @@ -320,7 +320,7 @@ export default { // If currentCollective is renamed, we need to update the router path later const redirect = this.collectiveParam === this.collective.name - // Wait for circle rename (also patches store with updated collective and pages) + // Wait for team rename (also patches store with updated collective and pages) const collective = { ...this.collective } collective.name = this.newCollectiveName await this.dispatchRenameCircle(collective).then(() => { @@ -331,7 +331,7 @@ export default { throw error }) - // Name might have changed (due to circle name conflicts), update input field + // Name might have changed (due to team name conflicts), update input field this.newCollectiveName = this.collective.name // Push new router path if currentCollective was renamed diff --git a/src/components/Nav/NewCollectiveModal.vue b/src/components/Nav/NewCollectiveModal.vue index 5d9ed9acd..deb69c297 100644 --- a/src/components/Nav/NewCollectiveModal.vue +++ b/src/components/Nav/NewCollectiveModal.vue @@ -37,7 +37,7 @@ type="tertiary" @click.stop.prevent="startSelectCircle"> { - if (e.response?.data === 'A circle with that name exists') { + if (e.response?.data === 'A team with that name exists') { this.nameExists = this.newCollectiveName this.state = 0 } else { diff --git a/src/components/Navigation.vue b/src/components/Navigation.vue index 39a439cf1..a7e640ab2 100644 --- a/src/components/Navigation.vue +++ b/src/components/Navigation.vue @@ -122,7 +122,7 @@ export default { * Delete a collective with the given name from trash * * @param {object} collective Properties of the collective - * @param {boolean} circle Whether to delete the circle as well + * @param {boolean} circle Whether to delete the team as well * @return {Promise} */ deleteCollective(collective, circle) { diff --git a/src/store/circles.js b/src/store/circles.js index 6738a8569..28f3b2ada 100644 --- a/src/store/circles.js +++ b/src/store/circles.js @@ -111,7 +111,7 @@ export default { actions: { /** - * Get list of all circles + * Get list of all teams * * @param {object} store the vuex store * @param {Function} store.commit commit changes @@ -126,7 +126,7 @@ export default { }, /** - * Rename a circle + * Rename a team * * @param {object} store the vuex store * @param {Function} store.commit commit changes @@ -150,11 +150,11 @@ export default { }, /** - * Get members of a circle + * Get members of a team * * @param {object} store the vuex store * @param {Function} store.commit commit changes - * @param {string} circleId ID of the circle + * @param {string} circleId ID of the team */ async [GET_CIRCLE_MEMBERS]({ commit }, circleId) { const response = await axios.get(generateOcsUrl(`apps/circles/circles/${circleId}/members`)) @@ -162,11 +162,11 @@ export default { }, /** - * Add a single member to a circle + * Add a single member to a team * * @param {object} _ the vuex store * @param {object} params the params object - * @param {string} params.circleId ID of the circle + * @param {string} params.circleId ID of the team * @param {string} params.userId User ID of the member to be added * @param {number} params.type Type of the member to be added */ @@ -175,16 +175,16 @@ export default { generateOcsUrl('apps/circles/circles/' + circleId + '/members'), { userId, type }, ) - console.debug('Added member to circle', circleId, response.data.ocs.data) + console.debug('Added member to team', circleId, response.data.ocs.data) return response.data.ocs.data }, /** - * Add multiple members to a circle + * Add multiple members to a team * * @param {object} _ the vuex store * @param {object} params the params object - * @param {string} params.circleId ID of the circle + * @param {string} params.circleId ID of the team * @param {object} params.members Object with members to be added */ async [ADD_MEMBERS_TO_CIRCLE](_, { circleId, members }) { @@ -192,33 +192,33 @@ export default { generateOcsUrl('apps/circles/circles/' + circleId + '/members/multi'), { members }, ) - console.debug('Added members to circle', circleId, response.data.ocs.data) + console.debug('Added members to team', circleId, response.data.ocs.data) return response.data.ocs.data }, /** - * Remove a single member to a circle + * Remove a single member to a team * * @param {object} _ the vuex store * @param {object} params the params object - * @param {string} params.circleId ID of the circle - * @param {string} params.memberId Circle member ID of the member to be removed + * @param {string} params.circleId ID of the team + * @param {string} params.memberId Team member ID of the member to be removed */ async [REMOVE_MEMBER_FROM_CIRCLE](_, { circleId, memberId }) { const response = await axios.delete( generateOcsUrl('apps/circles/circles/' + circleId + '/members/' + memberId), ) - console.debug('Removed member from circle', circleId, response.data.ocs.data) + console.debug('Removed member from team', circleId, response.data.ocs.data) return response.data.ocs.data }, /** - * Change a member level in a circle + * Change a member level in a team * * @param {object} _ the vuex store * @param {object} params the params object - * @param {string} params.circleId ID of the circle - * @param {string} params.memberId Circle member ID of the member to be changed + * @param {string} params.circleId ID of the team + * @param {string} params.memberId Team member ID of the member to be changed * @param {number} params.level Level of the member to be changed */ async [CHANGE_CIRCLE_MEMBER_LEVEL](_, { circleId, memberId, level }) { @@ -226,12 +226,12 @@ export default { generateOcsUrl('apps/circles/circles/' + circleId + '/members/' + memberId + '/level'), { level }, ) - console.debug('Changed level of member from circle', circleId, response.data.ocs.data) + console.debug('Changed level of member from team', circleId, response.data.ocs.data) return response.data.ocs.data }, /** - * Leave a circle with given collective + * Leave a team with given collective * * @param {object} store the vuex store * @param {Function} store.commit commit changes diff --git a/src/store/collectives.js b/src/store/collectives.js index 6b21673a6..38c1f4f41 100644 --- a/src/store/collectives.js +++ b/src/store/collectives.js @@ -339,9 +339,9 @@ export default { * * @param {object} store the vuex store * @param {Function} store.commit commit changes - * @param {object} collective the collective with id and circle + * @param {object} collective the collective with id and team * @param {number} collective.id ID of the collective to be trashed - * @param {boolean} collective.circle Whether to delete the circle as well + * @param {boolean} collective.circle Whether to delete the team as well */ async [DELETE_COLLECTIVE]({ commit }, { id, circle }) { const response = await api.deleteCollective(id, circle) diff --git a/tests/Unit/Service/CollectiveServiceTest.php b/tests/Unit/Service/CollectiveServiceTest.php index c4988f617..876fdb41a 100644 --- a/tests/Unit/Service/CollectiveServiceTest.php +++ b/tests/Unit/Service/CollectiveServiceTest.php @@ -131,11 +131,11 @@ public function testCreateWithEmptyName(): void { public function testCreateWithExistingCircle(): void { $this->circleHelper->method('createCircle') - ->willThrowException(new CircleExistsException('A circle with that name exists')); + ->willThrowException(new CircleExistsException('A team with that name exists')); $this->circleHelper->method('findCircle') ->willReturn(null); $this->expectException(CircleExistsException::class); - $this->expectExceptionMessage('A circle with that name exists'); + $this->expectExceptionMessage('A team with that name exists'); $this->service->createCollective($this->userId, 'de', 'taken'); } @@ -150,7 +150,7 @@ public function testCreateForOwnCircle(): void { $collective = new Collective(); $collective->setId(123); $this->circleHelper->method('createCircle') - ->willThrowException(new CircleExistsException('A circle with that name exists')); + ->willThrowException(new CircleExistsException('A team with that name exists')); $this->circleHelper->method('findCircle') ->willReturn($circle); $this->collectiveMapper->method('findByCircleId') @@ -164,10 +164,10 @@ public function testCreateForOwnCircle(): void { $this->l10n ->expects(self::once()) ->method('t') - ->willReturn('Created collective "own" for existing circle.'); + ->willReturn('Created collective "own" for existing team.'); [$collective, $info] = $this->service->createCollective($this->userId, 'de', 'own'); self::assertIsCallable([$collective, 'jsonSerialize']); - self::assertEquals('Created collective "own" for existing circle.', $info); + self::assertEquals('Created collective "own" for existing team.', $info); } public function testCreate(): void {