Skip to content

Commit 9e25c39

Browse files
committed
Merge branch 'upgrade-kds-550' into channel-collections-table-refactor
2 parents 26fc944 + 7ebe179 commit 9e25c39

File tree

51 files changed

+1908
-340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1908
-340
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Send reply on a new contributor pull request
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
jobs:
6+
call-workflow:
7+
name: Call shared workflow
8+
uses: learningequality/.github/.github/workflows/contributor-pr-reply.yml@main
9+
secrets:
10+
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
11+
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
12+
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Post holiday message on pull request or issue comment
2+
on:
3+
pull_request_target:
4+
types: [opened]
5+
issue_comment:
6+
types: [created]
7+
jobs:
8+
call-workflow:
9+
name: Call shared workflow
10+
uses: learningequality/.github/.github/workflows/holiday-message.yml@main
11+
secrets:
12+
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
13+
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
14+
SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL: ${{ secrets.SLACK_COMMUNITY_NOTIFICATIONS_WEBHOOK_URL }}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: Update community pull requests spreadsheet
22
on:
33
pull_request_target:
4-
types: [assigned,unassigned,opened,closed,reopened]
4+
types: [assigned, unassigned, opened, closed, reopened, edited, review_requested, review_request_removed]
55

66
jobs:
7-
call-update-spreadsheet:
7+
call-workflow:
8+
name: Call shared workflow
89
uses: learningequality/.github/.github/workflows/update-pr-spreadsheet.yml@main
910
secrets:
11+
LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }}
12+
LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }}
1013
CONTRIBUTIONS_SPREADSHEET_ID: ${{ secrets.CONTRIBUTIONS_SPREADSHEET_ID }}
1114
CONTRIBUTIONS_SHEET_NAME: ${{ secrets.CONTRIBUTIONS_SHEET_NAME }}
1215
GH_UPLOADER_GCP_SA_CREDENTIALS: ${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/EditBooleanMapModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
},
9696
data() {
9797
return {
98-
updateDescendants: false,
98+
updateDescendants: true,
9999
error: '',
100100
/**
101101
* selectedValues is an object with the following structure:

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/EditLanguageModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
return {
9393
selectedLanguage: '',
9494
searchQuery: '',
95-
updateDescendants: false,
95+
updateDescendants: true,
9696
isMultipleNodeLanguages: false,
9797
changed: false,
9898
};

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/EditTitleDescriptionModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
id: nodeId,
9999
title: title.trim(),
100100
description: description.trim(),
101+
checkComplete: true,
101102
});
102103
/* eslint-disable-next-line kolibri/vue-no-undefined-string-uses */
103104
this.$store.dispatch('showSnackbarSimple', commonStrings.$tr('changesSaved'));

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/__tests__/EditBooleanMapModal.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,11 @@ describe('EditBooleanMapModal', () => {
275275
expect(wrapper.find('[data-test="update-descendants-checkbox"]').exists()).toBeFalsy();
276276
});
277277

278-
test('should call updateContentNode on success submit if the user does not check the update descendants checkbox', async () => {
278+
test('should call updateContentNode on success submit if the user uncheck the update descendants checkbox', async () => {
279279
nodes['node1'].kind = ContentKindsNames.TOPIC;
280280

281281
const wrapper = makeWrapper({ nodeIds: ['node1'], isDescendantsUpdatable: true });
282+
wrapper.find('[data-test="update-descendants-checkbox"]').element.click();
282283
await wrapper.vm.handleSave();
283284

284285
expect(contentNodeActions.updateContentNode).toHaveBeenCalledWith(expect.anything(), {
@@ -287,11 +288,10 @@ describe('EditBooleanMapModal', () => {
287288
});
288289
});
289290

290-
test('should call updateContentNodeDescendants on success submit if the user checks the descendants checkbox', async () => {
291+
test('should call updateContentNodeDescendants on success submit if the user does not uncheck the update descendants checkbox', async () => {
291292
nodes['node1'].kind = ContentKindsNames.TOPIC;
292293

293294
const wrapper = makeWrapper({ nodeIds: ['node1'], isDescendantsUpdatable: true });
294-
wrapper.find('[data-test="update-descendants-checkbox"]').element.click();
295295
await wrapper.vm.handleSave();
296296

297297
expect(contentNodeActions.updateContentNodeDescendants).toHaveBeenCalledWith(

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/__tests__/EditLanguageModal.spec.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ describe('EditLanguageModal', () => {
220220
});
221221

222222
describe('topic nodes present', () => {
223-
it('should display the checkbox to apply change to descendants if a topic is present', () => {
224-
[wrapper] = makeWrapper(['test-en-topic', 'test-en-res']);
223+
test('should display a selected checkbox to apply change to descendants if a topic is present', () => {
224+
const [wrapper] = makeWrapper(['test-en-topic', 'test-en-res']);
225225

226226
expect(
227227
wrapper.findComponent('[data-test="update-descendants-checkbox"]').exists(),
@@ -236,30 +236,33 @@ describe('EditLanguageModal', () => {
236236
).toBeFalsy();
237237
});
238238

239-
it('should call updateContentNode with the right language on success submit if the user does not check the checkbox', async () => {
240-
[wrapper, mocks] = makeWrapper(['test-en-topic', 'test-en-res']);
239+
test('should call updateContentNodeDescendants with the right language on success submit by default', async () => {
240+
const [wrapper, mocks] = makeWrapper(['test-en-topic', 'test-en-res']);
241241

242242
await chooseLanguage(wrapper, 'es');
243243
await wrapper.vm.handleSave();
244-
await wrapper.vm.$nextTick();
245244

246-
expect(mocks.updateContentNode).toHaveBeenCalledWith({
245+
expect(mocks.updateContentNodeDescendants).toHaveBeenCalledWith({
247246
id: 'test-en-topic',
248247
language: 'es',
249248
});
250249
});
251250

252-
it('should call updateContentNodeDescendants with the right language on success submit if the user checks the checkbox', async () => {
253-
[wrapper, mocks] = makeWrapper(['test-en-topic', 'test-en-res']);
251+
test('should call updateContentNode with the right language on success submit if the user unchecks check the checkbox', async () => {
252+
const [wrapper, mocks] = makeWrapper(['test-en-topic', 'test-en-res']);
254253

255254
await chooseLanguage(wrapper, 'es');
256-
wrapper.findComponent('[data-test="update-descendants-checkbox"]').vm.$emit('change', true);
255+
256+
// Uncheck the descendants checkbox
257+
const descendantsCheckbox = wrapper.findComponent(
258+
'[data-test="update-descendants-checkbox"]',
259+
);
260+
descendantsCheckbox.vm.$emit('change', false);
257261
await wrapper.vm.$nextTick();
258-
expect(wrapper.vm.updateDescendants).toBe(true);
262+
259263
await wrapper.vm.handleSave();
260-
await wrapper.vm.$nextTick();
261264

262-
expect(mocks.updateContentNodeDescendants).toHaveBeenCalledWith({
265+
expect(mocks.updateContentNode).toHaveBeenCalledWith({
263266
id: 'test-en-topic',
264267
language: 'es',
265268
});

contentcuration/contentcuration/frontend/channelEdit/components/QuickEditModal/__tests__/EditTitleDescriptionModal.spec.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ describe('EditTitleDescriptionModal', () => {
3333
},
3434
},
3535
}),
36-
propsData: {
37-
nodeId,
38-
},
36+
propsData: { nodeId },
3937
});
4038

4139
updateContentNode = jest.spyOn(wrapper.vm, 'updateContentNode').mockImplementation(() => {});
@@ -70,7 +68,8 @@ describe('EditTitleDescriptionModal', () => {
7068
expect(updateContentNode).toHaveBeenCalledWith({
7169
id: nodeId,
7270
title: newTitle,
73-
description: newDescription,
71+
description: newDescription ?? '',
72+
checkComplete: true,
7473
});
7574
});
7675

@@ -80,11 +79,11 @@ describe('EditTitleDescriptionModal', () => {
8079
descriptionInput.vm.$emit('input', '');
8180

8281
modal.vm.$emit('submit');
83-
8482
expect(updateContentNode).toHaveBeenCalledWith({
8583
id: nodeId,
8684
title: newTitle,
8785
description: '',
86+
checkComplete: true,
8887
});
8988
});
9089

contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
slider-color="primary"
7575
>
7676
<VTab
77-
class="px-2"
77+
href="#questions"
78+
class="pa-1"
7879
exact
7980
@change="tab = 'questions'"
8081
>
@@ -86,7 +87,8 @@
8687
/>
8788
</VTab>
8889
<VTab
89-
class="px-2"
90+
href="#details"
91+
class="pa-1"
9092
exact
9193
@change="tab = 'details'"
9294
>

0 commit comments

Comments
 (0)