Commit 6d6f4de1 authored by Akihiro Ota's avatar Akihiro Ota Committed by Commit Bot

ChromeVox Tutorial Tests: Test practice area button visibility.

Bug: 1127037
Change-Id: Icde8546beba54334b08a2a6af1ea49b3824a5ac2
AX-Relnotes: N/A
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406542Reviewed-by: default avatarAnastasia Helfinstein <anastasi@google.com>
Commit-Queue: Akihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808506}
parent 4f180191
...@@ -141,4 +141,52 @@ TEST_F('ChromeVoxTutorialTest', 'LessonSetTest', function() { ...@@ -141,4 +141,52 @@ TEST_F('ChromeVoxTutorialTest', 'LessonSetTest', function() {
.expectSpeech('Text fields') .expectSpeech('Text fields')
.replay(); .replay();
}); });
});
// Tests that a static lesson does not show the 'Practice area' button.
TEST_F('ChromeVoxTutorialTest', 'NoPracticeAreaTest', function() {
const mockFeedback = this.createMockFeedback();
this.runWithLoadedTree(this.simpleDoc, async function(root) {
const Panel = this.getPanel();
assertTrue(Panel.iTutorialEnabled_);
new PanelCommand(PanelCommandType.TUTORIAL).send();
await this.waitForTutorial();
const tutorial = Panel.iTutorial;
mockFeedback.expectSpeech('Choose your tutorial experience')
.call(doCmd('nextObject'))
.expectSpeech('New user', 'Button')
.call(doCmd('forceClickOnCurrentItem'))
.expectSpeech('New User Tutorial, 8 Lessons')
.call(() => {
tutorial.showLesson(0);
})
.expectSpeech('On, Off, and Stop', 'Heading 1')
.call(doCmd('nextButton'))
.expectSpeech('Next lesson')
.replay();
});
});
// Tests that an interactive lesson shows the 'Practice area' button.
TEST_F('ChromeVoxTutorialTest', 'HasPracticeAreaTest', function() {
const mockFeedback = this.createMockFeedback();
this.runWithLoadedTree(this.simpleDoc, async function(root) {
const Panel = this.getPanel();
assertTrue(Panel.iTutorialEnabled_);
new PanelCommand(PanelCommandType.TUTORIAL).send();
await this.waitForTutorial();
const tutorial = Panel.iTutorial;
mockFeedback.expectSpeech('Choose your tutorial experience')
.call(doCmd('nextObject'))
.expectSpeech('New user', 'Button')
.call(doCmd('forceClickOnCurrentItem'))
.expectSpeech('New User Tutorial, 8 Lessons')
.call(() => {
tutorial.showLesson(2);
})
.expectSpeech('Basic Navigation', 'Heading 1')
.call(doCmd('nextButton'))
.expectSpeech('Practice Area')
.replay();
});
}); });
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment