Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client: Poll answer verification #19621

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -213,7 +217,7 @@ class LiveResult extends PureComponent {
? (
<Styled.ButtonsActions>
<Styled.PublishButton
disabled={!isMeteorConnected}
disabled={!isMeteorConnected || !currentPoll.responses}
onClick={() => {
Session.set('pollInitiated', false);
publishPoll(currentPoll?.id);
Expand Down Expand Up @@ -244,8 +248,9 @@ class LiveResult extends PureComponent {
color="primary"
data-test="restartPoll"
/>
)
}
)}
{currentPoll && !currentPoll.responses
&& intl.formatMessage(intlMessages.noAnswersLabel)}
<Styled.Separator />
{ currentPoll && !currentPoll.secretPoll
? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
`;
Expand Down
1 change: 1 addition & 0 deletions bigbluebutton-html5/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion bigbluebutton-tests/playwright/polling/polling.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down