<commit_before>/**
 * Copyright 2005-2013 The Kuali Foundation
 *
 * Licensed under the Educational Community License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.opensource.org/licenses/ecl2.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.samplu.krad.library.general;

import org.junit.Test;

import edu.samplu.common.SmokeTestBase;

/**
 * @author <NAME> (<EMAIL>)
 */
public class DemoLibraryGeneralFeaturesStickyHeaderSmokeTest extends SmokeTestBase {

    /**
     * /kr-krad/kradsampleapp?viewId=Demo-StickyHeader-View&methodToCall=start
     */
    public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-StickyHeader-View&methodToCall=start";

    @Override
    protected String getBookmarkUrl() {
        return BOOKMARK_URL;
    }

    @Override
    protected void navigate() throws Exception {
        waitAndClickById("Demo-LibraryLink", "");
        waitAndClickByLinkText("General Features");
        waitAndClickByLinkText("Sticky Header Options");
    }

    protected void testGeneralFeaturesExample1() throws Exception {
        waitAndClickByLinkText("Example 1");
       waitAndClickByLinkText("Sticky View header");
       switchToWindow("Kuali :: View Header");
       assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
       switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample2() throws Exception {
        waitAndClickByLinkText("Example 2");
        waitAndClickByLinkText("Sticky application header and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-ApplicationHeader-Wrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample3() throws Exception {
        waitAndClickByLinkText("Example 3");
        waitAndClickByLinkText("Sticky application header, breadcrumbs, and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-BreadcrumbWrapper' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample4() throws Exception {
        waitAndClickByLinkText("Example 4");
        waitAndClickByLinkText("Sticky application header, top group, and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-TopGroupWrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample5() throws Exception {
        waitAndClickByLinkText("Example 5");
        waitAndClickByLinkText("All header content sticky");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-TopGroupWrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");<commit_msg>KULRICE-10804 : Analyze CI Failures for 2.3.3 QA/2.4.0-m3 QA Sprint 1 - update DemoLibraryGeneralFeaturesStickyHeaderSmokeTest<commit_after>/**
 * Copyright 2005-2013 The Kuali Foundation
 *
 * Licensed under the Educational Community License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.opensource.org/licenses/ecl2.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.samplu.krad.library.general;

import org.junit.Test;

import edu.samplu.common.SmokeTestBase;

/**
 * @author Kuali R<NAME> (<EMAIL>)
 */
public class DemoLibraryGeneralFeaturesStickyHeaderSmokeTest extends SmokeTestBase {

    /**
     * /kr-krad/kradsampleapp?viewId=Demo-StickyHeader-View&methodToCall=start
     */
    public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-StickyHeader-View&methodToCall=start";

    @Override
    protected String getBookmarkUrl() {
        return BOOKMARK_URL;
    }

    @Override
    protected void navigate() throws Exception {
        waitAndClickById("Demo-LibraryLink", "");
        waitAndClickByLinkText("General Features");
        waitAndClickByLinkText("Sticky Header Options");
    }

    protected void testGeneralFeaturesExample1() throws Exception {
        waitAndClickByLinkText("Sticky View Header");
        waitAndClickByLinkText("Sticky View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample2() throws Exception {
        waitAndClickByLinkText("Sticky Application Header and View Header");
        waitAndClickByLinkText("Sticky application header and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-ApplicationHeader-Wrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample3() throws Exception {
        waitAndClickByLinkText("Sticky Breadcrumbs, Application Header and View Header");
        waitAndClickByLinkText("Sticky application header, breadcrumbs, and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-BreadcrumbWrapper' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample4() throws Exception {
        waitAndClickByLinkText("Sticky Application Header, Top Group and View Header");
        waitAndClickByLinkText("Sticky application header, top group, and View header");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-TopGroupWrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
        switchToWindow("Kuali");
    }
    
    protected void testGeneralFeaturesExample5() throws Exception {
        waitAndClickByLinkText("Sticky Everything");
        waitAndClickByLinkText("All header content sticky");
        switchToWindow("Kuali :: View Header");
        assertElementPresentByXpath("//div[@id='Uif-TopGroupWrapper' and @data-sticky='true']");
        assertElementPresentByXpath("//div[@class='uif-viewHeader-contentWrapper uif-sticky' and @data-sticky='true']");
{'fraction_non_alphanumeric': 0.11214087117701575, 'fraction_numerical': 0.006619886137958427, 'mean_word_length': 4.1075050709939145, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6278610', 'n_tokens_mistral': 2138, 'n_tokens_neox': 2091, 'n_words': 495}