<commit_before>/* global describe, it, element, by, takeScreenshot, browser, expect */

describe("sap.f.GridListVisualTests", function () {
	"use strict";

	browser.testrunner.currentSuite.meta.controlName = "sap.f.GridList";

	var bDesktop = null;

	function goToIconTabFilter (sId) {
		return browser.executeScript(function (sId) {
			var Core = sap.ui.getCore();
			Core.byId('gridplayground---app--itb').setSelectedKey(sId);
			Core.applyChanges();
		}, sId);
	}

	function takePictureOfContent (sPictureTitle) {
		var oContent = element(by.css(".sapMITBContainerContent"));
		expect(takeScreenshot(oContent)).toLookAs(sPictureTitle);
	}

	it("should visualize GridList with basic layout", function () {
		browser.executeScript("return sap.ui.Device.system.desktop;")
			.then(function (response) {
				bDesktop = response;
			});

		takePictureOfContent("0_general");
	});

	it("should visualize GridList with breakpoints", function () {
		goToIconTabFilter("GridList2").then(function () {
			takePictureOfContent("1_breakpoints");
		});
	});

	it("should visualize GridList with BoxContainer layout", function () {
		goToIconTabFilter("GridList3").then(function () {
			takePictureOfContent("2_boxcontainer");
		});
	});

	it("should visualize growing GridList", function () {
		goToIconTabFilter("GridList4").then(function () {
			takePictureOfContent("3_growing");
		});

		element(by.css(".sapMGrowingListTrigger")).click();
		takePictureOfContent("4_growing_more");

		element(by.css(".sapMGrowingListTrigger")).click();
		takePictureOfContent("4_growing_second_grow");
	});

	it("should visualize growing GridList with GridBoxLayout and Grouping", function () {
		browser.executeScript("sap.ui.getCore().byId('gridplayground---app--page').scrollTo(0)").then(function () {
			goToIconTabFilter("GridList4a");
		}).then(function () {
			takePictureOfContent("4A_growing");
		});

		element(by.css(".sapMSlider + .sapFGridList .sapMGrowingListTrigger")).click();
		takePictureOfContent("4A_growing_more");

		element(by.css(".sapMSlider + .sapFGridList .sapMGrowingListTrigger")).click();
		takePictureOfContent("4A_growing_second_grow");

		element(by.css(".sapMSlider + .sapFGridList .sapMGrowingListTrigger")).click();
		takePictureOfContent("4A_growing_third_grow");
	});

	it("should visualize growing GridList with GridBoxLayout after Resizing", function () {
		if (bDesktop) {<commit_msg>[INTERNAL] sap.f.GridList: Visual tests are now fixed<commit_after>/* global describe, it, element, by, takeScreenshot, browser, expect */

describe("sap.f.GridListVisualTests", function () {
	"use strict";

	browser.testrunner.currentSuite.meta.controlName = "sap.f.GridList";

	var bDesktop = null;

	function goToIconTabFilter (sId) {
		return browser.executeScript(function (sId) {
			var Core = sap.ui.getCore();
			Core.byId('gridplayground---app--itb').setSelectedKey(sId);
			Core.applyChanges();
		}, sId);
	}

	function takePictureOfContent (sPictureTitle) {
		var oContent = element(by.css(".sapMITBContainerContent"));
		expect(takeScreenshot(oContent)).toLookAs(sPictureTitle);
	}

	it("should visualize GridList with basic layout", function () {
		browser.executeScript("return sap.ui.Device.system.desktop;")
			.then(function (response) {
				bDesktop = response;
			});

		takePictureOfContent("0_general");
	});

	it("should visualize GridList with breakpoints", function () {
		goToIconTabFilter("GridList2").then(function () {
			takePictureOfContent("1_breakpoints");
		});
	});

	it("should visualize GridList with BoxContainer layout", function () {
		goToIconTabFilter("GridList3").then(function () {
			takePictureOfContent("2_boxcontainer");
		});
	});

	it("should visualize growing GridList", function () {
		goToIconTabFilter("GridList4").then(function () {
			takePictureOfContent("3_growing");
		});

		element(by.css(".sapMGrowingListTrigger")).click();
		takePictureOfContent("4_growing_more");

		element(by.css(".sapMGrowingListTrigger")).click();
		takePictureOfContent("4_growing_second_grow");
	});

	it("should visualize growing GridList with GridBoxLayout and Grouping", function () {
		browser.executeScript("sap.ui.getCore().byId('gridplayground---app--page').scrollTo(0)").then(function () {
			goToIconTabFilter("GridList4a");
		}).then(function () {
			takePictureOfContent("4A_growing");
		});

		element(by.css(".sapMSlider + .sapFGridList .sapMGrowingListTrigger")).click();
		takePictureOfContent("4A_growing_more");

		element(by.css(".sapMSlider + .sapFGridList .sapMGrowingListTrigger")).click();
		takePictureOfContent("4A_growing_second_grow");
	});

	it("should visualize growing GridList with GridBoxLayout after Resizing", function () {
		if (bDesktop) {
{'fraction_non_alphanumeric': 0.1550700042426814, 'fraction_numerical': 0.00615188799321171, 'mean_word_length': 5.755014326647564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3431813', 'n_tokens_mistral': 1658, 'n_tokens_neox': 1483, 'n_words': 232}