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

Video recording for ui tests #407

Merged
merged 3 commits into from
Nov 12, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/runUiTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
with:
distribution: zulu
java-version: 11
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v1
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Plugin
run: gradle :buildPlugin
- name: Run Idea
Expand All @@ -27,6 +33,9 @@ jobs:
retry-delay: 10s
- name: Tests
run: gradle :testUi
- name: Move video
if: ${{ failure() }}
run: mv video build/reports
- name: Save fails report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ usual beta standards.
* [VIM-2432](https://youtrack.jetbrains.com/issue/VIM-2432) Fix ctrl-d and ctrl-u motions with scrolloff
* [VIM-2462](https://youtrack.jetbrains.com/issue/VIM-2462) Reset caret shape when disabling plugin
* [VIM-2449](https://youtrack.jetbrains.com/issue/VIM-2449) Fix `I` for one-line block selection
* [VIM-2461](https://youtrack.jetbrains.com/issue/VIM-2461) Show action id before action execution

### Merged PRs:
* [390](https://github.com/JetBrains/ideavim/pull/390) by [chylex](https://github.com/chylex): [VIM-2255] Missing reload icon in .ideavimrc on Windows
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ dependencies {

testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion")
testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion")

testImplementation("com.automation-remarks:video-recorder-junit:2.0")
runtimeOnly("org.antlr:antlr4-runtime:4.9.2")
antlr("org.antlr:antlr4:4.9.2")
}
Expand Down
10 changes: 9 additions & 1 deletion src/test/java/ui/UiTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@

package ui

import com.automation.remarks.junit.VideoRule
import com.automation.remarks.video.annotations.Video
import com.intellij.remoterobot.RemoteRobot
import com.intellij.remoterobot.fixtures.ComponentFixture
import com.intellij.remoterobot.fixtures.ContainerFixture
import com.intellij.remoterobot.search.locators.byXpath
import com.intellij.remoterobot.stepsProcessing.step
import com.intellij.remoterobot.utils.keyboard
import org.assertj.swing.core.MouseButton
import org.junit.Rule
import org.junit.Test
import ui.pages.Editor
import ui.pages.IdeaFrame
Expand Down Expand Up @@ -52,12 +55,18 @@ import kotlin.test.assertEquals
import kotlin.test.assertFalse
import kotlin.test.assertTrue


class UiTests {
init {
StepsLogger.init()
}

@Rule
@JvmField
var videoRule = VideoRule()

@Test
@Video
fun ideaVimTest() = uiTest("ideaVimTest") {
val sharedSteps = JavaExampleSteps(this)

Expand All @@ -80,7 +89,6 @@ class UiTests {
)
}
}

testSelectTextWithDelay(editor)
testExtendSelection(editor)
testLargerDragSelection(editor)
Expand Down