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

Implement filling Webforms in HTTP/HTTPS plugin #95

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Lillecarl
Copy link
Contributor

@Lillecarl Lillecarl commented Sep 23, 2017

Support for filling forms in HTTP and HTTPS plugins

@Lillecarl Lillecarl changed the title WIP: Implement filling Webforms in HTTP/HTTPS plugin Implement filling Webforms in HTTP/HTTPS plugin Sep 23, 2017
@jirkapok
Copy link
Contributor

Please add missing unit tests, fix WebProtocols_CreateControls_ReturnsEmpty test.

@Lillecarl
Copy link
Contributor Author

Considering i don't know how to run the tests, i hope this is what you're looking for :)

@jirkapok
Copy link
Contributor

jirkapok commented Oct 2, 2017

Still two tests are failing. I am going to have a look my self. So we can merge it.

@jirkapok
Copy link
Contributor

jirkapok commented Oct 2, 2017

To fix the tests:

  • GetTerminalsOptionsExporters_ReturnsAllExporters: Add newly added exporters class names to expected array.
  • AllKnownProtocols_GetFavoriteIcon_ReturnPluginIcon: Fix the reference to HttpsConnectionPlugin.TreeIconHttps for Https test case.

@@ -6,6 +6,8 @@ public class KnownConnectionConstants

public const int HTTPPort = 80;

public const int HTTPSPort = 443;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no reason why to move it here, until there is another usage than tests. Leave it in https plugin.

@@ -37,12 +41,17 @@ public ProtocolOptions CreateOptions()

public Image GetIcon()
{
return HttpConnectionPlugin.TreeIconHttp;
return TreeIconHttps;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the icon moved to this plugin and not referencing the original icon. It looks like a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal static readonly Image TreeIconHttps = Resources.treeIcon_http; I added this to "sync" the two plugins to be as equal as possible, could absolutely be reverted :)

public string OptionalID { get; set; }
public string OptionalValue { get; set; }
public string SubmitID { get; set; }
public bool EnableHTMLAuth { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the EnableHtmlAuth separated from EnableFormsAuth, what is the difference. I would expect one dropdown to select authentication method. Or is the purpose as fallback authentication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added both to be able to keep both enabled by default, to ease for users (Not having to chose by default).

{
UrlConverter.UpdateFavoriteUrl(context.Favorite, context.ConfigFavorite.Url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are this property conversions removed? The property is still there, so it needs to be converted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it :)


internal class TerminalsWebExport
{
public static void ExportOptions(ref IExportOptionsContext context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you calling the context using ref?

}
}

internal class TerminalsHTTPSExport : ITerminalsOptionsExport
Copy link
Contributor

@jirkapok jirkapok Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to have two exporters, if they do the same. We may implement one for both protocols. See ConnectionManager.IsProtocolWebBased.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correcting this :)

@Lillecarl
Copy link
Contributor Author

Updated to try and fit your comments. It might still not be perfect for your style though. We'll see :)

@jirkapok
Copy link
Contributor

Please add missing tests to cover what is not automatically tested. Otherwise i will fix the issues you dint comment.

@Lillecarl
Copy link
Contributor Author

If there's anything you want fixed, feel free to push to my branch too, you should have write access to the pullrequested branches :)

My reasoning behind instancing the icon twice and moving the https port definition is only to keep consistency within the codebase.

Hope to see this if not merged, implemented :) It's a killer feature! :)

@Lillecarl
Copy link
Contributor Author

If you want, we can rebase this branch on master and rewrite the history too :) Contributed to a project awhile ago where a pretty gitlog was important.

@Lillecarl
Copy link
Contributor Author

How are we doing on this? I'm not sure which changes i've missed, please rereview this.

@jirkapok
Copy link
Contributor

jirkapok commented Nov 3, 2017

Go through all comments for each file, mainly:

  • Add tests fro the newly added values
  • Implement upgrade from previous version

@Lillecarl
Copy link
Contributor Author

@jirkapok It's the wrong way around, but i'd love it if you helped me cleanup the last bits as you'd like them. I think by GitHub design you've got write access to the pullrequest branch.

The tests i think i implemented, i'm not sure what's missing. And upgrades i know not how to do.

Best Regards
Carl :)

@jirkapok
Copy link
Contributor

jirkapok commented Feb 9, 2023

Based on project resurection, i will cherry pick these changes and implement them in 46-putty branch.

@Lillecarl
Copy link
Contributor Author

I'm glad to hear, I don't have any Windows machines anymore so I can't assist, but I suspekt you've got this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants