diff --git a/bigbluebutton-tests/playwright/core/elements.js b/bigbluebutton-tests/playwright/core/elements.js index 33336c9f9f..c5f5a199d4 100644 --- a/bigbluebutton-tests/playwright/core/elements.js +++ b/bigbluebutton-tests/playwright/core/elements.js @@ -256,6 +256,10 @@ exports.firstPollAnswerOptionBtn = `${pollAnswersOption}>>nth=0`; exports.secondPollAnswerOptionBtn = `${pollAnswersOption}>>nth=1`; exports.firstCheckboxInput = `${pollAnswersOption}`; exports.closePollingBtn = 'button[data-test="closePolling"]'; +exports.yesNoOption = 'button[data-test="yesNoQuickPoll"]'; +exports.yesNoAbstentionOption = 'li[role="menuitem"]>>nth=1'; +exports.pollAnswerOptionE = 'button[data-test="pollAnswerOption"]>>nth=4'; +exports.answerE = 'div[data-test="numberOfVotes"]>>nth=4'; // Presentation exports.currentSlideImg = 'img[id="slide-background-shape_image"]'; exports.uploadPresentationFileName = 'uploadTest.png'; diff --git a/bigbluebutton-tests/playwright/core/media/smartSlidesPresentation.pdf b/bigbluebutton-tests/playwright/core/media/smartSlidesPresentation.pdf index f7a3e66e38..21568fd73e 100644 Binary files a/bigbluebutton-tests/playwright/core/media/smartSlidesPresentation.pdf and b/bigbluebutton-tests/playwright/core/media/smartSlidesPresentation.pdf differ diff --git a/bigbluebutton-tests/playwright/polling/poll.js b/bigbluebutton-tests/playwright/polling/poll.js index 66026c01e7..f33c652741 100644 --- a/bigbluebutton-tests/playwright/polling/poll.js +++ b/bigbluebutton-tests/playwright/polling/poll.js @@ -184,6 +184,7 @@ class Polling extends MultiUsers { await utilPresentation.uploadSinglePresentation(this.modPage, e.smartSlides1, ELEMENT_WAIT_LONGER_TIME); await this.userPage.hasElement(e.currentUser); + // Type Response await this.modPage.waitAndClick(e.quickPoll); await this.userPage.hasElement(e.responsePollQuestion); await this.userPage.type(e.pollAnswerOptionInput, 'test'); @@ -195,19 +196,46 @@ class Polling extends MultiUsers { await this.modPage.waitAndClick(e.closePollingBtn); await this.modPage.wasRemoved(e.closePollingBtn); + // Multiple Choices await this.modPage.waitAndClick(e.nextSlide); await this.modPage.waitAndClick(e.quickPoll); await this.userPage.waitAndClick(e.firstPollAnswerDescOption); + await this.userPage.waitAndClick(e.secondPollAnswerDescOption); await this.userPage.waitAndClick(e.submitAnswersMultiple); + await this.modPage.hasText(e.answer1, '1'); + await this.modPage.hasText(e.answer2, '1'); + await this.modPage.waitAndClick(e.publishPollingLabel); + await this.modPage.waitAndClick(e.closePollingBtn); + await this.modPage.wasRemoved(e.closePollingBtn); + + // One option answer + await this.modPage.waitAndClick(e.nextSlide); + await this.modPage.waitAndClick(e.quickPoll); + await this.userPage.waitAndClick(e.pollAnswerOptionE); + await this.modPage.hasText(e.answerE, '1'); + + await this.modPage.waitAndClick(e.publishPollingLabel); + await this.modPage.waitAndClick(e.closePollingBtn); + await this.modPage.wasRemoved(e.closePollingBtn); + + // Yes/No/Abstention + await this.modPage.waitAndClick(e.nextSlide); + await this.modPage.waitAndClick(e.yesNoOption); + await this.modPage.waitAndClick(e.yesNoAbstentionOption) + await this.userPage.waitAndClick(e.pollAnswerOptionBtn); await this.modPage.hasText(e.answer1, '1'); await this.modPage.waitAndClick(e.publishPollingLabel); + await this.modPage.waitAndClick(e.closePollingBtn); + await this.modPage.wasRemoved(e.closePollingBtn); + + // True/False await this.modPage.waitAndClick(e.nextSlide); await this.modPage.waitAndClick(e.quickPoll); await this.userPage.waitAndClick(e.pollAnswerOptionBtn); + await this.modPage.waitAndClick(e.publishPollingLabel); - await this.modPage.hasText(e.answer1, '1'); await this.modPage.hasElementDisabled(e.nextSlide); await this.modPage.waitAndClick(e.closePollingBtn);