public void ProcessorFilterAMDa10AndAMDfx() { var resultComponent = new ResultComponent(webDriver); var filterNotebookComponent = new FilterNotebookComponent(webDriver); resultComponent.Open(_url); filterNotebookComponent.SelectCPU(FilterNotebookComponent.CpuType.AMDa10); filterNotebookComponent.SelectCPU(FilterNotebookComponent.CpuType.AMDfx); try { resultComponent.WaitProcessing(); } catch (Exception) { } finally { resultComponent.ProcessingComplite(); } string[] descriptionAll = resultComponent.GetAllDescriptionOnThePage(); foreach (var item in descriptionAll) { if (!(item.Contains("AMD A10") || item.Contains("AMD FX"))) { Assert.Fail($"The processor 'AMD A10 or AMD FX' filter not works correctly"); } } log.Log(Status.Pass, $"The processor 'AMD A10 or AMD FX' filter works correctly"); }
public void OneProcessorFilterNotebook(FilterNotebookComponent.CpuType type, string text) { var resultComponent = new ResultComponent(webDriver); var filterNotebookComponent = new FilterNotebookComponent(webDriver); resultComponent.Open(_url); filterNotebookComponent.SelectCPU(type); try { resultComponent.WaitProcessing(); } catch (Exception) { } finally { resultComponent.ProcessingComplite(); } string[] descriptionAll = resultComponent.GetAllDescriptionOnThePage(); foreach (var item in descriptionAll) { if (!item.Contains(text)) { Assert.Fail($"The processor '{text}' filter not works correctly"); } } log.Log(Status.Pass, $"The processor {text} filter works correctly"); }
public void SuccessfulFilterNotebookForMinPrice([Random(300, 800, 1)] double m) { var resultComponent = new ResultComponent(webDriver); var filterNotebookComponent = new FilterNotebookComponent(webDriver); resultComponent.Open(_url); double minPrice = m; filterNotebookComponent.InputFilterMinPrice(minPrice); resultComponent.ProcessingComplite(); double[] price = resultComponent.GetAllPriceOnThisPage(); bool error = false; for (int i = 0; i < price.Length; i++) { if (Convert.ToDouble(price[i]) < minPrice) { error = true; } } Assert.IsFalse(error, "Error, found prices less than the minimum"); log.Log(Status.Pass, "The maximum filter works correctly"); }
public void SuccessfulFilterNotebookForMaxAndMinPrice(double min, double max) { var resultComponent = new ResultComponent(webDriver); var filterNotebookComponent = new FilterNotebookComponent(webDriver); resultComponent.Open(_url); double minPrice = min; double maxPrice = max; filterNotebookComponent.InputFilterFullPrice(minPrice, maxPrice); resultComponent.ProcessingComplite(); double[] price = resultComponent.GetAllPriceOnThisPage(); bool error = false; for (int i = 0; i < price.Length; i++) { if (Convert.ToDouble(price[i]) > maxPrice && Convert.ToDouble(price[i]) < minPrice) { error = true; } } Assert.IsFalse(error, "Error, found prices do not fall within the specified interval "); log.Log(Status.Pass, "The interval filter works correctly"); }