Skip to content

Commit

Permalink
Add UI test with disabled octopus handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Jan 26, 2024
1 parent 72f286d commit 355c560
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/runUiOctopusTests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Run Non Octopus UI Tests
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
build-for-ui-test-mac-os:
if: github.repository == 'JetBrains/ideavim'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Apply Patch
run: |
cd ideavim
git apply src/test/java/ui/octopus.patch
cd ..
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
with:
# Not strictly necessary, but it may prevent rate limit
# errors especially on GitHub-hosted macos machines.
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/[email protected]
- name: Build Plugin
run: gradle :buildPlugin
- name: Run Idea
run: |
mkdir -p build/reports
gradle :runIdeForUiTests > build/reports/idea.log &
- name: Wait for Idea started
uses: jtalk/url-health-check-action@v3
with:
url: http://127.0.0.1:8082
max-attempts: 20
retry-delay: 10s
- name: Tests
run: gradle :testUi
- name: Move video
if: always()
run: mv video build/reports
- name: Move sandbox logs
if: always()
run: mv build/idea-sandbox/system/log sandbox-idea-log
- name: Save report
if: always()
uses: actions/upload-artifact@v4
with:
name: ui-test-fails-report-mac
path: |
build/reports
sandbox-idea-log
# build-for-ui-test-linux:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup Java
# uses: actions/[email protected]
# with:
# distribution: zulu
# java-version: 11
# - name: Build Plugin
# run: gradle :buildPlugin
# - name: Run Idea
# run: |
# export DISPLAY=:99.0
# Xvfb -ac :99 -screen 0 1920x1080x16 &
# mkdir -p build/reports
# gradle :runIdeForUiTests #> build/reports/idea.log
# - name: Wait for Idea started
# uses: jtalk/[email protected]
# with:
# url: http://127.0.0.1:8082
# max-attempts: 15
# retry-delay: 30s
# - name: Tests
# run: gradle :testUi
# - name: Save fails report
# if: ${{ failure() }}
# uses: actions/upload-artifact@v2
# with:
# name: ui-test-fails-report-linux
# path: |
# ui-test-example/build/reports
17 changes: 17 additions & 0 deletions src/test/java/ui/octopus.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Index: vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/Options.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/Options.kt b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/Options.kt
--- a/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/Options.kt (revision 2cc7ce5b316be5665406dcf8d3e41116ccbfb0b0)
+++ b/vim-engine/src/main/kotlin/com/maddyhome/idea/vim/api/Options.kt (date 1706273373741)
@@ -302,7 +302,7 @@
public val ideaglobalmode: ToggleOption = addOption(ToggleOption("ideaglobalmode", GLOBAL, "ideaglobalmode", false))
public val ideastrictmode: ToggleOption = addOption(ToggleOption("ideastrictmode", GLOBAL, "ideastrictmode", false))
public val ideatracetime: ToggleOption = addOption(ToggleOption("ideatracetime", GLOBAL, "ideatracetime", false))
- public val octopushandler: ToggleOption = addOption(ToggleOption("octopushandler", GLOBAL, "octopushandler", true))
+ public val octopushandler: ToggleOption = addOption(ToggleOption("octopushandler", GLOBAL, "octopushandler", false))
}

private class MultikeyMap(vararg entries: Option<VimDataType>) {

0 comments on commit 355c560

Please sign in to comment.