package com.acme.samples.google.pages.home;

import com.acme.samples.google.context.GoogleContext;
import io.magentys.cinnamon.conf.Env;
import io.magentys.cinnamon.webdriver.actions.basic.ReplaceTextAction;

import javax.inject.Inject;

import static io.magentys.cinnamon.webdriver.Browser.fireEvent;
import static io.magentys.cinnamon.webdriver.Browser.switchTo;
import static io.magentys.cinnamon.webdriver.Timeouts.defaultTimeout;
import static io.magentys.cinnamon.webdriver.conditions.ElementConditions.*;

public class DesktopHomePage extends AbstractHomePage {

    @Inject
    public DesktopHomePage(final Env env, final GoogleContext context) {
        super(env, context);
    }

    @Override
    public boolean waitUntilOpened() {
        return searchButton.waitUntil(displayed.and(textContainsIgnoreCase("Search"))).isPresent();
    }

    @Override
    public void enterSearchTerm(final String searchTerm) {
        // Enter the search term.
        searchInput.waitUntil(clickable.and(positionUnchanged(500))).replaceText(searchTerm);;
        context.setSearchFilter(searchTerm);
    }
}
@@ -134,305 +134,37 @@
 nv;%0A
-import io.magentys.cinnamon.webdriver.actions.basic.ReplaceTextAction;%0A%0Aimport javax.inject.Inject;%0A%0Aimport static io.magentys.cinnamon.webdriver.Browser.fireEvent;%0Aimport static io.magentys.cinnamon.webdriver.Browser.switchTo;%0Aimport static io.magentys.cinnamon.webdriver.Timeouts.defaultTimeout;
+%0Aimport javax.inject.Inject;%0A
 %0Aimp
@@ -776,17 +776,16 @@
 chTerm);
-;
 %0A       

clean unused imports