fix: some announcement wording
fixes VICE-4449 flag=discussion_create Test plan: - Create and edit announcements - Wording should not be messed up - must respond option should be gone Change-Id: I4a747f03f331d35419854e1ab66dd69bec31fb17 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/354309 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Dora Csolakov <dora.csolakov@instructure.com> Reviewed-by: Ádám Molnár <adam.molnar@instructure.com> Product-Review: Tamás Balogh <tamas.balogh@instructure.com>
This commit is contained in:
parent
a3c96d4b25
commit
a90d0c554d
|
@ -1006,7 +1006,6 @@ describe "discussions" do
|
|||
get "/courses/#{course.id}/discussion_topics/#{@announcement_all_options.id}/edit"
|
||||
|
||||
expect(f("input[value='enable-participants-commenting']").selected?).to be_truthy
|
||||
expect(f("input[value='must-respond-before-viewing-replies']").selected?).to be_truthy
|
||||
expect(f("input[value='allow-liking']").selected?).to be_truthy
|
||||
expect(f("input[value='only-graders-can-like']").selected?).to be_truthy
|
||||
expect(f("input[value='enable-podcast-feed']").selected?).to be_truthy
|
||||
|
@ -1021,7 +1020,6 @@ describe "discussions" do
|
|||
get "/courses/#{course.id}/discussion_topics/#{@announcement_no_options.id}/edit"
|
||||
|
||||
expect(f("input[value='enable-participants-commenting']").selected?).to be_falsey
|
||||
expect(f("input[value='must-respond-before-viewing-replies']").selected?).to be_falsey
|
||||
expect(f("input[value='allow-liking']").selected?).to be_falsey
|
||||
expect(f("input[value='enable-podcast-feed']").selected?).to be_falsey
|
||||
end
|
||||
|
|
|
@ -1051,7 +1051,6 @@ describe "discussions" do
|
|||
get "/courses/#{course.id}/discussion_topics/new?is_announcement=true"
|
||||
# Expect certain field to be present
|
||||
expect(f("body")).to contain_jqcss "input[value='enable-participants-commenting']"
|
||||
expect(f("body")).to contain_jqcss "input[value='must-respond-before-viewing-replies']"
|
||||
expect(f("body")).to contain_jqcss "input[value='enable-podcast-feed']"
|
||||
expect(f("body")).to contain_jqcss "input[value='allow-liking']"
|
||||
expect(f("body")).to contain_jqcss "div[data-testid='non-graded-date-options']"
|
||||
|
|
|
@ -145,7 +145,7 @@ function DiscussionTopicForm({
|
|||
key: 'announcement-course-unpublished-alert',
|
||||
variant: 'warning',
|
||||
text: I18n.t(
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Delay Posting option and set to publish on a future date.'
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Available from option and set to publish on a future date.'
|
||||
),
|
||||
}
|
||||
} else {
|
||||
|
@ -884,7 +884,7 @@ function DiscussionTopicForm({
|
|||
/>
|
||||
)}
|
||||
|
||||
{!isGroupContext && (
|
||||
{!isGroupContext && !isAnnouncement && (
|
||||
<Checkbox
|
||||
data-testid="require-initial-post-checkbox"
|
||||
label={I18n.t(
|
||||
|
@ -893,7 +893,6 @@ function DiscussionTopicForm({
|
|||
value="must-respond-before-viewing-replies"
|
||||
checked={requireInitialPost}
|
||||
onChange={() => setRequireInitialPost(!requireInitialPost)}
|
||||
disabled={!(isAnnouncement === false || (isAnnouncement && !locked))}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ describe('DiscussionTopicForm', () => {
|
|||
expect(document.queryByTestId('section-select')).toBeTruthy()
|
||||
expect(document.queryByLabelText('Allow Participants to Comment')).toBeInTheDocument()
|
||||
expect(document.queryByLabelText('Disallow threaded replies')).toBeInTheDocument()
|
||||
expect(document.queryByTestId('require-initial-post-checkbox')).toBeTruthy()
|
||||
expect(document.queryByLabelText('Enable podcast feed')).toBeInTheDocument()
|
||||
expect(document.queryByLabelText('Allow liking')).toBeInTheDocument()
|
||||
expect(document.queryByTestId('non-graded-date-options')).toBeTruthy()
|
||||
|
@ -145,6 +144,7 @@ describe('DiscussionTopicForm', () => {
|
|||
expect(document.queryAllByText('Until')).toBeTruthy()
|
||||
|
||||
// Hides discussion only options
|
||||
expect(document.queryByTestId('require-initial-post-checkbox')).not.toBeInTheDocument()
|
||||
expect(document.queryByLabelText('Add to student to-do')).not.toBeInTheDocument()
|
||||
expect(document.queryByText('Anonymous Discussion')).not.toBeTruthy()
|
||||
expect(document.queryByTestId('graded-checkbox')).not.toBeTruthy()
|
||||
|
@ -251,7 +251,7 @@ describe('DiscussionTopicForm', () => {
|
|||
const document = setup()
|
||||
expect(
|
||||
document.getByText(
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Delay Posting option and set to publish on a future date.'
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Available from option and set to publish on a future date.'
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
@ -266,7 +266,7 @@ describe('DiscussionTopicForm', () => {
|
|||
const document = setup()
|
||||
expect(
|
||||
document.getByText(
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Delay Posting option and set to publish on a future date.'
|
||||
'Notifications will not be sent retroactively for announcements created before publishing your course or before the course start date. You may consider using the Available from option and set to publish on a future date.'
|
||||
)
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue