001/* 002 * (C) Copyright 2006-2016 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Damien Metzler (Leroy Merlin, http://www.leroymerlin.fr/) 018 */ 019package org.nuxeo.ecm.webengine.test; 020 021import java.io.File; 022import java.io.IOException; 023import java.io.InputStream; 024import java.net.URL; 025 026import org.apache.commons.io.FileUtils; 027import org.nuxeo.ecm.core.test.ServletContainerTransactionalFeature; 028import org.nuxeo.ecm.platform.test.PlatformFeature; 029import org.nuxeo.ecm.webengine.jaxrs.session.SessionFactory; 030import org.nuxeo.runtime.test.WorkingDirectoryConfigurator; 031import org.nuxeo.runtime.test.runner.Deploy; 032import org.nuxeo.runtime.test.runner.Features; 033import org.nuxeo.runtime.test.runner.FeaturesRunner; 034import org.nuxeo.runtime.test.runner.RuntimeFeature; 035import org.nuxeo.runtime.test.runner.RuntimeHarness; 036import org.nuxeo.runtime.test.runner.SimpleFeature; 037import org.nuxeo.runtime.test.runner.web.WebDriverFeature; 038 039@Deploy("org.nuxeo.ecm.platform.login") 040@Deploy("org.nuxeo.ecm.platform.login.default") 041@Deploy("org.nuxeo.ecm.webengine.jaxrs") 042@Deploy("org.nuxeo.ecm.webengine.base") 043@Deploy("org.nuxeo.ecm.webengine.ui") 044@Deploy("org.nuxeo.ecm.platform.test:test-usermanagerimpl/userservice-config.xml") 045@Deploy("org.nuxeo.ecm.webengine.test:login-anonymous-config.xml") 046@Deploy("org.nuxeo.ecm.webengine.test:login-config.xml") 047@Deploy("org.nuxeo.ecm.webengine.test:runtimeserver-contrib.xml") 048@Features({ PlatformFeature.class, WebDriverFeature.class, ServletContainerTransactionalFeature.class, 049 WebEngineFeatureCore.class }) 050public class WebEngineFeature extends SimpleFeature { 051 052 protected URL config; 053 054 @Override 055 public void initialize(FeaturesRunner runner) throws Exception { 056 SessionFactory.setDefaultRepository("test"); 057 } 058 059}