Beispiel #1
0
        public void InstallClientSideLibraries_FromFolder_SmokeTest()
        {
            RemoveExistingManifest();

            InstallDialogTestExtension installDialogTestExtension = OpenWizardFromSolutionExplorerItem("wwwroot");

            installDialogTestExtension.Library = "[email protected]";
            installDialogTestExtension.WaitForFileSelectionsAvailable();
            installDialogTestExtension.ClickInstall();

            string pathToLibrary = Path.Combine(SolutionRootPath, ProjectName, "wwwroot", "jquery-validate");

            string[] expectedFiles = new[]
            {
                Path.Combine(pathToLibrary, "jquery.validate.js"),
                Path.Combine(pathToLibrary, "localization", "messages_ar.js"),
            };

            string manifestContents = @"{
  ""version"": ""1.0"",
  ""defaultProvider"": ""cdnjs"",
  ""libraries"": [
    {
      ""library"": ""[email protected]"",
      ""destination"": ""wwwroot/jquery-validate/""
    }
  ]
}";

            Helpers.FileIO.WaitForRestoredFiles(pathToLibrary, expectedFiles, caseInsensitive: true, timeout: 20000);
            Assert.AreEqual(manifestContents, File.ReadAllText(_pathToLibmanFile));
        }
Beispiel #2
0
        public void NpmPackageWithLatestTag_LoadsFileMetadata(string provider)
        {
            InstallDialogTestExtension installDialogTestExtenstion = OpenWizardFromSolutionExplorerItem("wwwroot");

            try
            {
                installDialogTestExtenstion.Provider = provider;
                installDialogTestExtenstion.Library  = "jquery@latest";

                installDialogTestExtenstion.WaitForFileSelectionsAvailable();
            }
            finally
            {
                installDialogTestExtenstion.Close();
            }
        }