Merge pull request #19621 from Scroody/poll-answer-verification
Client: Poll answer verification
This commit is contained in:
commit
4f6d5f368b
@ -41,6 +41,10 @@ const intlMessages = defineMessages({
|
||||
id: 'app.poll.liveResult.secretLabel',
|
||||
description: 'label shown instead of users in poll responses if poll is secret',
|
||||
},
|
||||
noAnswersLabel: {
|
||||
id: 'app.poll.noAnswerWarning',
|
||||
description: 'label shown when no answers have been received',
|
||||
},
|
||||
});
|
||||
|
||||
const getResponseString = (obj) => {
|
||||
@ -214,7 +218,7 @@ class LiveResult extends PureComponent {
|
||||
? (
|
||||
<Styled.ButtonsActions>
|
||||
<Styled.PublishButton
|
||||
disabled={!isMeteorConnected}
|
||||
disabled={!isMeteorConnected || !currentPoll.responses}
|
||||
onClick={() => {
|
||||
Session.set('pollInitiated', false);
|
||||
publishPoll(currentPoll?.id);
|
||||
@ -246,8 +250,9 @@ class LiveResult extends PureComponent {
|
||||
color="primary"
|
||||
data-test="restartPoll"
|
||||
/>
|
||||
)
|
||||
}
|
||||
)}
|
||||
{currentPoll && !currentPoll.responses
|
||||
&& intl.formatMessage(intlMessages.noAnswersLabel)}
|
||||
<Styled.Separator />
|
||||
{ currentPoll && !currentPoll.secretPoll
|
||||
? (
|
||||
|
@ -172,6 +172,7 @@ const ButtonsActions = styled.div`
|
||||
|
||||
const PublishButton = styled(Button)`
|
||||
width: 48%;
|
||||
margin-bottom: ${smPaddingY};
|
||||
overflow-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
`;
|
||||
|
@ -394,6 +394,7 @@
|
||||
"app.poll.showRespDesc": "Displays response configuration",
|
||||
"app.poll.addRespDesc": "Adds poll response input",
|
||||
"app.poll.deleteRespDesc": "Removes option {0}",
|
||||
"app.poll.noAnswerWarning": "To publish a poll, at least one response is required",
|
||||
"app.poll.t": "True",
|
||||
"app.poll.f": "False",
|
||||
"app.poll.tf": "True / False",
|
||||
|
@ -69,7 +69,7 @@ test.describe.parallel('Notifications', () => {
|
||||
});
|
||||
|
||||
test.describe.parallel('Presenter @ci', () => {
|
||||
test('Poll results notification', async ({ browser, context, page }) => {
|
||||
test('Poll results notification @flaky', async ({ browser, context, page }) => {
|
||||
const presenterNotifications = new PresenterNotifications(browser, context);
|
||||
await presenterNotifications.initModPage(page);
|
||||
await presenterNotifications.publishPollResults();
|
||||
|
@ -53,7 +53,7 @@ test.describe('Polling', async () => {
|
||||
});
|
||||
|
||||
// Results
|
||||
test('Poll results in chat message @ci', async () => {
|
||||
test('Poll results in chat message @ci @flaky', async () => {
|
||||
await polling.pollResultsOnChat();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user