Skip to content

Show submit button in new UI #266

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

Merged
merged 6 commits into from
Oct 12, 2023
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
17 changes: 17 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
categories:
- title: "Features :star:"
labels:
- "feature :star:"

- title: "Improvements :arrow_up:"
labels:
- "enhancement :arrow_up:"

- title: "Bugfixes :bug:"
labels:
- "bug :bug:"

- title: "Dependencies :construction_worker:"
labels:
- "dependencies"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'idea'
id 'jacoco'
id 'java'
id 'org.jetbrains.intellij' version '1.15.0'
id 'org.jetbrains.intellij' version '1.16.0'
}

group 'io.github.thepieterdc.dodona'
Expand Down Expand Up @@ -36,7 +36,7 @@ dependencies {
testImplementation platform("org.junit:junit-bom:5.10.0")

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.10.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.4.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.5.0'
testImplementation group: 'io.github.thepieterdc.random', name: 'random', version: '1.0.2'
}

Expand Down Expand Up @@ -103,6 +103,9 @@ jacocoTestReport {

patchPluginXml {
changeNotes = """
<ul>
<li>[BUG] Show the submit icon in the new layout.</li>
</ul>
"""

pluginDescription = 'Companion plugin for the Ghent University Dodona platform, which allows you to submit exercises right from your favourite JetBrains IDE. More information can be found at <a href="https://docs.dodona.be/en/guides/pycharm-plugin/">https://docs.dodona.be/en/guides/pycharm-plugin/</a>'
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,12 @@
<keyboard-shortcut first-keystroke="control shift F10" keymap="$default"/>
</action>
</group>
<group id="dodona.actions.DodonaActionsToolbarNewUI" text="Dodona" popup="false">
<add-to-group group-id="RunToolbarMainActionGroup" anchor="after" relative-to-action="RunToolbarTopLevelExecutorActionGroup" />
<action id="dodona.actions.DodonaActionsToolbar.submitNewUI"
class="io.github.thepieterdc.dodona.plugin.actions.SubmitAction">
<keyboard-shortcut first-keystroke="control shift F10" keymap="$default"/>
</action>
</group>
</actions>
</idea-plugin>
</idea-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,25 @@
*/
package io.github.thepieterdc.dodona.plugin.actions;

import com.intellij.diagnostic.PluginException;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
import io.github.thepieterdc.dodona.plugin.TestData;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

/**
* Tests SubmitAction.
*/
// Test is expected to fail until IDE versions lower than 2023 are dropped.
@Ignore
public class SubmitActionTest extends BasePlatformTestCase {
@Override
protected String getTestDataPath() {
return TestData.getTestDataPath();
}

/**
* Tests whether the action can be invoked when no file is opened.
*/
Expand All @@ -32,4 +36,4 @@ public void testInvocationNoFile() {
final Presentation presentation = this.myFixture.testAction(action);
Assert.assertFalse(presentation.isEnabledAndVisible());
}
}
}