//[TestMethod, TestCategory("Completion")] public async Task AspxZenCodingTest() { var textView = await VSHost.TypeText(".aspx", "#id.class\t"); await VSHost.Dispatcher.NextFrame(DispatcherPriority.ApplicationIdle); textView.GetText().Should().Be("<div id=\"id\" class=\"class\"></div>"); }
public async Task UseStrictEmptyFile() { var textView = await VSHost.TypeText(".js", "'"); textView.IsCompletionOpen().Should().BeTrue(); await VSHost.TypeString("\t"); textView.GetText().Should().Be("'use strict';"); textView.IsCompletionOpen().Should().BeFalse(); }
public async Task BlockCommentCompletion() { SettingsStore.EnterTestMode(new WESettings { JavaScript = { BlockCommentCompletion = true } }); var textView = await VSHost.TypeText(".js", "/*"); textView.GetText().Should().Be("/**/"); }
public async Task BlockCommentStarCompletionDisabled() { SettingsStore.EnterTestMode(new WESettings { JavaScript = { BlockCommentCompletion = false } }); var textView = await VSHost.TypeText(".js", "/*\n"); textView.GetText().Should().Be("/*\r\n"); }
public async Task BackspaceDismisses() { var textView = await VSHost.TypeText(".js", "'u"); textView.IsCompletionOpen().Should().BeTrue(); await VSHost.TypeString("\b"); textView.IsCompletionOpen().Should().BeTrue(); await VSHost.TypeString("\b"); textView.IsCompletionOpen().Should().BeFalse(); }
public async Task GetElementsByTagName() { var textView = await VSHost.TypeText(".js", "document.body.getElementsByTagName('ta')"); textView.GetText().Should().Be("document.body.getElementsByTagName('table')"); }
public async Task DontActivateElsewhere() { var textView = await VSHost.TypeText(".js", "var x = {\n'u"); textView.IsCompletionOpen().Should().BeFalse(); }
public async Task UseAsmFunction() { var textView = await VSHost.TypeText(".js", "var a=function(){\n\"use a\""); textView.GetText().Should().EndWith("\"use asm\"\r\n}"); }