diff --git a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/AdbCommand.kt b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/AdbCommand.kt index a402a7b3f..4993aee1c 100644 --- a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/AdbCommand.kt +++ b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/AdbCommand.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.commandtypes import com.kaspersky.adbserver.common.api.Command +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Command for backward compatibility with old version of adb-server */ diff --git a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/CmdCommand.kt b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/CmdCommand.kt index e748f75ab..b0c08b056 100644 --- a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/CmdCommand.kt +++ b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/CmdCommand.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.commandtypes import com.kaspersky.adbserver.common.api.ComplexCommand +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class CmdCommand( override val body: String, override val arguments: List = emptyList() diff --git a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/ComplexAdbCommand.kt b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/ComplexAdbCommand.kt index 658b1137f..2e5f6e81a 100644 --- a/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/ComplexAdbCommand.kt +++ b/adb-server/adb-server-command-types/src/main/java/com/kaspersky/adbserver/commandtypes/ComplexAdbCommand.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.commandtypes import com.kaspersky.adbserver.common.api.ComplexCommand +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class ComplexAdbCommand( override val body: String, override val arguments: List = emptyList() diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/Command.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/Command.kt index 96e4b738d..c75ff5692 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/Command.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/Command.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.common.api import java.io.Serializable +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Command to execute by AdbServer */ diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandExecutor.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandExecutor.kt index af6ce19b7..6eb231f95 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandExecutor.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandExecutor.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.api +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Executor of terminal commands. */ diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandResult.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandResult.kt index 85cb07352..b3495f787 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandResult.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/CommandResult.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.common.api import java.io.Serializable +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Result of command's executing */ diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/ComplexCommand.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/ComplexCommand.kt index e9e4bce29..f9ac0ba1e 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/ComplexCommand.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/api/ComplexCommand.kt @@ -1,3 +1,22 @@ package com.kaspersky.adbserver.common.api +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class ComplexCommand(override val body: String, open val arguments: List = emptyList()) : Command(body) diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/LoggerFactory.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/LoggerFactory.kt index 36b1b5417..4ba2cf9f6 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/LoggerFactory.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/LoggerFactory.kt @@ -7,6 +7,25 @@ import com.kaspersky.adbserver.common.log.logger.LogLevel import com.kaspersky.adbserver.common.log.logger.Logger import com.kaspersky.adbserver.common.log.logger.LoggerImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The singleton to provide Logger interface and to hide an implementation */ diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerOptimiser.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerOptimiser.kt index cdb497b1c..569881634 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerOptimiser.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerOptimiser.kt @@ -6,6 +6,25 @@ import com.kaspersky.adbserver.common.log.utils.AdbLoggerReflection import java.util.ArrayDeque import java.util.Deque +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class FullLoggerOptimiser( private val originalFullLogger: FullLogger, private val generateLogs: Boolean, diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogData.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogData.kt index cf45069c9..4303af39e 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogData.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogData.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.log.filterlog +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class LogData( val logMessage: String, val logOutput: () -> Unit diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogRecorder.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogRecorder.kt index 1e08956bd..ac98a20c1 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogRecorder.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/LogRecorder.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.common.log.filterlog import java.util.ArrayDeque import java.util.Deque +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class LogRecorder( private val recordingStackMaxSize: Int ) { diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/RecordAnswers.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/RecordAnswers.kt index 8f1225fc6..223a2e442 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/RecordAnswers.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/filterlog/RecordAnswers.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.common.log.filterlog import java.util.Deque +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal interface RecordAnswer internal class RecordInProgress : RecordAnswer diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLogger.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLogger.kt index 0be93c523..674f88ebd 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLogger.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLogger.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.common.log.fulllogger import com.kaspersky.adbserver.common.log.logger.LogLevel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal interface FullLogger { fun log( diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLoggerSystemImpl.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLoggerSystemImpl.kt index 8e35a91ac..e471cd74f 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLoggerSystemImpl.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/fulllogger/FullLoggerSystemImpl.kt @@ -5,6 +5,25 @@ import com.kaspersky.adbserver.common.log.utils.AdbLoggerReflection import java.text.SimpleDateFormat import java.util.Date +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Presents logs in the form like: * INFO 17/08/2020 09:53:52.234 desktop=Desktop-48633 device=emulator-5554 message: updated state=CONNECTED. diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/DesktopLogger.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/DesktopLogger.kt index efe0d5aa8..18665e5a9 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/DesktopLogger.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/DesktopLogger.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.log.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DesktopLogger( private val logger: Logger, internal val logLevel: LogLevel, diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LogLevel.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LogLevel.kt index f09c0c2c8..356a20f21 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LogLevel.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LogLevel.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.log.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class LogLevel { VERBOSE, diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/Logger.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/Logger.kt index ec90a7c1e..957f6060c 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/Logger.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/Logger.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.log.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Common interface to log all actions */ diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LoggerImpl.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LoggerImpl.kt index ea153e6e3..dde14dca1 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LoggerImpl.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/logger/LoggerImpl.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.common.log.logger import com.kaspersky.adbserver.common.log.fulllogger.FullLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class LoggerImpl( private val fullLogger: FullLogger ) : Logger { diff --git a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/utils/AdbLoggerReflection.kt b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/utils/AdbLoggerReflection.kt index 884a14269..e93403602 100644 --- a/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/utils/AdbLoggerReflection.kt +++ b/adb-server/adb-server-common/src/main/java/com/kaspersky/adbserver/common/log/utils/AdbLoggerReflection.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.common.log.utils +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object AdbLoggerReflection { private const val IGNORE = "log" diff --git a/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerForTest.kt b/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerForTest.kt index 1e4e1fb7a..e79cdcab3 100644 --- a/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerForTest.kt +++ b/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/FullLoggerForTest.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.common.log.filterlog import com.kaspersky.adbserver.common.log.fulllogger.FullLogger import com.kaspersky.adbserver.common.log.logger.LogLevel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class FullLoggerForTest : FullLogger { val list: MutableList = mutableListOf() diff --git a/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/LoggerAnalyzerTest.kt b/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/LoggerAnalyzerTest.kt index 12502fad9..f7f941d8a 100644 --- a/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/LoggerAnalyzerTest.kt +++ b/adb-server/adb-server-common/src/test/java/com/kaspersky/adbserver/common/log/filterlog/LoggerAnalyzerTest.kt @@ -4,6 +4,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.adbserver.common.log.logger.LogLevel import org.junit.jupiter.api.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoggerAnalyzerTest { private val fullLoggerTest = FullLoggerForTest() diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/BaseConnection.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/BaseConnection.kt index ccf8ca140..fea200c12 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/BaseConnection.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/BaseConnection.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.connection.api +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Interface for common Connection */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClient.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClient.kt index 37eee9a59..40af8ecdb 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClient.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClient.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.connection.api import com.kaspersky.adbserver.common.api.Command import com.kaspersky.adbserver.common.api.CommandResult +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * BaseConnection + opportunity to execute Adb commands */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClientLifecycle.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClientLifecycle.kt index fbb8052fc..b214fb33a 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClientLifecycle.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionClientLifecycle.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.connection.api +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ConnectionClientLifecycle { fun onDisconnectedBySocketProblems() diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionFactory.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionFactory.kt index 70924fbd9..bcd800840 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionFactory.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionFactory.kt @@ -6,6 +6,25 @@ import com.kaspersky.adbserver.connection.implementation.ConnectionServerImplByS import com.kaspersky.adbserver.common.log.logger.Logger import java.net.Socket +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The singleton to provide convenient methods to create Server and Client */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServer.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServer.kt index 30b672784..1ac86dcd4 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServer.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServer.kt @@ -1,3 +1,22 @@ package com.kaspersky.adbserver.connection.api +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ConnectionServer : BaseConnection diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServerLifecycle.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServerLifecycle.kt index 286ee56db..1dca27abb 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServerLifecycle.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/api/ConnectionServerLifecycle.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.connection.api import com.kaspersky.adbserver.common.api.Command import com.kaspersky.adbserver.common.api.CommandResult +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ConnectionServerLifecycle { fun onReceivedTask(command: Command) diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionClientImplBySocket.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionClientImplBySocket.kt index fbd9ec43d..0d3a2db31 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionClientImplBySocket.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionClientImplBySocket.kt @@ -15,6 +15,25 @@ import java.net.Socket import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class ConnectionClientImplBySocket( private val socketCreation: () -> Socket, private val logger: Logger, diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionMaker.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionMaker.kt index b69856111..d16f1feb5 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionMaker.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionMaker.kt @@ -2,6 +2,25 @@ package com.kaspersky.adbserver.connection.implementation import com.kaspersky.adbserver.common.log.logger.Logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The helper to establish a connection correctly according to all possible states and multithread's environment */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionServerImplBySocket.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionServerImplBySocket.kt index f9dd563a5..50e1b126e 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionServerImplBySocket.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ConnectionServerImplBySocket.kt @@ -13,6 +13,25 @@ import com.kaspersky.adbserver.common.log.logger.Logger import java.net.Socket import java.util.concurrent.Executors +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class ConnectionServerImplBySocket( private val socketCreation: () -> Socket, private val commandExecutor: CommandExecutor, diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ResultWaiter.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ResultWaiter.kt index 6ca423ea3..2db253b20 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ResultWaiter.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/ResultWaiter.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.connection.implementation import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The waiter of a result */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapper.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapper.kt index 71f9cab4c..d4bb3b61c 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapper.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapper.kt @@ -4,6 +4,25 @@ import java.io.IOException import java.io.InputStream import java.io.OutputStream +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Wrap of a Socket to restrict possibilities to interact with the Socket directly */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapperImpl.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapperImpl.kt index 9acef8f33..22acd3f65 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapperImpl.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/lightsocket/LightSocketWrapperImpl.kt @@ -4,6 +4,25 @@ import java.io.InputStream import java.io.OutputStream import java.net.Socket +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class LightSocketWrapperImpl(private val socket: Socket) : LightSocketWrapper { diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/ExpectedEOFException.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/ExpectedEOFException.kt index 619e3880f..6b136d1cf 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/ExpectedEOFException.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/ExpectedEOFException.kt @@ -2,4 +2,23 @@ package com.kaspersky.adbserver.connection.implementation.transferring import java.io.EOFException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ExpectedEOFException : EOFException() diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/MessageModels.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/MessageModels.kt index 4bb35738a..bb723f604 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/MessageModels.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/MessageModels.kt @@ -3,6 +3,25 @@ package com.kaspersky.adbserver.connection.implementation.transferring import com.kaspersky.adbserver.common.api.Command import java.io.Serializable +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Data models for Server-Client communication */ diff --git a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/SocketMessagesTransferring.kt b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/SocketMessagesTransferring.kt index 18418e4a5..d0791f7fc 100644 --- a/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/SocketMessagesTransferring.kt +++ b/adb-server/adb-server-connection/src/main/java/com/kaspersky/adbserver/connection/implementation/transferring/SocketMessagesTransferring.kt @@ -7,6 +7,25 @@ import java.io.ObjectInputStream import java.io.ObjectOutputStream import java.util.concurrent.atomic.AtomicBoolean +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class SocketMessagesTransferring private constructor( private val lightSocketWrapper: LightSocketWrapper, private val receiveModelClass: Class, diff --git a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnection.kt b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnection.kt index 8a460efb2..847f2b662 100644 --- a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnection.kt +++ b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnection.kt @@ -4,6 +4,25 @@ import com.kaspersky.adbserver.common.api.CommandExecutor import com.kaspersky.adbserver.common.log.logger.Logger import java.net.Socket +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Please use only this interface to provide sockets for your connection between Desktop and Device * diff --git a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionFactory.kt b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionFactory.kt index 52108e151..233a5ce85 100644 --- a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionFactory.kt +++ b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionFactory.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.desdevconnection +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object DesktopDeviceSocketConnectionFactory { fun getSockets( diff --git a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionForwardImpl.kt b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionForwardImpl.kt index 72b37bc9a..61894095a 100644 --- a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionForwardImpl.kt +++ b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionForwardImpl.kt @@ -7,6 +7,25 @@ import java.net.ServerSocket import java.net.Socket import kotlin.random.Random +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class DesktopDeviceSocketConnectionForwardImpl : DesktopDeviceSocketConnection { companion object { diff --git a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionType.kt b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionType.kt index e9918c06e..a75bc14e8 100644 --- a/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionType.kt +++ b/adb-server/adb-server-desktop-device-connection/src/main/java/com/kaspersky/adbserver/desdevconnection/DesktopDeviceSocketConnectionType.kt @@ -1,5 +1,24 @@ package com.kaspersky.adbserver.desdevconnection +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class DesktopDeviceSocketConnectionType { FORWARD, REVERSE diff --git a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/AdbTerminal.kt b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/AdbTerminal.kt index 8bffa11b0..6c5f96d16 100644 --- a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/AdbTerminal.kt +++ b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/AdbTerminal.kt @@ -8,6 +8,25 @@ import com.kaspersky.adbserver.common.log.LoggerFactory import com.kaspersky.adbserver.common.log.logger.LogLevel import com.kaspersky.adbserver.common.log.logger.Logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object AdbTerminal { private var device: Device? = null diff --git a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/ConnectionTimeException.kt b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/ConnectionTimeException.kt index a58a72c5d..c1e32af89 100644 --- a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/ConnectionTimeException.kt +++ b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/ConnectionTimeException.kt @@ -1,3 +1,22 @@ package com.kaspersky.adbserver.device +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class ConnectionTimeException(override val message: String) : RuntimeException(message) diff --git a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/Device.kt b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/Device.kt index 80a91cb56..a87ccc0b5 100644 --- a/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/Device.kt +++ b/adb-server/adb-server-device/src/main/java/com/kaspersky/adbserver/device/Device.kt @@ -12,6 +12,25 @@ import com.kaspersky.adbserver.desdevconnection.DesktopDeviceSocketConnectionTyp import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class Device private constructor( private val connectionClient: ConnectionClient, private val logger: Logger diff --git a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CmdCommandPerformer.kt b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CmdCommandPerformer.kt index add3d8b20..277693918 100644 --- a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CmdCommandPerformer.kt +++ b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CmdCommandPerformer.kt @@ -5,6 +5,25 @@ import com.kaspersky.adbserver.common.api.ExecutorResultStatus import com.kaspersky.adbserver.common.log.logger.Logger import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class CmdCommandPerformer( private val desktopName: String, private val logger: Logger, diff --git a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CommandExecutorImpl.kt b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CommandExecutorImpl.kt index bf3d8d0e8..4d11e3eb8 100644 --- a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CommandExecutorImpl.kt +++ b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/CommandExecutorImpl.kt @@ -9,6 +9,25 @@ import com.kaspersky.adbserver.commandtypes.ComplexAdbCommand import com.kaspersky.adbserver.common.log.logger.Logger import java.lang.UnsupportedOperationException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class CommandExecutorImpl( private val cmdCommandPerformer: CmdCommandPerformer, private val deviceName: String, diff --git a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Desktop.kt b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Desktop.kt index 84009fbb4..bedca9ca4 100644 --- a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Desktop.kt +++ b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Desktop.kt @@ -5,6 +5,25 @@ import com.kaspersky.adbserver.common.log.LoggerFactory import com.kaspersky.adbserver.common.log.logger.DesktopLogger import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class Desktop( private val cmdCommandPerformer: CmdCommandPerformer, private val presetEmulators: List, diff --git a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/DeviceMirror.kt b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/DeviceMirror.kt index a1bf608a3..e81bebfcf 100644 --- a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/DeviceMirror.kt +++ b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/DeviceMirror.kt @@ -11,6 +11,25 @@ import com.kaspersky.adbserver.common.log.logger.Logger import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicReference +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class DeviceMirror private constructor( private val connectionServer: ConnectionServer, internal val deviceName: String, diff --git a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Main.kt b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Main.kt index 8b008b40f..2dce755d3 100644 --- a/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Main.kt +++ b/adb-server/adbserver-desktop/src/main/java/com/kaspersky/adbserver/desktop/Main.kt @@ -8,6 +8,25 @@ import kotlinx.cli.default import kotlinx.cli.delimiter import java.lang.management.ManagementFactory +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val DESKTOP = "Desktop-" // It is assumed that adb is preinstall and available by "adb" keyword private const val DEFAULT_ADB_PATH = "adb" diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/AllureSupportKaspressoBuilder.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/AllureSupportKaspressoBuilder.kt index 1fb546909..1b16e8cbe 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/AllureSupportKaspressoBuilder.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/AllureSupportKaspressoBuilder.kt @@ -32,6 +32,25 @@ import com.kaspersky.kaspresso.runner.listener.getUniqueListener import com.kaspersky.kaspresso.visual.VisualTestParams import com.kaspersky.kaspresso.visual.VisualTestType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso Builder that includes all appropriate interceptors to support rich Allure reports. * diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/AttachToReport.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/AttachToReport.kt index 1bc83b6e0..19aca93ff 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/AttachToReport.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/AttachToReport.kt @@ -3,6 +3,25 @@ package com.kaspersky.components.alluresupport.files import io.qameta.allure.kotlin.Allure import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + fun File.attachLogcatToAllureReport(): Unit = Allure.lifecycle.addAttachment( name = name, stream = this.inputStream(), diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/dirs/AllureDirsProvider.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/dirs/AllureDirsProvider.kt index 4fcf668e7..a94e0e68a 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/dirs/AllureDirsProvider.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/dirs/AllureDirsProvider.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.files.resources.ResourcesRootDirsProvider import com.kaspersky.kaspresso.internal.extensions.other.createDirIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureDirsProvider( private val defaultDirsProvider: DefaultDirsProvider, private val instrumentation: Instrumentation, diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/AllureResourcesRootDirsProvider.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/AllureResourcesRootDirsProvider.kt index dcb9b5dea..730cf3372 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/AllureResourcesRootDirsProvider.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/AllureResourcesRootDirsProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.alluresupport.files.resources import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface AllureResourcesRootDirsProvider { val allureRootDir: File val stubVideoDir: File diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/AllureResourceFilesProvider.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/AllureResourceFilesProvider.kt index aeb682b1a..fc3f72fe2 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/AllureResourceFilesProvider.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/AllureResourceFilesProvider.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.files.resources.impl.DefaultResourceFilesProvider import com.kaspersky.kaspresso.internal.extensions.other.createFileIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureResourceFilesProvider( defaultResourceFilesProvider: DefaultResourceFilesProvider, private val resourcesRootDirsProvider: AllureResourcesRootDirsProvider, diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/DefaultAllureResourcesRootDirsProvider.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/DefaultAllureResourcesRootDirsProvider.kt index 56410bd3d..ac52c77da 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/DefaultAllureResourcesRootDirsProvider.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/files/resources/impl/DefaultAllureResourcesRootDirsProvider.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.files.resources.impl.DefaultResourcesRootDirsProv import io.qameta.allure.kotlin.util.PropertiesUtils import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultAllureResourcesRootDirsProvider : AllureResourcesRootDirsProvider, ResourcesRootDirsProvider by DefaultResourcesRootDirsProvider() { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/AllureMapperStepInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/AllureMapperStepInterceptor.kt index 9bc87a62e..d7dcaf3c8 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/AllureMapperStepInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/AllureMapperStepInterceptor.kt @@ -8,6 +8,25 @@ import io.qameta.allure.kotlin.model.StepResult import java.util.Stack import java.util.UUID +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureMapperStepInterceptor : StepWatcherInterceptor { private val lifecycle = Allure.lifecycle diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/ScreenshotStepInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/ScreenshotStepInterceptor.kt index 136701f31..aa4151b8b 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/ScreenshotStepInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/step/ScreenshotStepInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.device.screenshots.Screenshots import com.kaspersky.kaspresso.interceptors.watcher.testcase.StepWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotStepInterceptor( private val screenshots: Screenshots ) : StepWatcherInterceptor { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpLogcatTestInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpLogcatTestInterceptor.kt index b531a0f89..92478954c 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpLogcatTestInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpLogcatTestInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.testcases.models.info.TestInfo import com.kaspersky.components.alluresupport.files.attachLogcatToAllureReport import com.kaspersky.kaspresso.device.logcat.dumper.LogcatDumper +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DumpLogcatTestInterceptor( private val logcatDumper: LogcatDumper ) : TestRunWatcherInterceptor { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpViewsTestInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpViewsTestInterceptor.kt index 8c650904b..27c4322f7 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpViewsTestInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/DumpViewsTestInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.testcases.models.info.TestInfo import com.kaspersky.components.alluresupport.files.attachViewHierarchyToAllureReport import com.kaspersky.kaspresso.device.viewhierarchy.ViewHierarchyDumper +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DumpViewsTestInterceptor( private val viewHierarchyDumper: ViewHierarchyDumper ) : TestRunWatcherInterceptor { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/HackyVideoRecordingTestInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/HackyVideoRecordingTestInterceptor.kt index 06de688c9..b75eee415 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/HackyVideoRecordingTestInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/HackyVideoRecordingTestInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.device.video.Videos import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Due to screen recorder bug we have to perform a workaround which requires VideoRecordingTestInterceptor * and MoveReportsInterceptor to be the last two interceptors in allure reports. So if you use VideoRecordingTestInterceptor diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/ScreenshotTestInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/ScreenshotTestInterceptor.kt index 83221bbc0..840430000 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/ScreenshotTestInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/ScreenshotTestInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.testcases.models.info.TestInfo import com.kaspersky.components.alluresupport.files.attachScreenshotToAllureReport import com.kaspersky.kaspresso.device.screenshots.Screenshots +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotTestInterceptor( private val screenshots: Screenshots ) : TestRunWatcherInterceptor { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VideoRecordingTestInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VideoRecordingTestInterceptor.kt index d54160c53..80ad7507f 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VideoRecordingTestInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VideoRecordingTestInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.device.video.Videos import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideoRecordingTestInterceptor( private val videos: Videos ) : TestRunWatcherInterceptor { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VisualTestLateFailInterceptor.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VisualTestLateFailInterceptor.kt index df1b74f25..a16317fb4 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VisualTestLateFailInterceptor.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/interceptors/testrun/VisualTestLateFailInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.device.screenshots.ScreenshotsImpl import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VisualTestLateFailInterceptor : TestRunWatcherInterceptor { override fun onAfterSectionStarted(testInfo: TestInfo) { if (AllureVisualTestFlag.shouldFailLate.get()) { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultInjector.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultInjector.kt index e2f1f38fa..e08527d05 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultInjector.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultInjector.kt @@ -3,6 +3,25 @@ package com.kaspersky.components.alluresupport.results import androidx.test.uiautomator.UiDevice import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureResultInjector( private val parser: AllureResultJsonParser, private val uiDevice: UiDevice, diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultJsonParser.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultJsonParser.kt index 04cb69d44..647b65995 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultJsonParser.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultJsonParser.kt @@ -4,6 +4,25 @@ import com.google.common.io.CharStreams import org.json.JSONObject import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureResultJsonParser { fun getAttachmentSourceFileName(resultFile: File, targetAttachmentName: String): String? { diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultsHack.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultsHack.kt index 2aa05b151..9ee8b0a49 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultsHack.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureResultsHack.kt @@ -12,6 +12,25 @@ import io.qameta.allure.kotlin.Allure import org.junit.runner.Result import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureResultsHack( private val uiDevice: UiDevice, private val visualTestParams: VisualTestParams, diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureVisualTestFlag.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureVisualTestFlag.kt index f56973276..f62db5dc9 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureVisualTestFlag.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/results/AllureVisualTestFlag.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.alluresupport.results import java.util.concurrent.atomic.AtomicBoolean +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + // TODO(Nikita Evdokimov) - Certainly there should be a better way /** * @see com.kaspersky.components.alluresupport.interceptors.testrun.VisualTestLateFailInterceptor diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/runlisteners/AllureRunListener.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/runlisteners/AllureRunListener.kt index 5493dd246..7137728f6 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/runlisteners/AllureRunListener.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/runlisteners/AllureRunListener.kt @@ -11,6 +11,25 @@ import org.junit.runner.Description import org.junit.runner.Result import org.junit.runner.notification.Failure +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * This type is a proxy between kaspresso runner and allure listener. * Since kaspresso uses it's own runner it need to create allure lifecycle diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureScreenshotsComparator.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureScreenshotsComparator.kt index 49cbc1ce8..1edf5d536 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureScreenshotsComparator.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureScreenshotsComparator.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.logger.Logger import com.kaspersky.kaspresso.visual.VisualTestParams import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureScreenshotsComparator( visualTestParams: VisualTestParams, logger: Logger, diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestCase.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestCase.kt index 5930d0449..177907ec8 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestCase.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestCase.kt @@ -9,6 +9,25 @@ import io.qameta.allure.kotlin.Allure import io.qameta.allure.kotlin.model.Status import io.qameta.allure.kotlin.model.StatusDetails +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class AllureVisualTestCase( private val failEarly: Boolean = false, kaspressoBuilder: Kaspresso.Builder = Kaspresso.Builder.withForcedAllureSupport() diff --git a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestWatcher.kt b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestWatcher.kt index 6449caf63..9f7cf8211 100644 --- a/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestWatcher.kt +++ b/allure-support/src/main/kotlin/com/kaspersky/components/alluresupport/visual/AllureVisualTestWatcher.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.visual.VisualTestType import com.kaspersky.kaspresso.visual.VisualTestWatcher import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureVisualTestWatcher( private val params: VisualTestParams, private val logger: Logger, diff --git a/build-logic/publication/src/main/kotlin/com/kaspersky/kaspresso/publication/KotlinLibraryPublishExtension.kt b/build-logic/publication/src/main/kotlin/com/kaspersky/kaspresso/publication/KotlinLibraryPublishExtension.kt index f0b8a810c..d1aa1a52e 100644 --- a/build-logic/publication/src/main/kotlin/com/kaspersky/kaspresso/publication/KotlinLibraryPublishExtension.kt +++ b/build-logic/publication/src/main/kotlin/com/kaspersky/kaspresso/publication/KotlinLibraryPublishExtension.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.publication import org.gradle.api.provider.Property +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Suppress("UnnecessaryAbstractClass") abstract class KotlinLibraryPublishExtension { diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/autoscroll/SemanticsAutoScrollProviderImpl.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/autoscroll/SemanticsAutoScrollProviderImpl.kt index cd40be309..7d76ad11c 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/autoscroll/SemanticsAutoScrollProviderImpl.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/autoscroll/SemanticsAutoScrollProviderImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.params.AutoScrollParams import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.reactivex.exceptions.ExtCompositeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SemanticsAutoScrollProviderImpl( private val logger: UiTestLogger, private val autoScrollParams: AutoScrollParams diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeConfig.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeConfig.kt index 48fbdcf9e..c7631ae7a 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeConfig.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeConfig.kt @@ -10,6 +10,25 @@ import com.kaspersky.components.composesupport.interceptors.watcher.SemanticsWat import com.kaspersky.components.composesupport.interceptors.watcher.impl.LoggingSemanticsWatcherInterceptor import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComposeConfig { class Builder { diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeInterceptorsInjector.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeInterceptorsInjector.kt index 4c847e024..425ba7f7b 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeInterceptorsInjector.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeInterceptorsInjector.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.composesupport.interceptors.tolibrary.ComposeSem import com.kaspersky.components.composesupport.interceptors.watcher.SemanticsWatcherInterceptor import io.github.kakaocup.compose.KakaoCompose +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ComposeInterceptorsInjector { fun injectKaspressoInKakaoCompose( diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeSupportKaspressoBuilder.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeSupportKaspressoBuilder.kt index 511c75d13..6424a5a90 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeSupportKaspressoBuilder.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/config/ComposeSupportKaspressoBuilder.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.composesupport.config import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso Builder that includes all appropriate interceptors to support Jetpack Compose. */ diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/KNode.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/KNode.kt index 208ee7f74..7c0b14874 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/KNode.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/KNode.kt @@ -6,6 +6,25 @@ import io.github.kakaocup.compose.node.builder.NodeMatcher import io.github.kakaocup.compose.node.builder.ViewBuilder import io.github.kakaocup.compose.node.core.BaseNode +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class KNode : BaseNode, KNodeActions { constructor( semanticsProvider: SemanticsNodeInteractionsProvider, diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/KNodeActions.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/KNodeActions.kt index 3c46d2eea..5a590fb7a 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/KNodeActions.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/KNodeActions.kt @@ -9,6 +9,25 @@ import com.kaspersky.components.composesupport.core.actions.options.LongClickCon import io.github.kakaocup.compose.intercept.delegate.ComposeDelegate import io.github.kakaocup.compose.intercept.operation.ComposeOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface KNodeActions { val delegate: ComposeDelegate diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/DoubleClickConfig.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/DoubleClickConfig.kt index 0ef5f7723..eddf8a7fc 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/DoubleClickConfig.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/DoubleClickConfig.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.composesupport.core.actions.options +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class DoubleClickConfig( val xOffset: Float = 0F, val yOffset: Float = 0F, diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/LongClickConfig.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/LongClickConfig.kt index e606aef3b..f9081aa49 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/LongClickConfig.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/core/actions/options/LongClickConfig.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.composesupport.core.actions.options +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class LongClickConfig( val xOffset: Float = 0F, val yOffset: Float = 0F, diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/flakysafety/ComposeFlakySafetyScalper.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/flakysafety/ComposeFlakySafetyScalper.kt index 4ab7f4c49..d1b22d145 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/flakysafety/ComposeFlakySafetyScalper.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/flakysafety/ComposeFlakySafetyScalper.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.composesupport.interceptors.behavior.impl.flakys import com.kaspersky.components.composesupport.interceptors.watcher.SemanticsWatcherInterceptor import com.kaspersky.kaspresso.flakysafety.scalpel.external.ExternalFlakySafetyScalper +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Removes and restores compose flaky safety interceptor so the `flakySafely` expression works correctly * @see com.kaspersky.kaspresso.flakysafety.scalpel.FlakySafeInterceptorScalpel diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/ComposeBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/ComposeBehaviorInterceptor.kt index 128e2e521..431088f66 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/ComposeBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/ComposeBehaviorInterceptor.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.composesupport.interceptors.behavior +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ComposeBehaviorInterceptor { /** diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/SemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/SemanticsBehaviorInterceptor.kt index 157aa9838..2c4925747 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/SemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/SemanticsBehaviorInterceptor.kt @@ -4,6 +4,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [ComposeBehaviorInterceptor] interface for intercepting [ComposeInteraction.perform] and * [ComposeInteraction.check] behavior. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/autoscroll/AutoScrollSemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/autoscroll/AutoScrollSemanticsBehaviorInterceptor.kt index 99d4410aa..57823c81b 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/autoscroll/AutoScrollSemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/autoscroll/AutoScrollSemanticsBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsBehaviorInterceptor] and [AutoScrollProvider] interfaces. * Provides autoscroll on failure functionality for [ComposeInteraction.perform] and [ComposeInteraction.check] calls. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/elementloader/ElementLoaderSemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/elementloader/ElementLoaderSemanticsBehaviorInterceptor.kt index b126c9cdb..a70f9ab22 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/elementloader/ElementLoaderSemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/elementloader/ElementLoaderSemanticsBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsBehaviorInterceptor] and [ElementLoaderProvider] interfaces. * Provides element reloading on failure functionality for [ComposeInteraction.perform] and [ComposeInteraction.check] calls. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/failure/FailureLoggingSemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/failure/FailureLoggingSemanticsBehaviorInterceptor.kt index 0397f762f..530f82c7f 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/failure/FailureLoggingSemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/failure/FailureLoggingSemanticsBehaviorInterceptor.kt @@ -8,6 +8,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [ComposeInteraction.perform] and [ComposeInteraction.check] calls. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/flakysafety/FlakySafeSemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/flakysafety/FlakySafeSemanticsBehaviorInterceptor.kt index 534ce44d8..2837a6d25 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/flakysafety/FlakySafeSemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/flakysafety/FlakySafeSemanticsBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [ComposeInteraction.perform] and [ComposeInteraction.check] calls. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/systemsafety/SystemDialogSafetySemanticsBehaviorInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/systemsafety/SystemDialogSafetySemanticsBehaviorInterceptor.kt index a985e9cd9..08b2f8f32 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/systemsafety/SystemDialogSafetySemanticsBehaviorInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/behavior/impl/systemsafety/SystemDialogSafetySemanticsBehaviorInterceptor.kt @@ -11,6 +11,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [ComposeInteraction.perform] and [ComposeInteraction.check] calls. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/tolibrary/ComposeSemanticsInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/tolibrary/ComposeSemanticsInterceptor.kt index c0506a9ee..c72f8a7d9 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/tolibrary/ComposeSemanticsInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/tolibrary/ComposeSemanticsInterceptor.kt @@ -7,6 +7,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kakao-Compose ComposeInteraction interceptor. */ diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/ComposeWatcherInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/ComposeWatcherInterceptor.kt index 84ce6cebd..f72c04b47 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/ComposeWatcherInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/ComposeWatcherInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.composesupport.interceptors.watcher import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors that are watching the default interaction in Kautomator. */ diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/SemanticsWatcherInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/SemanticsWatcherInterceptor.kt index 7b7058728..56783bb40 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/SemanticsWatcherInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/SemanticsWatcherInterceptor.kt @@ -4,6 +4,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [SemanticsWatcherInterceptor] interface for intercepting (only watching) [ComposeInteraction.perform] and * [ComposeInteraction.check] behavior. diff --git a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/impl/LoggingSemanticsWatcherInterceptor.kt b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/impl/LoggingSemanticsWatcherInterceptor.kt index a69e21669..7a53d9a8a 100644 --- a/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/impl/LoggingSemanticsWatcherInterceptor.kt +++ b/compose-support/src/main/java/com/kaspersky/components/composesupport/interceptors/watcher/impl/LoggingSemanticsWatcherInterceptor.kt @@ -6,6 +6,25 @@ import io.github.kakaocup.compose.intercept.interaction.ComposeInteraction import io.github.kakaocup.compose.intercept.operation.ComposeAction import io.github.kakaocup.compose.intercept.operation.ComposeAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [SemanticsWatcherInterceptor] that logs info about [ComposeAssertion] or [ComposeAction] * and [ComposeInteraction] on which its activities are performing. diff --git a/kaspresso/src/main/java/androidx/test/espresso/assertion/ViewAssertionExt.kt b/kaspresso/src/main/java/androidx/test/espresso/assertion/ViewAssertionExt.kt index ef37c4b49..c057cb05f 100644 --- a/kaspresso/src/main/java/androidx/test/espresso/assertion/ViewAssertionExt.kt +++ b/kaspresso/src/main/java/androidx/test/espresso/assertion/ViewAssertionExt.kt @@ -3,6 +3,25 @@ package androidx.test.espresso.assertion import androidx.test.espresso.ViewAssertion import org.hamcrest.StringDescription +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @return a [String] description of [ViewAssertion]. */ diff --git a/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionExt.kt b/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionExt.kt index 89670139f..d0a411744 100644 --- a/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionExt.kt +++ b/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionExt.kt @@ -5,6 +5,25 @@ import androidx.test.espresso.web.webdriver.WebDriverAtomScriptsProvider import org.hamcrest.Matcher import org.hamcrest.StringDescription +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Uses [WebViewAssertions.ResultCheckingWebAssertion] class, that has package-local access in Espresso, so it has to be * in the same package. diff --git a/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionProxy.kt b/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionProxy.kt index 25209bf91..e57a9053b 100644 --- a/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionProxy.kt +++ b/kaspresso/src/main/java/androidx/test/espresso/web/assertion/WebAssertionProxy.kt @@ -4,6 +4,25 @@ import android.webkit.WebView import com.kaspersky.kaspresso.interceptors.watcher.view.WebAssertionWatcherInterceptor import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * A proxy-wrapper of [WebAssertion] for [watcherInterceptors] calls. * diff --git a/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/AtomExt.kt b/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/AtomExt.kt index 98e780cd0..3ad4c5dbc 100644 --- a/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/AtomExt.kt +++ b/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/AtomExt.kt @@ -13,6 +13,25 @@ import androidx.test.espresso.web.webdriver.WebDriverAtomScripts.GET_VISIBLE_TEX import androidx.test.espresso.web.webdriver.WebDriverAtomScripts.SCROLL_INTO_VIEW_ANDROID import androidx.test.espresso.web.webdriver.WebDriverAtomScripts.SEND_KEYS_ANDROID +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Uses [WebDriverAtomScripts] class, that has package-local access in Espresso, so it has to be in the same package. * diff --git a/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/WebDriverAtomScriptsProvider.kt b/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/WebDriverAtomScriptsProvider.kt index cbb46f0fd..246da1614 100644 --- a/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/WebDriverAtomScriptsProvider.kt +++ b/kaspresso/src/main/java/androidx/test/espresso/web/webdriver/WebDriverAtomScriptsProvider.kt @@ -1,5 +1,24 @@ package androidx.test.espresso.web.webdriver +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides [WebDriverAtomScripts] types to descendants as they are with package-local access. */ diff --git a/kaspresso/src/main/java/io/reactivex/exceptions/ExtCompositeException.kt b/kaspresso/src/main/java/io/reactivex/exceptions/ExtCompositeException.kt index decf7bb5c..33815e339 100644 --- a/kaspresso/src/main/java/io/reactivex/exceptions/ExtCompositeException.kt +++ b/kaspresso/src/main/java/io/reactivex/exceptions/ExtCompositeException.kt @@ -1,3 +1,23 @@ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Copyright (c) 2016-present, RxJava Contributors. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/ClassificatorAnnotations.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/ClassificatorAnnotations.kt index 6df9945e3..1c5de31c1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/ClassificatorAnnotations.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/ClassificatorAnnotations.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.annotations +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.RUNTIME) annotation class Regression diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/RequiresAdbServer.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/RequiresAdbServer.kt index 8a8678456..5700427f1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/RequiresAdbServer.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/annotations/RequiresAdbServer.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.annotations +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Special annotation to mark methods or classes that require AdbServer to be started for execution * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProvider.kt index 4055b0347..b2660b4d4 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.autoscroll +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide autoscroll functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProviderImpl.kt index 140f6b0a5..d51674b66 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/AutoScrollProviderImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.isAllowed import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [AutoScrollProvider] interface for [ViewInteraction] */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/ObjectAutoScrollProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/ObjectAutoScrollProviderImpl.kt index fedcb90a2..89ea05625 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/ObjectAutoScrollProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/ObjectAutoScrollProviderImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.isAllowed import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [AutoScrollProvider] interface for [UiObjectInteraction] */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/WebAutoScrollProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/WebAutoScrollProviderImpl.kt index e8911a319..73dd1d8c4 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/WebAutoScrollProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/autoscroll/WebAutoScrollProviderImpl.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.isAllowed import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [AutoScrollProvider] interface for [Web.WebInteraction] */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeExecutor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeExecutor.kt index 233647ae5..f9172911c 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeExecutor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeExecutor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.logger.UiTestLogger import io.reactivex.exceptions.ExtCompositeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class ComposeExecutor( private val kaspresso: Kaspresso ) { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProvider.kt index 11ec9fd7d..31d2b1dc9 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProvider.kt @@ -15,6 +15,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion import com.kaspersky.kaspresso.compose.pack.ActionsOnElementsPack import com.kaspersky.kaspresso.compose.pack.ActionsPack +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide composing actions and assertions functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProviderImpl.kt index 2185f4efe..2eec88e88 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/ComposeProviderImpl.kt @@ -16,6 +16,25 @@ import com.kaspersky.kaspresso.compose.pack.ActionsOnElementsPack import com.kaspersky.kaspresso.compose.pack.ActionsPack import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [ComposeProvider] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProvider.kt index bfc1d5c8e..7a190157f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProvider.kt @@ -4,6 +4,25 @@ import io.github.kakaocup.kakao.web.WebElementBuilder import com.kaspersky.kaspresso.compose.pack.ActionsOnWebElementsPack import com.kaspersky.kaspresso.compose.pack.ActionsPack +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide the composing actions and assertions on web views functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProviderImpl.kt index 880410cca..8179bad34 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/WebComposeProviderImpl.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.compose.pack.ActionsOnWebElementsPack import com.kaspersky.kaspresso.compose.pack.ActionsPack import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [WebComposeProvider] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnElementsPack.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnElementsPack.kt index d464a4eee..b25412254 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnElementsPack.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnElementsPack.kt @@ -15,6 +15,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranch import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranchBuilder +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The builder class for parameters of [com.kaspersky.kaspresso.compose.ComposeProvider.compose] method. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnWebElementsPack.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnWebElementsPack.kt index d590dffc5..d17a6e312 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnWebElementsPack.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsOnWebElementsPack.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranch import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranchBuilder import kotlin.properties.Delegates +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The builder class for parameters of [com.kaspersky.kaspresso.compose.WebComposeProvider.compose] method. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsPack.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsPack.kt index 93c5bb830..24129a120 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsPack.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/ActionsPack.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.compose.pack import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranch import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranchBuilder +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The builder class for parameters of [com.kaspersky.kaspresso.compose.ComposeProvider.compose] and * [com.kaspersky.kaspresso.compose.WebComposeProvider.compose]] methods. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranch.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranch.kt index 1f2a0e833..da89112aa 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranch.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranch.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.compose.pack.branch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base data class using in compose */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranchBuilder.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranchBuilder.kt index 97b942b2e..365499451 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranchBuilder.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComplexComposeBranchBuilder.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.compose.pack.branch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Builder of ComplexComposeBranch's using in compose */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComposeBuilderException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComposeBuilderException.kt index 82154787e..e0cd9c83b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComposeBuilderException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/compose/pack/branch/ComposeBuilderException.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.compose.pack.branch import com.kaspersky.kaspresso.compose.ComposeProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Exception throwing in case of incorrect [ComposeProviderImpl.compose] expression building */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/Device.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/Device.kt index 0ac59362b..3fb740281 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/Device.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/Device.kt @@ -19,6 +19,25 @@ import com.kaspersky.kaspresso.device.phone.Phone import com.kaspersky.kaspresso.device.screenshots.Screenshots import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The provider of managers for all off-screen work. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/Accessibility.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/Accessibility.kt index e8d4f2144..b1d580ec5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/Accessibility.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/Accessibility.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.accessibility +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with accessibility. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/AccessibilityImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/AccessibilityImpl.kt index 072ea0f54..b59decd34 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/AccessibilityImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/accessibility/AccessibilityImpl.kt @@ -7,6 +7,25 @@ import androidx.test.uiautomator.Configurator import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Accessibility] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/Activities.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/Activities.kt index bdbfc6646..f76436600 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/Activities.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/Activities.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.activities import android.app.Activity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with activities. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/ActivitiesImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/ActivitiesImpl.kt index 304c2b0bf..11efc7577 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/ActivitiesImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/activities/ActivitiesImpl.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.logger.UiTestLogger import org.hamcrest.CoreMatchers import org.junit.Assert +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Activities] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/Apps.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/Apps.kt index 46eb03f17..1346d01ca 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/Apps.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/Apps.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.device.apps import android.net.Uri import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with installer, launcher and package manager. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/AppsImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/AppsImpl.kt index e6ad6ba7c..54ae97a47 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/AppsImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/apps/AppsImpl.kt @@ -15,6 +15,25 @@ import org.hamcrest.CoreMatchers import org.hamcrest.MatcherAssert import org.junit.Assert +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Apps] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/Exploit.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/Exploit.kt index c8754db15..fe86fb17b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/Exploit.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/Exploit.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.exploit import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for exploitation. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/ExploitImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/ExploitImpl.kt index 0f9d2c352..7a01cbdc2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/ExploitImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/exploit/ExploitImpl.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Exploit] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/Files.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/Files.kt index 7298461f3..6cf413a42 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/Files.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/Files.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.files import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with file permissions. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/FilesImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/FilesImpl.kt index 7309a3175..fb7eb3738 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/FilesImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/files/FilesImpl.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.device.files import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Files] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/Keyboard.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/Keyboard.kt index 7b387f269..86fcb596f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/Keyboard.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/Keyboard.kt @@ -6,6 +6,25 @@ import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.UiObject import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Use this API only if neither Espresso, nor UiAutomator * work for some reasons. E.g. because of animations. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/KeyboardImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/KeyboardImpl.kt index 4bcec4bb4..bfd7413cc 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/KeyboardImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/keyboard/KeyboardImpl.kt @@ -7,6 +7,25 @@ import androidx.test.uiautomator.UiObject import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Keyboard] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/Language.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/Language.kt index be010701d..14cc92e17 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/Language.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/Language.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.device.languages import androidx.annotation.MainThread import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with languages */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/LanguageImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/LanguageImpl.kt index 76c9a9ad6..0d3996715 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/LanguageImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/languages/LanguageImpl.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.docloc.SystemLanguage import com.kaspersky.kaspresso.logger.UiTestLogger import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [Language] */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/locales/Locales.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/locales/Locales.kt index a8a7cd1e4..5db0914a8 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/locales/Locales.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/locales/Locales.kt @@ -4,6 +4,25 @@ import androidx.test.platform.app.InstrumentationRegistry import com.kaspersky.kaspresso.logger.UiTestLogger import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The utility class for handling locale parsing. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/Location.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/Location.kt index f7e8bcc44..397fee949 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/Location.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/Location.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.location import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with device's location. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/LocationImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/LocationImpl.kt index 104be28fe..0cc05c411 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/LocationImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/location/LocationImpl.kt @@ -4,6 +4,25 @@ import android.os.Build import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Location] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/Logcat.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/Logcat.kt index 0ce9f82bf..54b686d8f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/Logcat.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/Logcat.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.logcat import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with logcat. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatBufferSize.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatBufferSize.kt index 6412ac4fc..4f4fffb32 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatBufferSize.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatBufferSize.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.logcat +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class LogcatBufferSize(val size: Int, val dimension: Dimension) { enum class Dimension(val stringValue: String) { KILOBYTES("K"), diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatImpl.kt index 2638166eb..593a40236 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/LogcatImpl.kt @@ -8,6 +8,25 @@ import java.io.BufferedReader import java.io.File import java.io.InputStreamReader +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LogcatImpl( private val logger: UiTestLogger, private val adbServer: AdbServer, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumper.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumper.kt index 8436cb3fe..469097e01 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumper.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumper.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.logcat.dumper import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface LogcatDumper { /** diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumperImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumperImpl.kt index 61296c47f..1d3183385 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumperImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/logcat/dumper/LogcatDumperImpl.kt @@ -9,6 +9,25 @@ import java.text.SimpleDateFormat import java.util.Date import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LogcatDumperImpl( private val logger: UiTestLogger, private val resourceFilesProvider: ResourceFilesProvider, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/Network.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/Network.kt index b7ff445eb..3fa1373c0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/Network.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/Network.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.network +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with network settings. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/NetworkImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/NetworkImpl.kt index dd2186fcb..0958188b6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/NetworkImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/network/NetworkImpl.kt @@ -18,6 +18,25 @@ import com.kaspersky.kaspresso.internal.systemscreen.WiFiSettingsScreen import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Network] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissions.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissions.kt index 39c5fac8c..eee1c5af9 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissions.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissions.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.permissions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to grant any permissions (i.e. signature permissions) unfairly without any interaction with the user. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissionsImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissionsImpl.kt index 09a70eb7c..a0413ea10 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissionsImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/HackPermissionsImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [HackPermissions] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/Permissions.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/Permissions.kt index 0ff37ec16..5abbcb4bb 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/Permissions.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/Permissions.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.permissions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with permissions fairly by real permission dialogs. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/PermissionsImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/PermissionsImpl.kt index 940b4f8b7..ea007f185 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/PermissionsImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/permissions/PermissionsImpl.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.internal.wait.wait import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Permissions] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/Phone.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/Phone.kt index 9752d8c68..06e1156ea 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/Phone.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/Phone.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.phone import com.kaspersky.kaspresso.annotations.RequiresAdbServer +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to work with telephony. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/PhoneImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/PhoneImpl.kt index 5f5ae2ce9..69c112ecb 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/PhoneImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/phone/PhoneImpl.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.device.phone import com.kaspersky.kaspresso.device.server.AdbServer import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Phone] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/Screenshots.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/Screenshots.kt index a8cc5478c..724a2dcad 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/Screenshots.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/Screenshots.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.screenshots import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to make screenshots. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/ScreenshotsImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/ScreenshotsImpl.kt index a33cba435..054a27ad8 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/ScreenshotsImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/ScreenshotsImpl.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.visual.VisualTestParams import com.kaspersky.kaspresso.visual.VisualTestType import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [Screenshots] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotDirectoryProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotDirectoryProvider.kt index 3c25bb5b8..c7b5e601d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotDirectoryProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotDirectoryProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotfiles import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Default implementation of [ScreenshotDirectoryProvider] * If [groupByRunNumbers] is true it groups screenshots by run numbers of tests. It allows to save all screenshots of a test diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotNameProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotNameProvider.kt index 6200c6b34..e69160dd2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotNameProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/DefaultScreenshotNameProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotfiles +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Default implementation of [ScreenshotFileProvider] * If [addTimestamps] is true it adds timestamps to names like that "1570158949869_ScreenshotSampleTest_step_1.png" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotDirectoryProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotDirectoryProvider.kt index 1d03518ba..83823d692 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotDirectoryProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotDirectoryProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotfiles +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides a directory for screenshots of a separate test */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotNameProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotNameProvider.kt index 08f97ffd6..e45bd1f3a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotNameProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/ScreenshotNameProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotfiles +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides names for screenshots */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/TestMethod.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/TestMethod.kt index 3205f1bc8..9b720ad0e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/TestMethod.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotfiles/TestMethod.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotfiles +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Deprecated( "The work with screenshots and relative resource providers was redesigned.\n" + "Please migrate to new system of work with resources presented in 'files/resources' folder.\n" + diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/CombinedScreenshotMaker.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/CombinedScreenshotMaker.kt index 91d93e59c..cf1c9307a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/CombinedScreenshotMaker.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/CombinedScreenshotMaker.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotmaker import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Calls [preferredScreenshotMaker] and fallbacks to [fallbackScreenshotMaker] on fail */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/DocLocScreenshotMaker.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/DocLocScreenshotMaker.kt index 147229ae5..b07f8e982 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/DocLocScreenshotMaker.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/DocLocScreenshotMaker.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotmaker import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Calls [screenshotMaker] on default screenshots and [fullWindowScreenshotMaker] on full window screenshots */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ExternalScreenshotMaker.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ExternalScreenshotMaker.kt index c3c4ee2a0..7cc4b57f5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ExternalScreenshotMaker.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ExternalScreenshotMaker.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.params.ScreenshotParams import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Captures spoon-compatible screenshots by uiautomator. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/InternalScreenshotMaker.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/InternalScreenshotMaker.kt index 64d664bdc..47ded3651 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/InternalScreenshotMaker.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/InternalScreenshotMaker.kt @@ -13,6 +13,25 @@ import java.io.File import java.io.FileOutputStream import java.util.concurrent.CountDownLatch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Captures the view of a current activity */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ScreenshotMaker.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ScreenshotMaker.kt index a09524e7d..93f367d61 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ScreenshotMaker.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/screenshots/screenshotmaker/ScreenshotMaker.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.screenshots.screenshotmaker import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Creates and saves a screenshot */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServer.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServer.kt index 6ae051da0..754b7938d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServer.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServer.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.server import android.annotation.SuppressLint +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * This is a comfortable wrapper to work with AdbServer repository. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerImpl.kt index 1c1c6b93c..0f4ef3079 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerImpl.kt @@ -8,6 +8,25 @@ import com.kaspersky.adbserver.common.log.logger.Logger import com.kaspersky.kaspresso.internal.exceptions.AdbServerException import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [AdbServer] interface. Encapsulates all work with adb server. * Please, pay attention to the field [AdbServerLogsType] that provides several types to show logs from adb-server (device part). diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerLoggerKaspressoImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerLoggerKaspressoImpl.kt index 3a2ee76f0..f46fe16da 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerLoggerKaspressoImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/server/AdbServerLoggerKaspressoImpl.kt @@ -5,6 +5,25 @@ import com.kaspersky.adbserver.common.log.logger.Logger import com.kaspersky.adbserver.common.log.utils.AdbLoggerReflection import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class AdbServerLoggerKaspressoImpl( private val showLogLevel: LogLevel, private val logger: UiTestLogger diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/Videos.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/Videos.kt index 2b272f613..fdd3db2a1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/Videos.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/Videos.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.video import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface Videos { fun record(tag: String) fun save() diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/VideosImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/VideosImpl.kt index 0f7263c79..ce2706c85 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/VideosImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/VideosImpl.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.files.resources.ResourceFilesProvider import com.kaspersky.kaspresso.logger.UiTestLogger import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideosImpl( private val logger: UiTestLogger, private val resourceFilesProvider: ResourceFilesProvider, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorder.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorder.kt index 16cb50c15..406ec0ca6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorder.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorder.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.video.recorder import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface VideoRecorder { /** diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorderImpl.kt index 6e2c1ca7b..d91381539 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecorderImpl.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.VideoParams import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideoRecorderImpl( private val instrumentalDependencyProvider: InstrumentalDependencyProvider, private val logger: UiTestLogger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecordingThread.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecordingThread.kt index 640ee7aca..15a73617c 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecordingThread.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/video/recorder/VideoRecordingThread.kt @@ -15,6 +15,25 @@ import com.kaspersky.kaspresso.params.VideoParams import java.io.File import kotlin.math.min +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideoRecordingThread( private val device: UiDevice, private val logger: UiTestLogger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumper.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumper.kt index fff1f7cf9..edddd609a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumper.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumper.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.device.viewhierarchy import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ViewHierarchyDumper { /** diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumperImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumperImpl.kt index a44a6c9d1..7f9b35a88 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumperImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/device/viewhierarchy/ViewHierarchyDumperImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.logger.UiTestLogger import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ViewHierarchyDumperImpl( private val instrumentalDependencyProvider: InstrumentalDependencyProvider, private val logger: UiTestLogger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocException.kt index 6e0784189..7981045ce 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocException.kt @@ -1,3 +1,22 @@ package com.kaspersky.kaspresso.docloc +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DocLocException(message: String?) : RuntimeException(message) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocScreenshotCapturer.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocScreenshotCapturer.kt index 4baac2013..29a0e05d7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocScreenshotCapturer.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/DocLocScreenshotCapturer.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.files.resources.ResourceFilesProvider import com.kaspersky.kaspresso.internal.wait.wait import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The class for saving and clearing docloc screenshots with metadata. * @param screenshotRootDir directory to save screenshots and metadata. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/SystemLanguage.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/SystemLanguage.kt index 6cbb768ef..28c554f53 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/SystemLanguage.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/SystemLanguage.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.device.permissions.HackPermissions import com.kaspersky.kaspresso.logger.UiTestLogger import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + open class SystemLanguage( private val context: Context, private val logger: UiTestLogger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/MetadataModels.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/MetadataModels.kt index 3b242a961..45c502789 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/MetadataModels.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/MetadataModels.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.docloc.metadata +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal data class Metadata(val window: Window) internal data class Window( diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/ActivityMetadataExtractor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/ActivityMetadataExtractor.kt index b3b43f27a..212f44f74 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/ActivityMetadataExtractor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/ActivityMetadataExtractor.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.docloc.metadata.Metadata import com.kaspersky.kaspresso.docloc.metadata.Window import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The utility class to collect metadata from a window. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractor.kt index 34c3e61b4..d544f2691 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.docloc.metadata.extractor import com.kaspersky.kaspresso.docloc.metadata.Metadata +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal interface MetadataExtractor { fun getMetadata(): Metadata } diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractorHelper.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractorHelper.kt index 5fc517b2c..619c74616 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractorHelper.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/MetadataExtractorHelper.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.docloc.metadata.extractor import com.kaspersky.kaspresso.docloc.metadata.LocalizedString +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class MetadataExtractorHelper { fun resolveAmbiguous(localizedStrings: List): List { return localizedStrings.groupBy { it.locValueDescription } diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/UiMetadataExtractor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/UiMetadataExtractor.kt index 23c95d8ac..e240bc012 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/UiMetadataExtractor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/extractor/UiMetadataExtractor.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.docloc.metadata.Metadata import com.kaspersky.kaspresso.docloc.metadata.Window import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class UiMetadataExtractor( private val uiDevice: UiDevice, private val activities: Activities, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/DefaultMetadataSaver.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/DefaultMetadataSaver.kt index daa6eae94..c24846062 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/DefaultMetadataSaver.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/DefaultMetadataSaver.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.toXml import com.kaspersky.kaspresso.logger.UiTestLogger import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class DefaultMetadataSaver( private val activities: Activities, private val apps: Apps, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/MetadataSaver.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/MetadataSaver.kt index b432d7bfa..8848e7794 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/MetadataSaver.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/metadata/saver/MetadataSaver.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.docloc.metadata.saver import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface MetadataSaver { fun saveScreenshotMetadata(folderPath: File, name: String) } diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/LocaleRule.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/LocaleRule.kt index 77782bae5..d0ae2f289 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/LocaleRule.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/LocaleRule.kt @@ -8,6 +8,25 @@ import org.junit.rules.TestRule import org.junit.runner.Description import org.junit.runners.model.Statement +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The test rule to switch locales. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/TestFailRule.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/TestFailRule.kt index 240804e50..b447774d6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/TestFailRule.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/TestFailRule.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.docloc.DocLocScreenshotCapturer import org.junit.rules.TestWatcher import org.junit.runner.Description +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The test rule to capture a screenshot in case of unexpected docloc screenshot test failure. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/ToggleNightModeRule.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/ToggleNightModeRule.kt index 321c5b66b..b2d2d797d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/ToggleNightModeRule.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/docloc/rule/ToggleNightModeRule.kt @@ -8,6 +8,25 @@ import org.junit.rules.TestRule import org.junit.runner.Description import org.junit.runners.model.Statement +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ToggleNightModeRule internal constructor( private val device: Device, private val toggleNightMode: Boolean, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProvider.kt index 116e422eb..05bce748f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.elementloader +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide element loader functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProviderImpl.kt index 462f7591e..4323e2576 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/elementloader/ElementLoaderProviderImpl.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.isAllowed import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.ElementLoaderParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [ElementLoaderProvider] interface */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/MainSectionEnricher.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/MainSectionEnricher.kt index 64b2cc6bd..e79ccb0f2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/MainSectionEnricher.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/MainSectionEnricher.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.enricher import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Special object for enriching 'run'-block functionality. * With this object you can add some additional test steps for each TestCase, that has this enricher, like this: diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/impl/composite/CompositeMainSectionEnricher.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/impl/composite/CompositeMainSectionEnricher.kt index 8bb761ed8..b48f43a13 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/impl/composite/CompositeMainSectionEnricher.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/enricher/impl/composite/CompositeMainSectionEnricher.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.forEachSafely import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [MainSectionEnricher] interface. * Composes all of [MainSectionEnricher]s list into one composite [MainSectionEnricher] that is actually diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProvider.kt index 025d45e68..61a0a20d9 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProvider.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.failure import android.view.View import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An interface to provide the logging failures functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProviderImpl.kt index cccce9578..4334ff5de 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/FailureLoggingProviderImpl.kt @@ -9,6 +9,25 @@ import io.reactivex.exceptions.ExtCompositeException import junit.framework.AssertionFailedError import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [FailureLoggingProvider] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/LoggingFailureHandler.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/LoggingFailureHandler.kt index f326f6978..88ecfcd61 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/LoggingFailureHandler.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/failure/LoggingFailureHandler.kt @@ -5,6 +5,25 @@ import androidx.test.espresso.FailureHandler import com.kaspersky.kaspresso.logger.UiTestLogger import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [FailureHandler] interface that logs rich description of failure. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DefaultDirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DefaultDirsProvider.kt index 439e2bac0..287ae2c30 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DefaultDirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DefaultDirsProvider.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.instrumental.InstrumentalDependencyProvider import com.kaspersky.kaspresso.internal.extensions.other.createDirIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultDirsProvider( private val instrumentationDependencyProvider: InstrumentalDependencyProvider ) : DirsProvider { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DirsProvider.kt index 98b631c9f..4c5fd6f69 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/dirs/DirsProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.dirs import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface DirsProvider { fun provideNew(dest: File): File fun provideCleared(dest: File): File diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/FileExtension.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/FileExtension.kt index 280593e32..55cb8234f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/FileExtension.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/FileExtension.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.files.extensions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class FileExtension { TXT { override fun toString() = ".txt" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/StackTraceExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/StackTraceExt.kt index 86399cafe..95a155c68 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/StackTraceExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/extensions/StackTraceExt.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.files.extensions import android.os.Build import com.kaspersky.kaspresso.files.models.TestMethod +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val TEST_CASE_CLASS_JUNIT_3 = "android.test.InstrumentationTestCase" private const val TEST_CASE_METHOD_JUNIT_3 = "runMethod" private const val TEST_CASE_CLASS_JUNIT_4 = "org.junit.runners.model.FrameworkMethod$1" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/models/TestMethod.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/models/TestMethod.kt index 5703cef0e..250e471c7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/models/TestMethod.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/models/TestMethod.kt @@ -1,3 +1,22 @@ package com.kaspersky.kaspresso.files.models +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class TestMethod(val className: String, val methodName: String) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFileNamesProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFileNamesProvider.kt index aa5b13721..99874d0b6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFileNamesProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFileNamesProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.files.resources +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides names for resources */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFilesProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFilesProvider.kt index 5b46a1f8f..966f979ef 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFilesProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourceFilesProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.resources import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides files for resources */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirNameProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirNameProvider.kt index 775d72155..1eeeada7e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirNameProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirNameProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.resources import com.kaspersky.kaspresso.files.models.TestMethod +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides directory names for resources */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirsProvider.kt index 68318907c..2c83b0275 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesDirsProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.resources import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides directories for resources */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesRootDirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesRootDirsProvider.kt index afb8957ab..3d3a0dfa7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesRootDirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/ResourcesRootDirsProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.resources import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides root directories for resources */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFileNamesProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFileNamesProvider.kt index b3afb37d1..e42f9f04b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFileNamesProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFileNamesProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.files.resources.impl import com.kaspersky.kaspresso.files.resources.ResourceFileNamesProvider +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultResourceFileNamesProvider( private val addTimestamps: Boolean ) : ResourceFileNamesProvider { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFilesProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFilesProvider.kt index f7179199f..3df982cbc 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFilesProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourceFilesProvider.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.files.resources.ResourcesRootDirsProvider import com.kaspersky.kaspresso.internal.extensions.other.createFileIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultResourceFilesProvider( private val resourcesRootDirsProvider: ResourcesRootDirsProvider, private val resourcesDirsProvider: ResourcesDirsProvider, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirNameProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirNameProvider.kt index 93a782487..ecc416e50 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirNameProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirNameProvider.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.files.models.TestMethod import com.kaspersky.kaspresso.files.resources.ResourcesDirNameProvider import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultResourcesDirNameProvider : ResourcesDirNameProvider { override fun provideResourcesDirName(testMethod: TestMethod): String { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirsProvider.kt index 0f2cd1737..47ea5d34a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesDirsProvider.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.files.resources.ResourcesDirsProvider import com.kaspersky.kaspresso.internal.extensions.other.createDirIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultResourcesDirsProvider( private val dirsProvider: DirsProvider, private val resourcesDirNameProvider: ResourcesDirNameProvider, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesRootDirsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesRootDirsProvider.kt index b5281a001..3ce47ab85 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesRootDirsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/DefaultResourcesRootDirsProvider.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.files.resources.impl import com.kaspersky.kaspresso.files.resources.ResourcesRootDirsProvider import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultResourcesRootDirsProvider : ResourcesRootDirsProvider { override val logcatRootDir = File("logcat") override val screenshotsRootDir = File("screenshots") diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/SupportLegacyResourcesDirNameProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/SupportLegacyResourcesDirNameProvider.kt index c050ced64..d099e3ef0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/SupportLegacyResourcesDirNameProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/files/resources/impl/SupportLegacyResourcesDirNameProvider.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.screenshots.screenshotfiles.ScreenshotDire import com.kaspersky.kaspresso.files.models.TestMethod import com.kaspersky.kaspresso.files.resources.ResourcesDirNameProvider +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Special mapper between new and old systems of resource providing */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProvider.kt index 690b51013..5ee0fa7c2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.flakysafety +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide the flaky safety functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProviderImpl.kt index 2d57ba921..a8ef31369 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/ContinuouslyProviderImpl.kt @@ -8,6 +8,25 @@ import java.util.concurrent.locks.ReentrantLock import kotlin.concurrent.schedule import kotlin.concurrent.withLock +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [ContinuouslyProvider] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProvider.kt index 8d475c3ee..2b881f185 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.flakysafety +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide the flaky safety functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderGlobalImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderGlobalImpl.kt index 84b6ba740..4e9c3835a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderGlobalImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderGlobalImpl.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.flakysafety.scalpel.FlakySafeInterceptorScalpel import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [FlakySafetyProvider] interface. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderSimpleImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderSimpleImpl.kt index fd9151673..1c7cea1a0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderSimpleImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/FlakySafetyProviderSimpleImpl.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.flakysafety.algorithm.FlakySafetyAlgorithm import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [FlakySafetyProvider] interface. * By default, this implementation is using to struggle with flaky UI libs inside a View diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/algorithm/FlakySafetyAlgorithm.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/algorithm/FlakySafetyAlgorithm.kt index b5079c9f6..87005249b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/algorithm/FlakySafetyAlgorithm.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/algorithm/FlakySafetyAlgorithm.kt @@ -9,6 +9,25 @@ import java.util.concurrent.locks.ReentrantLock import kotlin.concurrent.schedule import kotlin.concurrent.withLock +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakySafetyAlgorithm( private val logger: UiTestLogger ) { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpel.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpel.kt index ce9b772a0..24f74ed9b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpel.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpel.kt @@ -14,6 +14,25 @@ import com.kaspersky.kaspresso.interceptors.tolibrary.KakaoLibraryInjector import com.kaspersky.kaspresso.kaspresso.Kaspresso import java.util.concurrent.atomic.AtomicInteger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The special class that removes all interceptors related to FlakySafety from kakao settings * and restore them by demand diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcher.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcher.kt index 1f6653850..48498fc80 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcher.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcher.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.flakysafety.scalpel.ScalpelSwitcher.TakeScalpStat import com.kaspersky.kaspresso.flakysafety.scalpel.ScalpelSwitcher.TakeScalpState.TOOK_AND_ABSENCE import com.kaspersky.kaspresso.flakysafety.scalpel.ScalpelSwitcher.TakeScalpState.TOOK_AND_EXISTS +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class ScalpelSwitcher { private var state: TakeScalpState = START diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalper.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalper.kt index b612c26c5..e6e5a241f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalper.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalper.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.flakysafety.scalpel.external +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ExternalFlakySafetyScalper { fun isFlakySafetyInterceptorPresent(): Boolean fun scalpFlakySafety() diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalperNotifier.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalperNotifier.kt index 967990a37..30ef4ab6a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalperNotifier.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/flakysafety/scalpel/external/ExternalFlakySafetyScalperNotifier.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.flakysafety.scalpel.external +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ExternalFlakySafetyScalperNotifier { fun addScalper(scalper: ExternalFlakySafetyScalper) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/idlewaiting/KautomatorWaitForIdleSettings.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/idlewaiting/KautomatorWaitForIdleSettings.kt index f978b4a45..73fdde5d3 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/idlewaiting/KautomatorWaitForIdleSettings.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/idlewaiting/KautomatorWaitForIdleSettings.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.idlewaiting +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class KautomatorWaitForIdleSettings constructor( val waitForSelectorTimeout: Long, val waitForIdleTimeout: Long diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProvider.kt index 2a54efff4..aa2841e2f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProvider.kt @@ -6,6 +6,25 @@ import androidx.annotation.RequiresApi import androidx.test.uiautomator.UiDevice import com.kaspersky.kaspresso.runner.listener.KaspressoRunNotifier +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface InstrumentalDependencyProvider { val isAndroidRuntime: Boolean diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderFactory.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderFactory.kt index dfba84a15..1d77ed4da 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderFactory.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderFactory.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.instrumental import android.app.Instrumentation +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class InstrumentalDependencyProviderFactory { inline fun getComponentProvider(instrumentation: Instrumentation): InstrumentalDependencyProvider = diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderImpl.kt index 5d705a88c..7c493fa66 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/InstrumentalDependencyProviderImpl.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.instrumental.exception.NotSupportedInstrumentalTe import com.kaspersky.kaspresso.runner.listener.KaspressoRunNotifier import com.kaspersky.kaspresso.runner.listener.getKaspressoRunNotifier +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class InstrumentalDependencyProviderImpl( private val location: InstrumentalUsage, private val instrumentation: Instrumentation diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/DocLocInUnitTestException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/DocLocInUnitTestException.kt index 2178fc06b..1b2027236 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/DocLocInUnitTestException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/DocLocInUnitTestException.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.instrumental.exception import java.lang.RuntimeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DocLocInUnitTestException internal constructor() : RuntimeException( """ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedEnvironment.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedEnvironment.kt index 30b33e5c3..514a86c42 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedEnvironment.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedEnvironment.kt @@ -1,3 +1,22 @@ package com.kaspersky.kaspresso.instrumental.exception +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NotSupportedEnvironment internal constructor(exceptionText: String) : RuntimeException(exceptionText) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedInstrumentalTestException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedInstrumentalTestException.kt index 02881211a..b908bb359 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedInstrumentalTestException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/instrumental/exception/NotSupportedInstrumentalTestException.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.instrumental.exception import com.kaspersky.kaspresso.instrumental.InstrumentalUsage import java.lang.RuntimeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NotSupportedInstrumentalTestException(exceptionText: String) : RuntimeException(exceptionText) { internal constructor(instrumentalUsage: InstrumentalUsage, instrumentalProperty: String) : this( diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/BehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/BehaviorInterceptor.kt index a73fd9087..02c01d934 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/BehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/BehaviorInterceptor.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.interceptors.behavior +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors that change the default interaction in Kakao=>Espresso. Often it wraps the interaction calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/DataBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/DataBehaviorInterceptor.kt index 9bfd8909e..89803cbee 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/DataBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/DataBehaviorInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.behavior import androidx.test.espresso.DataInteraction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [BehaviorInterceptor] interface for intercepting [DataInteraction.check] behavior. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/ViewBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/ViewBehaviorInterceptor.kt index e5caaead5..db5956099 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/ViewBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/ViewBehaviorInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.behavior import androidx.test.espresso.ViewInteraction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [BehaviorInterceptor] interface for intercepting [ViewInteraction.perform] and * [ViewInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/WebBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/WebBehaviorInterceptor.kt index 98770c5aa..07fcffe95 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/WebBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/WebBehaviorInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.behavior import androidx.test.espresso.web.sugar.Web +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [BehaviorInterceptor] interface for intercepting [Web.WebInteraction.perform] and * [Web.WebInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollToAction.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollToAction.kt index c89130445..9d3eb723a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollToAction.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollToAction.kt @@ -14,6 +14,25 @@ import androidx.test.espresso.util.HumanReadables import com.kaspersky.kaspresso.logger.UiTestLogger import io.github.kakaocup.kakao.common.actions.NestedScrollToAction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollToAction( private val logger: UiTestLogger, private val viewAction: ViewAction = NestedScrollToAction(), diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollViewBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollViewBehaviorInterceptor.kt index 5bf5932a8..85bd6a83a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollViewBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollViewBehaviorInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behavior.ViewBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewBehaviorInterceptor] and [AutoScrollProvider] interfaces. * Provides autoscroll on failure functionality for [ViewInteraction.perform] and [ViewInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollWebBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollWebBehaviorInterceptor.kt index e92c6de6a..eb112dd95 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollWebBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/autoscroll/AutoScrollWebBehaviorInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behavior.WebBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [WebBehaviorInterceptor] and [AutoScrollProvider] interfaces. * Provides autoscroll on failure functionality for [Web.WebInteraction.perform] and [Web.WebInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingDataBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingDataBehaviorInterceptor.kt index b3c1db6e4..b7c2f145d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingDataBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingDataBehaviorInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.failure.FailureLoggingProviderImpl import com.kaspersky.kaspresso.interceptors.behavior.DataBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DataBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [DataInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingViewBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingViewBehaviorInterceptor.kt index d80ac5b32..dcca4a923 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingViewBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingViewBehaviorInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.failure.FailureLoggingProviderImpl import com.kaspersky.kaspresso.interceptors.behavior.ViewBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [ViewInteraction.perform] and [ViewInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingWebBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingWebBehaviorInterceptor.kt index a3c865de7..fec1441d4 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingWebBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/failure/FailureLoggingWebBehaviorInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.failure.FailureLoggingProviderImpl import com.kaspersky.kaspresso.interceptors.behavior.WebBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [WebBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [Web.WebInteraction.perform] and [Web.WebInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeDataBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeDataBehaviorInterceptor.kt index 8661ff41d..12b4cb40e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeDataBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeDataBehaviorInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behavior.DataBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DataBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [DataInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeViewBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeViewBehaviorInterceptor.kt index e99ce399c..09a37229b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeViewBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeViewBehaviorInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behavior.ViewBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [ViewInteraction.perform] and [ViewInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeWebBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeWebBehaviorInterceptor.kt index c84dd4dad..9ab5cb4f0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeWebBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/flakysafety/FlakySafeWebBehaviorInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behavior.WebBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [WebBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [Web.WebInteraction.perform] and [Web.WebInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyDataBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyDataBehaviorInterceptor.kt index 3390ba488..460ef58e1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyDataBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyDataBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DataBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [DataInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyViewBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyViewBehaviorInterceptor.kt index a2347c01b..28865df9a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyViewBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyViewBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [ViewInteraction.perform] and [ViewInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyWebBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyWebBehaviorInterceptor.kt index 3708e820e..6e4424b46 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyWebBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behavior/impl/systemsafety/SystemDialogSafetyWebBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [WebBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [Web.WebInteraction.perform] and [Web.WebInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/DeviceBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/DeviceBehaviorInterceptor.kt index 094568827..650bb8622 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/DeviceBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/DeviceBehaviorInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiDeviceInterac import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAction import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [KautomatorBehaviorInterceptor] interface for intercepting [UiDeviceInteraction.perform] and * [UiDeviceInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/KautomatorBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/KautomatorBehaviorInterceptor.kt index e8d0b0c24..f52aeb286 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/KautomatorBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/KautomatorBehaviorInterceptor.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.interceptors.behaviorkautomator +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors that change the default interaction in Kautomator. Often it wraps the interaction calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/ObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/ObjectBehaviorInterceptor.kt index 1b8cf1313..4497b8ca8 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/ObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/ObjectBehaviorInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiObjectInterac import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [KautomatorBehaviorInterceptor] interface for intercepting [UiObjectInteraction.perform] and * [UiObjectInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/autoscroll/AutoScrollObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/autoscroll/AutoScrollObjectBehaviorInterceptor.kt index 13c4777fa..5738ec8f0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/autoscroll/AutoScrollObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/autoscroll/AutoScrollObjectBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInt import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.AutoScrollParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectBehaviorInterceptor] and [AutoScrollProvider] interfaces. * Provides autoscroll on failure functionality for [UiObjectInteraction.perform] and [UiObjectInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/elementloader/ElementLoaderObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/elementloader/ElementLoaderObjectBehaviorInterceptor.kt index 003fbca6b..0105b4f22 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/elementloader/ElementLoaderObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/elementloader/ElementLoaderObjectBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInt import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.ElementLoaderParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectBehaviorInterceptor] and [ElementLoaderProvider] interfaces. * Provides element reloading on failure functionality for [UiObjectInteraction.perform] and [UiObjectInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingDeviceBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingDeviceBehaviorInterceptor.kt index ea74d76a1..5da49df39 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingDeviceBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingDeviceBehaviorInterceptor.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.failure.FailureLoggingProviderImpl import com.kaspersky.kaspresso.interceptors.behaviorkautomator.DeviceBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DeviceBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [UiDeviceInteraction.perform] and [UiDeviceInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingObjectBehaviorInterceptor.kt index 4c2ca5489..f96690eed 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/failure/FailureLoggingObjectBehaviorInterceptor.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.failure.FailureLoggingProviderImpl import com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectBehaviorInterceptor] and [FailureLoggingProvider] interfaces. * Provides failure logging functionality for [UiObjectInteraction.perform] and [UiObjectInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeDeviceBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeDeviceBehaviorInterceptor.kt index b6890236a..f98b53d99 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeDeviceBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeDeviceBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.DeviceBehaviorInt import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DeviceBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [UiDeviceInteraction.perform] and [UiDeviceInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeObjectBehaviorInterceptor.kt index 482c0a300..6346832f6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/flakysafety/FlakySafeObjectBehaviorInterceptor.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInt import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.FlakySafetyParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectBehaviorInterceptor] and [FlakySafetyProvider] interfaces. * Provides system flaky safety functionality for [UiObjectInteraction.perform] and [UiObjectInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyDeviceBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyDeviceBehaviorInterceptor.kt index e1eee901f..533d35c5c 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyDeviceBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyDeviceBehaviorInterceptor.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DeviceBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [UiDeviceInteraction.perform] and [UiDeviceInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyObjectBehaviorInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyObjectBehaviorInterceptor.kt index e5212f754..d5a15b03a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyObjectBehaviorInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/behaviorkautomator/impl/systemsafety/SystemDialogSafetyObjectBehaviorInterceptor.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProvider import com.kaspersky.kaspresso.systemsafety.SystemDialogSafetyProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectBehaviorInterceptor] and [SystemDialogSafetyProvider] interfaces. * Provides system dialog safety functionality for [UiObjectInteraction.perform] and [UiObjectInteraction.check] calls. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/KakaoLibraryInjector.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/KakaoLibraryInjector.kt index 203d5068d..af45a34c5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/KakaoLibraryInjector.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/KakaoLibraryInjector.kt @@ -20,6 +20,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInt import com.kaspersky.kaspresso.interceptors.watcher.view.WebAssertionWatcherInterceptor import com.kaspersky.kaspresso.params.ClickParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal object KakaoLibraryInjector { @Suppress("LongParameterList") diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/LibraryInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/LibraryInterceptor.kt index 5070170a6..7d666d4ac 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/LibraryInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/LibraryInterceptor.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.interceptors.tolibrary +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class of libraries interceptors (Kakao/UiAutomator/Kakao-Compose) for Kaspresso's implementations */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoDataInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoDataInterceptor.kt index 203fbc235..6c8742818 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoDataInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoDataInterceptor.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.interceptors.tolibrary.LibraryInterceptor import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInterceptor import com.kaspersky.kaspresso.proxy.DataAssertionProxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kakao's data interaction interceptor. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoViewInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoViewInterceptor.kt index 001698e9f..1c3128130 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoViewInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoViewInterceptor.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInt import com.kaspersky.kaspresso.proxy.ViewActionProxy import com.kaspersky.kaspresso.proxy.ViewAssertionProxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kakao's view interaction interceptor. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoWebInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoWebInterceptor.kt index ba20dfea5..c867a6085 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoWebInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kakao/KakaoWebInterceptor.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.WebAssertionWatcherInte import com.kaspersky.kaspresso.internal.extensions.espressoext.getMatcher import com.kaspersky.kaspresso.proxy.AtomProxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kakao's web interaction interceptor. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorDeviceInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorDeviceInterceptor.kt index 00245848c..900a5a20e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorDeviceInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorDeviceInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.DeviceBehaviorInt import com.kaspersky.kaspresso.interceptors.tolibrary.LibraryInterceptor import com.kaspersky.kaspresso.interceptors.watcher.kautomator.DeviceWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kautomator's UiDeviceInteraction interceptor. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorObjectInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorObjectInterceptor.kt index 8c8aec46a..a435084b6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorObjectInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/tolibrary/kautomator/KautomatorObjectInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.behaviorkautomator.ObjectBehaviorInt import com.kaspersky.kaspresso.interceptors.tolibrary.LibraryInterceptor import com.kaspersky.kaspresso.interceptors.watcher.kautomator.ObjectWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso's implementation of Kautomator's UiObjectInteraction interceptor. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/DeviceWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/DeviceWatcherInterceptor.kt index 9f2c8f9f2..fe6ba1ab7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/DeviceWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/DeviceWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiDeviceInterac import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAction import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [KautomatorWatcherInterceptor] interface for intercepting (only watching) [UiDeviceInteraction.perform] and * [UiDeviceInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/KautomatorWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/KautomatorWatcherInterceptor.kt index b4e681eaa..a40cfe3c1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/KautomatorWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/KautomatorWatcherInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.kautomator import com.kaspersky.components.kautomator.intercept.interaction.UiInteraction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors that are watching the default interaction in Kautomator. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/ObjectWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/ObjectWatcherInterceptor.kt index a6cc6e9a7..9e759b20b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/ObjectWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/ObjectWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiObjectInterac import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The derived from [KautomatorWatcherInterceptor] interface for intercepting (only watching) [UiObjectInteraction.perform] and * [UiObjectInteraction.check] behavior. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingDeviceWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingDeviceWatcherInterceptor.kt index afd212f0c..949bcf0d1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingDeviceWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingDeviceWatcherInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion import com.kaspersky.kaspresso.interceptors.watcher.kautomator.DeviceWatcherInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [DeviceWatcherInterceptor] that logs info about [UiDeviceAssertion] or [UiDeviceAction] * and [UiDeviceInteraction] on which its activities are performing. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingObjectWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingObjectWatcherInterceptor.kt index f72819ad3..98e56412c 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingObjectWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/kautomator/impl/logging/LoggingObjectWatcherInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion import com.kaspersky.kaspresso.interceptors.watcher.kautomator.ObjectWatcherInterceptor import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ObjectWatcherInterceptor] that logs info about [UiObjectAssertion] or [UiObjectAction] * and [UiObjectInteraction] on which its activities are performing. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/StepWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/StepWatcherInterceptor.kt index f9b91420b..a8ca9ab98 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/StepWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/StepWatcherInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.testcase import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors intercepting step events. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestContextHolder.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestContextHolder.kt index 0253116de..3eb3b8993 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestContextHolder.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestContextHolder.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.testcase import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Holder of BaseTestContext */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestRunWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestRunWatcherInterceptor.kt index e03aa849f..e2c3ee1a3 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestRunWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/TestRunWatcherInterceptor.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.testcase import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all interceptors intercepting test run events. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/composite/TestRunCompositeWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/composite/TestRunCompositeWatcherInterceptor.kt index eb2586362..4b0421f79 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/composite/TestRunCompositeWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/composite/TestRunCompositeWatcherInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.logger.Logger import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [TestRunWatcherInterceptor] interface. * Composes all of [TestRunWatcherInterceptor]s list into one composite [TestRunWatcherInterceptor] that is actually diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/defaults/DefaultTestRunWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/defaults/DefaultTestRunWatcherInterceptor.kt index 4ef7dae96..c462c003f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/defaults/DefaultTestRunWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/defaults/DefaultTestRunWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInter import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultTestRunWatcherInterceptor : TestRunWatcherInterceptor { private lateinit var context: BaseTestContext diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/DumpLogcatInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/DumpLogcatInterceptor.kt index 46f456ab3..96dc2b932 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/DumpLogcatInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/DumpLogcatInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInter import com.kaspersky.kaspresso.device.logcat.dumper.LogcatDumper import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DumpLogcatInterceptor( private val logcatDumper: LogcatDumper ) : TestRunWatcherInterceptor { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/LoggingStepWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/LoggingStepWatcherInterceptor.kt index e41e03e7f..826e2dfe2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/LoggingStepWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/LoggingStepWatcherInterceptor.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.internal.extensions.other.toTime import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [StepWatcherInterceptor] interface. * Logs [StepInfo] on each step event. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/TestRunLoggerWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/TestRunLoggerWatcherInterceptor.kt index caff07455..46ec3894f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/TestRunLoggerWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/logging/TestRunLoggerWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInter import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [TestRunWatcherInterceptor] interface. * Logs [TestInfo] on each section event. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotFailStepWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotFailStepWatcherInterceptor.kt index ec1f6cb53..13439c6b2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotFailStepWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotFailStepWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.screenshots.Screenshots import com.kaspersky.kaspresso.interceptors.watcher.testcase.StepWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotFailStepWatcherInterceptor( private val screenshots: Screenshots ) : StepWatcherInterceptor { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotStepWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotStepWatcherInterceptor.kt index 22aeb6547..bb7b3b49b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotStepWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/ScreenshotStepWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.screenshots.Screenshots import com.kaspersky.kaspresso.interceptors.watcher.testcase.StepWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [StepWatcherInterceptor] interface. * Takes screenshots if step succeeds or fails. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/TestRunnerScreenshotWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/TestRunnerScreenshotWatcherInterceptor.kt index 3f00afc1a..75cae3cf4 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/TestRunnerScreenshotWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/screenshot/TestRunnerScreenshotWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.screenshots.Screenshots import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [TestRunWatcherInterceptor] interface. * Takes screenshots if "before" or "after" sections failed. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/video/VideoRecordingInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/video/VideoRecordingInterceptor.kt index ce4d8eae2..affe4df85 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/video/VideoRecordingInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/video/VideoRecordingInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.video.Videos import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideoRecordingInterceptor( private val videos: Videos ) : TestRunWatcherInterceptor { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/views/DumpViewsInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/views/DumpViewsInterceptor.kt index 53dc8bdfe..1a90e92e7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/views/DumpViewsInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/testcase/impl/views/DumpViewsInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.device.viewhierarchy.ViewHierarchyDumper import com.kaspersky.kaspresso.interceptors.watcher.testcase.TestRunWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DumpViewsInterceptor( private val viewHierarchyDumper: ViewHierarchyDumper ) : TestRunWatcherInterceptor { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/AtomWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/AtomWatcherInterceptor.kt index 678265163..a11a7a761 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/AtomWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/AtomWatcherInterceptor.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.view import androidx.test.espresso.web.model.Evaluation import com.kaspersky.kaspresso.proxy.AtomProxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all atom interceptors, used in [com.kaspersky.kaspresso.proxy.AtomProxy]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewActionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewActionWatcherInterceptor.kt index 248aa2169..1ba3d2d31 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewActionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewActionWatcherInterceptor.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.view import android.view.View import androidx.test.espresso.ViewAction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all view action interceptors, used in [com.kaspersky.kaspresso.proxy.ViewActionProxy]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewAssertionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewAssertionWatcherInterceptor.kt index 117f87e8d..e8060875d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewAssertionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/ViewAssertionWatcherInterceptor.kt @@ -4,6 +4,25 @@ import android.view.View import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.ViewAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all view action interceptors, used in [com.kaspersky.kaspresso.proxy.ViewAssertionProxy]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/WebAssertionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/WebAssertionWatcherInterceptor.kt index 0ae39cde1..17082ecf2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/WebAssertionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/WebAssertionWatcherInterceptor.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.interceptors.watcher.view import android.webkit.WebView import androidx.test.espresso.web.assertion.WebAssertionProxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for all atom interceptors, used in [WebAssertionProxy]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingAtomWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingAtomWatcherInterceptor.kt index 0cfd03f31..6a12c405b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingAtomWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingAtomWatcherInterceptor.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.proxy.AtomProxy import org.hamcrest.StringDescription +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [AtomWatcherInterceptor] that logs info about web action. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewActionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewActionWatcherInterceptor.kt index d1ed1b766..b1c3c987a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewActionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewActionWatcherInterceptor.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.ViewActionWatcherInterc import com.kaspersky.kaspresso.internal.extensions.other.describe import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewActionWatcherInterceptor] that logs info about [ViewAction]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewAssertionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewAssertionWatcherInterceptor.kt index ad5d7df25..ae9472180 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewAssertionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingViewAssertionWatcherInterceptor.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInt import com.kaspersky.kaspresso.internal.extensions.other.describe import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [ViewAssertionWatcherInterceptor] that logs info about [ViewAssertion]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingWebAssertionWatcherInterceptor.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingWebAssertionWatcherInterceptor.kt index eddb0b0a2..7af87d486 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingWebAssertionWatcherInterceptor.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/interceptors/watcher/view/impl/logging/LoggingWebAssertionWatcherInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.interceptors.watcher.view.WebAssertionWatcherInte import com.kaspersky.kaspresso.logger.UiTestLogger import org.hamcrest.StringDescription +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of [WebAssertionWatcherInterceptor] that logs info about * [androidx.test.espresso.web.assertion.WebAssertion]. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/AdbServerException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/AdbServerException.kt index 7e82027b4..27120a47e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/AdbServerException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/AdbServerException.kt @@ -1,3 +1,22 @@ package com.kaspersky.kaspresso.internal.exceptions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AdbServerException(override val message: String) : RuntimeException(message) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/KaspressoError.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/KaspressoError.kt index fb2e87c4e..31cb7f3b7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/KaspressoError.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/KaspressoError.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.internal.exceptions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Exception with no stacktrace to hold an assertion message and the initial cause of the exception. * Stacktrace is obsolete because the [cause] contains useful information which guides to the user's test. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/RootViewWithoutFocusWrapperException.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/RootViewWithoutFocusWrapperException.kt index a2dec6c4f..f03622e06 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/RootViewWithoutFocusWrapperException.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/exceptions/RootViewWithoutFocusWrapperException.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.internal.exceptions import java.lang.RuntimeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * A wrapper for a RootViewWithoutFocusException. It's needed because RootViewWithoutFocusException is a private class, * so we have to use reflection to catch it and provide a user a sane way to control it. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/MatchersExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/MatchersExt.kt index c708b328a..4b360f07b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/MatchersExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/MatchersExt.kt @@ -4,6 +4,25 @@ import android.view.View import org.hamcrest.Matcher import org.hamcrest.StringDescription +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @return a [String] description of [Matcher]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/WebInteractionExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/WebInteractionExt.kt index b47a889dd..426c1768c 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/WebInteractionExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/espressoext/WebInteractionExt.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.internal.extensions.espressoext import androidx.test.espresso.web.sugar.Web import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @return the [Matcher] of [Web.WebInteraction]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ClassExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ClassExt.kt index 173f6f1aa..5e2f14a13 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ClassExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ClassExt.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.internal.extensions.other +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Returns an array of all directly and indirectly implemented interfaces. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/FileExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/FileExt.kt index a714ce46f..e126edcdc 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/FileExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/FileExt.kt @@ -6,6 +6,25 @@ import java.io.File import java.io.FileNotFoundException import java.io.IOException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Writes given text to file catching IOExceptions and logging it. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/LongExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/LongExt.kt index 01b9d0439..14fc350ae 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/LongExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/LongExt.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.internal.extensions.other +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val SECOND_IN_MILLIS = 1000 private const val MINUTE_IN_SECONDS = 60 diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/MetadataModelsExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/MetadataModelsExt.kt index ab4a53c84..351156c97 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/MetadataModelsExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/MetadataModelsExt.kt @@ -4,6 +4,25 @@ import android.text.TextUtils.htmlEncode import com.kaspersky.kaspresso.docloc.metadata.LocalizedString import com.kaspersky.kaspresso.docloc.metadata.Metadata +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Transforms [Metadata] object to an xml string. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ThrowableExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ThrowableExt.kt index ffbc4d739..23c723a01 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ThrowableExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ThrowableExt.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.internal.exceptions.KaspressoError import com.kaspersky.kaspresso.internal.exceptions.RootViewWithoutFocusWrapperException import io.reactivex.exceptions.ExtCompositeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal inline fun invokeSafely( exceptions: MutableList, action: () -> Unit diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ViewExt.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ViewExt.kt index 349ee70e9..4971b9c88 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ViewExt.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/extensions/other/ViewExt.kt @@ -4,6 +4,25 @@ import android.content.res.Resources import android.view.View import android.widget.TextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @return a [String] description of the [View] */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/invocation/UiInvocationHandler.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/invocation/UiInvocationHandler.kt index 70f90af94..cac1f1bdc 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/invocation/UiInvocationHandler.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/invocation/UiInvocationHandler.kt @@ -9,6 +9,25 @@ import java.lang.reflect.InvocationTargetException import java.lang.reflect.Method import java.util.concurrent.CountDownLatch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The [InvocationHandler] implementation for dynamic proxy which will suppress any exception thrown from the target. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/runlisteners/artifactspull/ArtifactsPullRunListener.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/runlisteners/artifactspull/ArtifactsPullRunListener.kt index 5d36b2a55..f0d66e825 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/runlisteners/artifactspull/ArtifactsPullRunListener.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/runlisteners/artifactspull/ArtifactsPullRunListener.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.runner.listener.KaspressoRunListener import org.junit.runner.Result import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ArtifactsPullRunListener( private val params: ArtifactsPullParams, private val dirsProvider: DirsProvider = DefaultDirsProvider(InstrumentalDependencyProviderFactory().getComponentProvider(InstrumentationRegistry.getInstrumentation())), diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/DataUsageSettingsScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/DataUsageSettingsScreen.kt index 2b8e59d4e..849c7dbb7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/DataUsageSettingsScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/DataUsageSettingsScreen.kt @@ -9,6 +9,25 @@ import android.widget.Switch import com.kaspersky.components.kautomator.component.switch.UiSwitch import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object DataUsageSettingsScreen : UiScreen() { private const val TIMEOUT = 5_000L diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsFullScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsFullScreen.kt index bf1e3dee1..f1f1c7fc1 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsFullScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsFullScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.common.views.UiView import com.kaspersky.components.kautomator.screen.UiScreen import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object NotificationsFullScreen : UiScreen() { override val packageName: String = "com.android.systemui" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsMobileDataScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsMobileDataScreen.kt index 030cd370c..c8778388a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsMobileDataScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsMobileDataScreen.kt @@ -4,6 +4,25 @@ import android.widget.Switch import com.kaspersky.components.kautomator.component.switch.UiSwitch import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object NotificationsMobileDataScreen : UiScreen() { override val packageName: String = "com.android.systemui" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsShortScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsShortScreen.kt index 50a094918..20f5e62e0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsShortScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/NotificationsShortScreen.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.internal.systemscreen import com.kaspersky.components.kautomator.component.common.views.UiView import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object NotificationsShortScreen : UiScreen() { override val packageName: String = "com.android.systemui" diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/WiFiSettingsScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/WiFiSettingsScreen.kt index 53d1dae45..2fc033e29 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/WiFiSettingsScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/systemscreen/WiFiSettingsScreen.kt @@ -8,6 +8,25 @@ import android.widget.Switch import com.kaspersky.components.kautomator.component.switch.UiSwitch import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object WiFiSettingsScreen : UiScreen() { private const val TIMEOUT = 5_000L diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultScreenshotsComparator.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultScreenshotsComparator.kt index 699f1daf5..d2325b40b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultScreenshotsComparator.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultScreenshotsComparator.kt @@ -15,6 +15,25 @@ import java.io.File import java.io.FileOutputStream import kotlin.math.abs +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + open class DefaultScreenshotsComparator( private val visualTestParams: VisualTestParams, private val logger: Logger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultVisualTestWatcher.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultVisualTestWatcher.kt index 608e59c6a..c913bdf59 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultVisualTestWatcher.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/visual/DefaultVisualTestWatcher.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.visual.VisualTestType import com.kaspersky.kaspresso.visual.VisualTestWatcher import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class DefaultVisualTestWatcher( private val params: VisualTestParams, private val logger: Logger, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/wait/Wait.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/wait/Wait.kt index 457724d2c..63ef1b293 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/wait/Wait.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/internal/wait/Wait.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.internal.wait import com.kaspersky.kaspresso.internal.extensions.other.isAllowed import com.kaspersky.kaspresso.logger.UiTestLogger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Waits for [timeoutMs] and invokes an [action]. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/kaspresso/Kaspresso.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/kaspresso/Kaspresso.kt index af85dc2d0..3bc339069 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/kaspresso/Kaspresso.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/kaspresso/Kaspresso.kt @@ -140,6 +140,25 @@ import com.kaspersky.kaspresso.visual.VisualTestType import com.kaspersky.kaspresso.visual.VisualTestWatcher import io.github.kakaocup.kakao.Kakao +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The storage of all Kaspresso preferences and entities, such as [AdbServer], [Device] and different interceptors. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/FormattedLogger.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/FormattedLogger.kt index c61517532..6cb42798d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/FormattedLogger.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/FormattedLogger.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for formatted logging. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/Logger.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/Logger.kt index 6d372233c..251ffadfe 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/Logger.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/Logger.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface for base logging with 3 levels: info, debug and error. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLogger.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLogger.kt index 8988b9250..822cc9cbd 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLogger.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLogger.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.logger +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base interface for all loggers used in Kaspresso. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLoggerImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLoggerImpl.kt index ad75dc909..d6ec74215 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLoggerImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/logger/UiTestLoggerImpl.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.logger import android.util.Log +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The default implementation of [UiTestLogger] using [android.util.Log]. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ArtifactsPullParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ArtifactsPullParams.kt index c49fca18e..b03847a03 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ArtifactsPullParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ArtifactsPullParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class ArtifactsPullParams( /** * Relative path. Absolute one depends on the working directory from which ADB server was started diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/AutoScrollParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/AutoScrollParams.kt index ae4b58c5d..563f1ebd5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/AutoScrollParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/AutoScrollParams.kt @@ -5,6 +5,25 @@ import androidx.test.uiautomator.UiObjectNotFoundException import com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObjectException import junit.framework.AssertionFailedError +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The class that holds all the necessary for [com.kaspersky.kaspresso.autoscroll.AutoScrollProviderImpl] and * [com.kaspersky.kaspresso.autoscroll.WebAutoScrollProviderImpl] parameters. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ClickParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ClickParams.kt index a9adbee49..3321eaa44 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ClickParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ClickParams.kt @@ -9,6 +9,25 @@ import io.github.kakaocup.kakao.ext.clicks.KakaoLongClick import io.github.kakaocup.kakao.ext.clicks.KakaoSingleClick import io.github.kakaocup.kakao.ext.clicks.visualization.VisualClicksConfig +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * This class provides the possibility to override default espresso clicks. * All details are described in https://github.com/KakaoCup/Kakao/tree/master/kakao-ext-clicks diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ContinuouslyParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ContinuouslyParams.kt index 320a9147b..8dfe0f606 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ContinuouslyParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ContinuouslyParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The class that holds all the necessary for [com.kaspersky.kaspresso.flakysafety.ContinuouslyProviderImpl] parameters. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ElementLoaderParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ElementLoaderParams.kt index 7e9b57fe3..7fa8f33c3 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ElementLoaderParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ElementLoaderParams.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.params import androidx.test.uiautomator.StaleObjectException import com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObjectException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ElementLoaderParams { val allowedExceptions: Set> = setOf( AssertionError::class.java, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/FlakySafetyParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/FlakySafetyParams.kt index 3ffa286d6..5fab3c65b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/FlakySafetyParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/FlakySafetyParams.kt @@ -7,6 +7,25 @@ import com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObject import com.kaspersky.kaspresso.internal.exceptions.RootViewWithoutFocusWrapperException import junit.framework.AssertionFailedError +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The class that holds all the necessary for [com.kaspersky.kaspresso.flakysafety.FlakySafetyProviderSimpleImpl] parameters. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Params.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Params.kt index 40c64c3ac..18261a14e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Params.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Params.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.params import com.kaspersky.kaspresso.visual.VisualTestParams +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The facade class for all Kaspresso parameters. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Resolution.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Resolution.kt index 48fde31cb..e6c9d3fe6 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Resolution.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/Resolution.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class Resolution( val width: Int, val height: Int, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ScreenshotParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ScreenshotParams.kt index b81bb45e7..f3072caf3 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ScreenshotParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/ScreenshotParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @param quality quality of the PNG compression; range: 0-100 * @param metadataExtractor determines the API used to get metadata from the app diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/StepParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/StepParams.kt index a2a018a36..d9b7cd0d2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/StepParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/StepParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The class that holds all the necessary for [com.kaspersky.kaspresso.testcases.core.step.StepsManager] parameters. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/SystemDialogsSafetyParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/SystemDialogsSafetyParams.kt index 3d8c27c31..efa722284 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/SystemDialogsSafetyParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/SystemDialogsSafetyParams.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.params import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @param shouldIgnoreKeyboard by default kaspresso treats the keyboard as a system dialog. Enabling this flag prevents a keyboard closing * @param shouldIgnoreCrashes whether kaspresso should check if there's a system crash dialog. Be aware that enabling it increases a time spent diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/VideoParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/VideoParams.kt index 6abe79d82..8ea1887de 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/VideoParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/params/VideoParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VideoParams( val startRecordingTimeMs: Long = 3_000L, val stopRecordingTimeMs: Long = 2_000L, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/AtomProxy.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/AtomProxy.kt index 2ff866ffe..e8a157ee4 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/AtomProxy.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/AtomProxy.kt @@ -6,6 +6,25 @@ import androidx.test.espresso.web.model.Evaluation import com.kaspersky.kaspresso.interceptors.watcher.view.AtomWatcherInterceptor import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The proxy-wrapper of [Atom] for watcher interceptors calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/DataAssertionProxy.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/DataAssertionProxy.kt index 0eccabb88..7cfdd3a8f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/DataAssertionProxy.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/DataAssertionProxy.kt @@ -5,6 +5,25 @@ import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.ViewAssertion import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The proxy-wrapper of [ViewAssertion] for watcher interceptors calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewActionProxy.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewActionProxy.kt index 23504f553..fa600ff4a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewActionProxy.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewActionProxy.kt @@ -6,6 +6,25 @@ import androidx.test.espresso.ViewAction import com.kaspersky.kaspresso.interceptors.watcher.view.ViewActionWatcherInterceptor import org.hamcrest.Matcher +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The proxy-wrapper of [ViewAction] for watcher interceptors calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewAssertionProxy.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewAssertionProxy.kt index 46aa40588..dc3d9e088 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewAssertionProxy.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/proxy/ViewAssertionProxy.kt @@ -5,6 +5,25 @@ import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.ViewAssertion import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The proxy-wrapper of [ViewAssertion] for watcher interceptors calls. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/KaspressoRunner.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/KaspressoRunner.kt index 79e492027..5e74b0191 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/KaspressoRunner.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/KaspressoRunner.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.runner.listener.KaspressoRunNotifier import com.kaspersky.kaspresso.runner.listener.KaspressoRunNotifierImpl import com.kaspersky.kaspresso.runner.listener.SpyRunListener +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Suppress("UNUSED") open class KaspressoRunner : AndroidJUnitRunner() { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoLateRunListener.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoLateRunListener.kt index 2ca34dc5a..2e5756378 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoLateRunListener.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoLateRunListener.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.runner.listener import org.junit.runner.Description +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Listener added in runtime. When test tun listeners are added in runtime it won't * call testRunStarted and testStarted because it was added to late. Thus it's called diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunListener.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunListener.kt index 31b9e3889..21fdb3327 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunListener.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunListener.kt @@ -4,6 +4,25 @@ import org.junit.runner.Description import org.junit.runner.Result import org.junit.runner.notification.Failure +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface KaspressoRunListener { /** * Called before any tests have been run. This may be called on an diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunNotifier.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunNotifier.kt index e42ef69c6..40420c559 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunNotifier.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/KaspressoRunNotifier.kt @@ -6,6 +6,25 @@ import org.junit.runner.Description import org.junit.runner.Result import org.junit.runner.notification.Failure +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface KaspressoRunNotifier : KaspressoRunListener { val listeners: List fun addListener(listener: KaspressoRunListener) diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/SpyRunListener.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/SpyRunListener.kt index 7c1a6a3fd..759d802cd 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/SpyRunListener.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/runner/listener/SpyRunListener.kt @@ -6,6 +6,25 @@ import org.junit.runner.Result import org.junit.runner.notification.Failure import org.junit.runner.notification.RunListener +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Used to inject kaspresso notifier into test runner. It receives test progress and * passes it into run notifier diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/screens/KScreen.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/screens/KScreen.kt index 41d0ef958..caeec6396 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/screens/KScreen.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/screens/KScreen.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.screens import io.github.kakaocup.kakao.screen.Screen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class KScreen> : Screen() { abstract val layoutId: Int? diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyPattern.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyPattern.kt index 42a297978..eb231e04f 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyPattern.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyPattern.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.systemsafety import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class SystemDialogSafetyPattern(val pattern: Pattern) { PERMISSION_API23(Pattern.compile("\\S*android.packageinstaller\\S*")), PERMISSION_API30(Pattern.compile("\\S*android.permissioncontroller\\S*")), diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProvider.kt index 0efaf19e8..3539193d3 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.systemsafety +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An interface to provide system dialog safety functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProviderImpl.kt index 9c6c77165..a6c3fb79e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/systemsafety/SystemDialogSafetyProviderImpl.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.SystemDialogsSafetyParams import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The implementation of the [SystemDialogSafetyProvider] interface. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/BaseScenario.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/BaseScenario.kt index d7d64c8f6..b0d10c3f8 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/BaseScenario.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/BaseScenario.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.api.scenario import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for parametrized scenarios. A representation of some repeating steps inside the * [com.kaspersky.kaspresso.testcases.api.testcase.TestCase]. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/Scenario.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/Scenario.kt index 5c69312c4..610495477 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/Scenario.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/scenario/Scenario.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.api.scenario import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for scenarios. A representation of some repeating steps inside the * [com.kaspersky.kaspresso.testcases.api.testcase.TestCase]. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/BaseTestCase.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/BaseTestCase.kt index 6b5cdd39e..407279ab2 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/BaseTestCase.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/BaseTestCase.kt @@ -17,6 +17,25 @@ import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.TestBody +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for all parametrized test cases. Extend this class with a single base project-wide inheritor of * [TestCase] as a parent for all actual project-wide test cases. Nesting test cases are not recommended, use diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/DocLocScreenshotTestCase.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/DocLocScreenshotTestCase.kt index e96e52ed9..a31b59295 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/DocLocScreenshotTestCase.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/DocLocScreenshotTestCase.kt @@ -42,6 +42,25 @@ import org.junit.Rule import java.io.File import java.lang.reflect.Proxy +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for all docloc screenshot tests. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/TestCase.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/TestCase.kt index 4366ac8b3..cc72791db 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/TestCase.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/TestCase.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.api.testcase import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for all test cases. Extend this class with a single base project-wide inheritor of [TestCase] as a * parent for all actual project-wide test cases. Nesting test cases are not permitted because they may produce an diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/VisualTestCase.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/VisualTestCase.kt index 5bd1ddfce..c9069e435 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/VisualTestCase.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcase/VisualTestCase.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class VisualTestCase( kaspressoBuilder: Kaspresso.Builder = Kaspresso.Builder.simple(), ) : TestCase(kaspressoBuilder) { diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/BaseTestCaseRule.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/BaseTestCaseRule.kt index d58d2e33c..5cb2ef5d9 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/BaseTestCaseRule.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/BaseTestCaseRule.kt @@ -13,6 +13,25 @@ import org.junit.rules.TestRule import org.junit.runner.Description import org.junit.runners.model.Statement +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for all parametrized test cases rules. * diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/TestCaseRule.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/TestCaseRule.kt index 124675195..ab27b65e7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/TestCaseRule.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/api/testcaserule/TestCaseRule.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.api.testcaserule import com.kaspersky.kaspresso.kaspresso.Kaspresso +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The base class for all test cases. Extend this class with a single base project-wide inheritor of * [com.kaspersky.kaspresso.testcases.api.testcase.TestCase] as a parent for all actual project-wide test cases. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/TestRunner.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/TestRunner.kt index 3f35d1900..df4d28f40 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/TestRunner.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/TestRunner.kt @@ -14,6 +14,25 @@ import com.kaspersky.kaspresso.testcases.models.TestBody import com.kaspersky.kaspresso.testcases.models.info.StepInfo import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Kaspresso test runner. Runs all test sections and calls test run watcher interceptors. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/AfterTestSection.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/AfterTestSection.kt index 06094380d..b7b092046 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/AfterTestSection.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/AfterTestSection.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.models.TestBody +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The representation of a set of actions to invoke after the test. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/BeforeTestSection.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/BeforeTestSection.kt index 9c4cfc5fa..a19bec653 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/BeforeTestSection.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/BeforeTestSection.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.models.TestBody +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The representation of a set of actions to be invoked before the test. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/InitSection.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/InitSection.kt index d9fa19ebb..b3d06ea53 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/InitSection.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/InitSection.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.testcases.core.sections import com.kaspersky.kaspresso.testcases.api.testcase.BaseTestCase import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface InitSection { /** diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/MainTestSection.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/MainTestSection.kt index 4c8d5a9ed..07fdbeabb 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/MainTestSection.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/MainTestSection.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.testcases.core.TestRunner import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.TestBody +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The representation of an actual test. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/TransformSection.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/TransformSection.kt index 1ca966370..a1435248e 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/TransformSection.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/sections/TransformSection.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.testcases.core.sections import com.kaspersky.kaspresso.testcases.api.testcase.BaseTestCase import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface TransformSection { /** diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepInfoProducer.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepInfoProducer.kt index a0caa1680..b9a10dee5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepInfoProducer.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepInfoProducer.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.core.step import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The interface to provide step info producing functionality. */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepsManager.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepsManager.kt index f2ba5c7d6..27f5acb36 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepsManager.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/step/StepsManager.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.testcases.models.StepStatus import com.kaspersky.kaspresso.testcases.models.info.InternalStepInfo import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * [StepsManager] produces step and manages lifecycle of step. * To make correct numeration for sub steps(see example below) it builds step hierarchy. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProvider.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProvider.kt index 841155620..555ded0fa 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProvider.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProvider.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.files.resources.ResourceFilesProvider import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.Params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provider of test assistants allowed in [com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext], * [com.kaspersky.kaspresso.testcases.api.testcase.BaseTestCase] and their inheritors diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProviderImpl.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProviderImpl.kt index 27549ea8a..7adbed026 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProviderImpl.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testassistants/TestAssistantsProviderImpl.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.params.Params +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class TestAssistantsProviderImpl(kaspresso: Kaspresso) : TestAssistantsProvider { override val device: Device = kaspresso.device diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/BaseTestContext.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/BaseTestContext.kt index e30036f66..51a20e87a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/BaseTestContext.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/BaseTestContext.kt @@ -15,6 +15,25 @@ import com.kaspersky.kaspresso.logger.UiTestLogger import com.kaspersky.kaspresso.testcases.core.testassistants.TestAssistantsProvider import com.kaspersky.kaspresso.testcases.core.testassistants.TestAssistantsProviderImpl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides the Kaspresso functionality for "run" section: [Device], [AdbServer], the [UiTestLogger] implementation * for external developers. Also provides flaky safety, composing and web composing functionalities via diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/TestContext.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/TestContext.kt index dc6cfc344..0cebb7807 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/TestContext.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/core/testcontext/TestContext.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.testcases.api.scenario.BaseScenario import com.kaspersky.kaspresso.testcases.core.step.StepInfoProducer import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The special class to operate with in user scenario. * Provides [step] and [scenario] methods in "run" section to build a test. diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/MainTestSectionResult.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/MainTestSectionResult.kt index b70626d88..4c63906cc 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/MainTestSectionResult.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/MainTestSectionResult.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.models import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal data class MainTestSectionResult( val testInfo: TestInfo, val throwable: Throwable? = null diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/StepStatus.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/StepStatus.kt index 28b27bfb1..5b3320daf 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/StepStatus.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/StepStatus.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.testcases.models +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class StepStatus { STARTED, SUCCESS, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/TestBody.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/TestBody.kt index c401de4c3..ac9bf6a2b 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/TestBody.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/TestBody.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.enricher.MainSectionEnricher import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class TestBody( val testName: String, val beforeTestActions: (BaseTestContext.() -> Unit)?, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/InternalStepInfo.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/InternalStepInfo.kt index e4c4112c5..d0627a3d7 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/InternalStepInfo.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/InternalStepInfo.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.models.info import com.kaspersky.kaspresso.testcases.models.StepStatus +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class InternalStepInfo( override val description: String, override val testClassName: String, diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/StepInfo.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/StepInfo.kt index db3cfc6de..0a0b813bf 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/StepInfo.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/StepInfo.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.testcases.models.info import com.kaspersky.kaspresso.testcases.models.StepStatus +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface StepInfo { val description: String val testClassName: String diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/TestInfo.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/TestInfo.kt index bbfbfcd6c..444b3f537 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/TestInfo.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/testcases/models/info/TestInfo.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.testcases.models.info +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class TestInfo( val testName: String, val stepInfos: List = listOf(), diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/ScreenshotsComparator.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/ScreenshotsComparator.kt index 53e775853..03128edc5 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/ScreenshotsComparator.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/ScreenshotsComparator.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.visual import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ScreenshotsComparator { fun compare(originalScreenshot: File, newScreenshot: File): Boolean } diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestParams.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestParams.kt index f2bc93e3d..9e005c2d0 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestParams.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestParams.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.visual +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * @see com.kaspersky.kaspresso.internal.visual.DefaultScreenshotsComparator */ diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestType.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestType.kt index 3da2e5b7d..89f1dde9a 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestType.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestType.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.visual +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class VisualTestType { Record, Compare } diff --git a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestWatcher.kt b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestWatcher.kt index 39cb6e750..a271b8e5d 100644 --- a/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestWatcher.kt +++ b/kaspresso/src/main/kotlin/com/kaspersky/kaspresso/visual/VisualTestWatcher.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.visual +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface VisualTestWatcher { fun prepare() fun cleanUp() diff --git a/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpelTest.kt b/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpelTest.kt index a50a23ca0..d407deec5 100644 --- a/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpelTest.kt +++ b/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/FlakySafeInterceptorScalpelTest.kt @@ -5,6 +5,25 @@ import io.mockk.mockk import io.mockk.verify import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakySafeInterceptorScalpelTest { private val kaspresso = mockk(relaxed = true) diff --git a/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcherTest.kt b/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcherTest.kt index 656595440..7079c084d 100644 --- a/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcherTest.kt +++ b/kaspresso/src/test/java/com/kaspersky/kaspresso/flakysafety/scalpel/ScalpelSwitcherTest.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.flakysafety.scalpel import com.google.common.truth.Truth.assertThat import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScalpelSwitcherTest { @Test diff --git a/kautomator/src/main/java/androidx/test/uiautomator/BySelectorHack.kt b/kautomator/src/main/java/androidx/test/uiautomator/BySelectorHack.kt index 9570f52e2..37eedfdce 100644 --- a/kautomator/src/main/java/androidx/test/uiautomator/BySelectorHack.kt +++ b/kautomator/src/main/java/androidx/test/uiautomator/BySelectorHack.kt @@ -1,5 +1,24 @@ package androidx.test.uiautomator +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Workaround for creating [BySelector] instances with package-private constructor. * Replaces default [By] factory and completely safe to use due to member function invocation after diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/KautomatorConfigurator.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/KautomatorConfigurator.kt index 0d32df137..b2af8a346 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/KautomatorConfigurator.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/KautomatorConfigurator.kt @@ -8,6 +8,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object KautomatorConfigurator { internal var uiObjectInterceptor: UiInterceptor? = null diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/EnvironmentDetector.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/EnvironmentDetector.kt index bd350dc70..5eeaf36c2 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/EnvironmentDetector.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/EnvironmentDetector.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.common import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val ROBOLECTRIC_TEST_RUNNER = "org.robolectric.RobolectricTestRunner" private const val JAVA_RUNTIME_PROPERTY = "java.runtime.name" private const val ANDROID_RUNTIME = "android" diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/KautomatorInUnitTestException.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/KautomatorInUnitTestException.kt index c7e0a45c4..4311517fd 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/KautomatorInUnitTestException.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/KautomatorInUnitTestException.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.common import java.lang.RuntimeException +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class KautomatorInUnitTestException internal constructor() : RuntimeException( """ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KId.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KId.kt index f41483880..62b1d5883 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KId.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KId.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.common.resources +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal object KId : ResourceNameProvider() { override val rClassName = "R\$id" } \ No newline at end of file diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KString.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KString.kt index 0b1599afe..1844c7161 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KString.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/KString.kt @@ -3,6 +3,25 @@ package com.kaspersky.components.kautomator.common.resources import androidx.annotation.StringRes import androidx.test.platform.app.InstrumentationRegistry +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal object KString : ResourceNameProvider() { override val rClassName = "R\$string" diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/RClassProvider.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/RClassProvider.kt index 3464094fa..632af6f97 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/RClassProvider.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/RClassProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.common.resources +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal object RClassProvider { private val classNameToClass = mutableMapOf>() diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/ResourceNameProvider.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/ResourceNameProvider.kt index 517e2128c..444c79053 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/ResourceNameProvider.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/common/resources/ResourceNameProvider.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.common.resources +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal abstract class ResourceNameProvider { protected abstract val rClassName: String diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationView.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationView.kt index 1ef2e4f54..4e303ec69 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationView.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationView.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * View for acting and asserting on BottomNavigationView * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewActions.kt index b53f39c1c..90e1c0914 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewActions.kt @@ -5,6 +5,25 @@ import androidx.test.uiautomator.By import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides actions for BottomNavigationView */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewAssertions.kt index 4d63bbf1a..a79398010 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/bottomnav/UiBottomNavigationViewAssertions.kt @@ -6,6 +6,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides assertions for BottomNavigationview */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckBox.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckBox.kt index c6b01068d..820ab8e02 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckBox.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckBox.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Ui View with [UiCheckableActions] and [UiCheckableAssertions] * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableActions.kt index 678e8dee6..80b808e9d 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableActions.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.check.UiCheckableActions.Ui import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides actions for checkable views */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableAssertions.kt index fdfceeeae..eb64e1c91 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/check/UiCheckableAssertions.kt @@ -5,6 +5,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides assertions for checkable views */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroup.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroup.kt index 42fcf26dc..99fbe88e1 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroup.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroup.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * View for acting and asserting on ChipGroup * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupActions.kt index d68a4a618..57d048524 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupActions.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.component.common.actions.UiBaseAction import com.kaspersky.components.kautomator.intercept.operation.UiOperationType import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides actions for a ChipGroup */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupAssertions.kt index 4b237fa91..b7f10ad08 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/chip/UiChipGroupAssertions.kt @@ -9,6 +9,25 @@ import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAss import com.kaspersky.components.kautomator.intercept.operation.UiOperationType import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides assertions for a ChipGroup */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/KautomatorMarker.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/KautomatorMarker.kt index 348b1995e..20943b807 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/KautomatorMarker.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/KautomatorMarker.kt @@ -1,4 +1,23 @@ package com.kaspersky.components.kautomator.component.common +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @DslMarker annotation class KautomatorMarker diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiBaseActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiBaseActions.kt index 901159cbe..9eca6eb1a 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiBaseActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiBaseActions.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.component.common.actions import com.kaspersky.components.kautomator.intercept.delegate.UiObjectInteractionDelegate import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base interface for performing actions on UiAutomator view * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiScrollableActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiScrollableActions.kt index 94549bd0c..648e17cf2 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiScrollableActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiScrollableActions.kt @@ -6,6 +6,25 @@ import androidx.test.uiautomator.UiSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface UiScrollableActions : UiBaseActions { fun scrollToStart() { diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiSwipeableActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiSwipeableActions.kt index 1c0c7f78d..4efe9d066 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiSwipeableActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/actions/UiSwipeableActions.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.component.common.actions import androidx.test.uiautomator.Direction import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides swipeable actions for UiSwipeView */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/DisplayedObjectAssertion.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/DisplayedObjectAssertion.kt index 8507c22e0..6a35efc4b 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/DisplayedObjectAssertion.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/DisplayedObjectAssertion.kt @@ -5,6 +5,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.components.kautomator.intercept.operation.UiOperation import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Special separate Assertion to determine UiAutomator View is displayed or not */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/UiBaseAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/UiBaseAssertions.kt index 9d34cf361..7847b03b9 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/UiBaseAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/assertions/UiBaseAssertions.kt @@ -5,6 +5,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.components.kautomator.intercept.delegate.UiObjectInteractionDelegate import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base interface for asserting UiAutomator views * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewBuilder.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewBuilder.kt index f8d5207b8..b2b3f946b 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewBuilder.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewBuilder.kt @@ -14,6 +14,25 @@ import com.kaspersky.components.kautomator.common.resources.KString import com.kaspersky.components.kautomator.component.common.KautomatorMarker import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Class for building UiAutomator selectors * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewSelector.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewSelector.kt index 15c78f7a9..d531fae94 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewSelector.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/builders/UiViewSelector.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.component.common.builders import androidx.test.uiautomator.BySelector +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class UiViewSelector( val index: Int, val selectors: List, diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiBaseView.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiBaseView.kt index 033d977ee..e887e8428 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiBaseView.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiBaseView.kt @@ -16,6 +16,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiObjectInterac import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base class for all UiAutomator DSL views * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiView.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiView.kt index 139777047..e6454589b 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiView.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/common/views/UiView.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.component.common.views import com.kaspersky.components.kautomator.component.common.builders.UiViewBuilder import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Simple view with [UiBaseAction][com.kaspersky.components.kautomator.component.common.actions.UiBaseActions] and * [UiBaseAssertion][com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions] diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/dialog/UiAlertDialog.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/dialog/UiAlertDialog.kt index 2732a9a27..462f10735 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/dialog/UiAlertDialog.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/dialog/UiAlertDialog.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.common.views.UiBaseView import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.component.text.UiTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * View for acting and asserting on default AlertDialog */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditText.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditText.kt index fdce66621..b921f305f 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditText.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditText.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewSelec import com.kaspersky.components.kautomator.component.common.views.UiBaseView import com.kaspersky.components.kautomator.component.text.UiTextViewAssertions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Ui View with [UiEditableActions] and [UiTextViewAssertions] * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditableActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditableActions.kt index 40a602da7..ceaedc982 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditableActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/edit/UiEditableActions.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.component.edit import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides editable actions for UiEditText */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/scroll/UiScrollView.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/scroll/UiScrollView.kt index e82c66967..9dc5c1b00 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/scroll/UiScrollView.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/scroll/UiScrollView.kt @@ -7,6 +7,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UiScrollView : UiBaseView, UiSwipeableActions, UiScrollableActions { constructor(selector: UiViewSelector) : super(selector) constructor(builder: UiViewBuilder.() -> Unit) : super(builder) diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitch.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitch.kt index 2d9f46f66..31bbbb1a7 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitch.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitch.kt @@ -7,6 +7,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewSelec import com.kaspersky.components.kautomator.component.common.views.UiBaseView import com.kaspersky.components.kautomator.component.text.UiTextViewAssertions +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Ui View with [UiSwitchableActions] and [UiBaseAssertions] * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitchableActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitchableActions.kt index 734693c5d..7c71f5384 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitchableActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/switch/UiSwitchableActions.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.component.switch.UiSwitchableActions. import com.kaspersky.components.kautomator.component.switch.UiSwitchableActions.SwitchableUiActionType.SWITCH import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides switchable actions for UiSwitch */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiButton.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiButton.kt index a08de94d6..6b20f177e 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiButton.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiButton.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Ui View with UiBaseActions and UiTextViewAssertions * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextView.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextView.kt index 3ce6af793..b70175403 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextView.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextView.kt @@ -6,6 +6,25 @@ import com.kaspersky.components.kautomator.component.common.builders.UiViewBuild import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector import com.kaspersky.components.kautomator.component.common.views.UiBaseView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Ui View with UiBaseActions and UiTextViewAssertions * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextViewAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextViewAssertions.kt index 9a0f768c9..504212228 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextViewAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/component/text/UiTextViewAssertions.kt @@ -5,6 +5,25 @@ import com.google.common.truth.Truth.assertThat import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides assertions for UiTextView */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptable.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptable.kt index 9fdf50b80..e2298bec2 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptable.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptable.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.intercept.base import com.kaspersky.components.kautomator.intercept.delegate.UiDelegate +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface UiInterceptable { val view: UiDelegate diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterception.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterception.kt index d2cb38ea2..be600bd22 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterception.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterception.kt @@ -1,3 +1,22 @@ package com.kaspersky.components.kautomator.intercept.base +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class UiInterception(val isOverride: Boolean, val interceptor: T) diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptor.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptor.kt index 7effce08b..1e30ab6cb 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptor.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/base/UiInterceptor.kt @@ -7,6 +7,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base class for intercepting the call chain from Kautomator to UiAutomator. * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDelegate.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDelegate.kt index c9bae32d9..8d142ef77 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDelegate.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDelegate.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.intercept.delegate import com.kaspersky.components.kautomator.intercept.base.UiInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Base delegate interface for Kautomator. * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDeviceInteractionDelegate.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDeviceInteractionDelegate.kt index 16cb4faa5..94ccca63e 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDeviceInteractionDelegate.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiDeviceInteractionDelegate.kt @@ -10,6 +10,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiOperationBaseIm import com.kaspersky.components.kautomator.intercept.operation.UiOperationType import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Delegation class for [androidx.test.uiautomator.UiDevice]. * Wraps all available public calls and intercepts into [check] and [perform]. diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiObjectInteractionDelegate.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiObjectInteractionDelegate.kt index 8697068d6..db2f86b46 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiObjectInteractionDelegate.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/delegate/UiObjectInteractionDelegate.kt @@ -12,6 +12,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiOperationBaseIm import com.kaspersky.components.kautomator.intercept.operation.UiOperationType import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Delegation class for [androidx.test.uiautomator.UiObject2]. * Wraps all available public calls and intercepts into [check] and [perform]. diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/exception/UnfoundedUiObjectException.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/exception/UnfoundedUiObjectException.kt index 1c176d2bd..bb1ecae5c 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/exception/UnfoundedUiObjectException.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/exception/UnfoundedUiObjectException.kt @@ -2,6 +2,25 @@ package com.kaspersky.components.kautomator.intercept.exception import com.kaspersky.components.kautomator.component.common.builders.UiViewSelector +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The exception is thrown in case if UiObject2 is not found on the screen */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiDeviceInteraction.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiDeviceInteraction.kt index 922a8b11a..55a897d5e 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiDeviceInteraction.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiDeviceInteraction.kt @@ -4,6 +4,25 @@ import androidx.test.uiautomator.UiDevice import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAction import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides an interaction to work with the UiDevice */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiInteraction.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiInteraction.kt index 5209c90a4..f693c363b 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiInteraction.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiInteraction.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.intercept.interaction +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface UiInteraction { fun check(assertion: Assertion) diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiObjectInteraction.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiObjectInteraction.kt index 7ad6b48a7..bce340234 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiObjectInteraction.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/interaction/UiObjectInteraction.kt @@ -8,6 +8,25 @@ import com.kaspersky.components.kautomator.intercept.exception.UnfoundedUiObject import com.kaspersky.components.kautomator.intercept.operation.UiObjectAction import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Provides an interaction to work with the UiView described by [selector] */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/ActionAliases.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/ActionAliases.kt index af2c98625..240e71188 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/ActionAliases.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/ActionAliases.kt @@ -3,6 +3,25 @@ package com.kaspersky.components.kautomator.intercept.operation import androidx.test.uiautomator.UiDevice import androidx.test.uiautomator.UiObject2 +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Appropriate type aliases of UiOperation according to name paradigm in Kakao library (Assertions and Actions) */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperation.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperation.kt index 5bcb5e751..642980a8d 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperation.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperation.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.intercept.operation +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Responsible for executing an interaction on the element of UiAutomator */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationBaseImpl.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationBaseImpl.kt index ee359b4e9..1658e7bc0 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationBaseImpl.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationBaseImpl.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.intercept.operation +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UiOperationBaseImpl( override val type: UiOperationType, override val description: String?, diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationType.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationType.kt index 2452a7c45..bf3f53d45 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationType.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/intercept/operation/UiOperationType.kt @@ -1,5 +1,24 @@ package com.kaspersky.components.kautomator.intercept.operation +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Type of the concrete action executing on the given element of UiAutomator */ diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreen.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreen.kt index 556546d4a..9d080d97f 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreen.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreen.kt @@ -18,6 +18,25 @@ import com.kaspersky.components.kautomator.intercept.operation.UiObjectAssertion import java.util.Deque import java.util.LinkedList +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Container class for UiAutomator elements. * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreenActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreenActions.kt index 8e732caab..8a69677eb 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreenActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/screen/UiScreenActions.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.screen import com.kaspersky.components.kautomator.intercept.delegate.UiDeviceInteractionDelegate import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Interface with common actions for all UiAutomator screens * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystem.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystem.kt index 65a08e94a..9dbb41f40 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystem.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystem.kt @@ -12,6 +12,25 @@ import com.kaspersky.components.kautomator.intercept.interaction.UiDeviceInterac import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAction import com.kaspersky.components.kautomator.intercept.operation.UiDeviceAssertion +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Container class for UiAutomator action and assertions executing in the UiSystem. * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemActions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemActions.kt index fb2925568..84ac6dee8 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemActions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemActions.kt @@ -4,6 +4,25 @@ package com.kaspersky.components.kautomator.system import com.kaspersky.components.kautomator.intercept.delegate.UiDeviceInteractionDelegate import com.kaspersky.components.kautomator.intercept.operation.UiOperationType +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Interface with common actions providing by UiAutomator and executing in the System * diff --git a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemAssertions.kt b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemAssertions.kt index ef8195f35..1ac2cefea 100644 --- a/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemAssertions.kt +++ b/kautomator/src/main/kotlin/com/kaspersky/components/kautomator/system/UiSystemAssertions.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.intercept.delegate.UiDeviceInteractio import com.kaspersky.components.kautomator.intercept.operation.UiOperationType import com.kaspersky.components.kautomator.system.UiSystemAssertions.UiSystemAssertionType.IS_SCREEN_ON +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Interface with common assertions providing by UiAutomator and executing in the System * diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/CreatePageObjectFromUiDump.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/CreatePageObjectFromUiDump.kt index f0f8e632b..51b196f50 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/CreatePageObjectFromUiDump.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/CreatePageObjectFromUiDump.kt @@ -7,6 +7,25 @@ import java.io.File import java.nio.charset.Charset import javax.xml.parsers.DocumentBuilderFactory +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * inputs: * 1. Path to xml file with UI Dump diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/Generator.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/Generator.kt index 5bbf03345..4f5a02f32 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/Generator.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/Generator.kt @@ -1,5 +1,24 @@ package com.kaspresso.components.pageobjectcodegen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface Generator { fun generate(writer: TextWriter) } diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/KotlinCodeGenerator.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/KotlinCodeGenerator.kt index aa3c3eff9..91707cee8 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/KotlinCodeGenerator.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/KotlinCodeGenerator.kt @@ -1,5 +1,24 @@ package com.kaspresso.components.pageobjectcodegen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class KotlinCodeGenerator(val elements: List, private val filePackage: String) : Generator { override fun generate(writer: TextWriter) { with(writer) { diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/PageObjectGenerator.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/PageObjectGenerator.kt index 961d9f8c4..2ff5aab34 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/PageObjectGenerator.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/PageObjectGenerator.kt @@ -1,5 +1,24 @@ package com.kaspresso.components.pageobjectcodegen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class PageObjectGenerator(elements: List, filePackage: String, private val className: String) : KotlinCodeGenerator(elements, filePackage) { override fun generate(writer: TextWriter) { diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/TextWriter.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/TextWriter.kt index e34f275dc..08a0eb85a 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/TextWriter.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/TextWriter.kt @@ -2,6 +2,25 @@ package com.kaspresso.components.pageobjectcodegen import java.lang.StringBuilder +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class TextWriter(private val indentation: Int = 0) { private val line = StringBuilder() diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/View.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/View.kt index cfc6036b1..11dcf96c8 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/View.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/View.kt @@ -1,5 +1,24 @@ package com.kaspresso.components.pageobjectcodegen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class View( override val resourceId: String, override val viewType: ViewType, diff --git a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/ViewType.kt b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/ViewType.kt index c12110460..f949d25a3 100644 --- a/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/ViewType.kt +++ b/page-object-code-gen/src/main/java/com/kaspresso/components/pageobjectcodegen/ViewType.kt @@ -7,6 +7,25 @@ import io.github.kakaocup.kakao.recycler.KRecyclerView import io.github.kakaocup.kakao.text.KButton import io.github.kakaocup.kakao.text.KTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + enum class ViewType(val androidName: String) { TextView("android.widget.TextView") { override fun getClass(): List { diff --git a/page-object-code-gen/src/test/java/com/kaspresso/components/pageobjectcodegen/CodeGenTest.kt b/page-object-code-gen/src/test/java/com/kaspresso/components/pageobjectcodegen/CodeGenTest.kt index 2ba47919b..fe4cbc65f 100644 --- a/page-object-code-gen/src/test/java/com/kaspresso/components/pageobjectcodegen/CodeGenTest.kt +++ b/page-object-code-gen/src/test/java/com/kaspresso/components/pageobjectcodegen/CodeGenTest.kt @@ -7,6 +7,25 @@ import org.junit.runners.Parameterized import java.io.File import java.lang.Runtime +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(Parameterized::class) class CodeGenTest( private val inputPath: String, diff --git a/samples/adbserver-sample/src/main/java/com/kaspersky/adbserver/sample/MainActivity.kt b/samples/adbserver-sample/src/main/java/com/kaspersky/adbserver/sample/MainActivity.kt index feeb83baa..0f1b541fd 100644 --- a/samples/adbserver-sample/src/main/java/com/kaspersky/adbserver/sample/MainActivity.kt +++ b/samples/adbserver-sample/src/main/java/com/kaspersky/adbserver/sample/MainActivity.kt @@ -8,6 +8,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.adbserver.device.AdbTerminal import java.util.concurrent.Executors +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { private val executor = Executors.newCachedThreadPool() diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportCustomizeTest.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportCustomizeTest.kt index be6f45d9a..1dfddf5fa 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportCustomizeTest.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportCustomizeTest.kt @@ -16,6 +16,25 @@ import com.kaspersky.kaspresso.testcases.models.info.TestInfo import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Use [withAllureSupport] function to add the all available allure interceptors. */ diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTest.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTest.kt index f76740b2c..2174dd5cf 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTest.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTest.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Use [withAllureSupport] function to add the all available allure interceptors. */ diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTestWithRule.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTestWithRule.kt index d4cdfae9e..1d683f130 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTestWithRule.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureSupportTestWithRule.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.params.VideoParams import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Use [withAllureSupport] function to add the all available allure interceptors. */ diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureVisualTest.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureVisualTest.kt index 41339aabc..b4fdbe9d7 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureVisualTest.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/AllureVisualTest.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.alluresupport.sample.screen.MainScreen import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AllureVisualTest : AllureVisualTestCase(failEarly = false) { @get:Rule val activityRule = activityScenarioRule() diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/screen/MainScreen.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/screen/MainScreen.kt index b952f5535..3d123a6b4 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/screen/MainScreen.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sample/screen/MainScreen.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import io.github.kakaocup.kakao.text.KButton import io.github.kakaocup.kakao.text.KTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object MainScreen : KScreen() { override val layoutId: Int = R.layout.activity_main diff --git a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sanity/AllureSupportSanityTest.kt b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sanity/AllureSupportSanityTest.kt index b4def30f5..39a775b12 100644 --- a/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sanity/AllureSupportSanityTest.kt +++ b/samples/kaspresso-allure-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/alluresupport/sanity/AllureSupportSanityTest.kt @@ -19,6 +19,25 @@ import org.junit.runner.Description import org.junit.runner.Result import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private lateinit var testDirsProvider: AllureDirsProvider private lateinit var testRootDirsProvider: AllureResourcesRootDirsProvider diff --git a/samples/kaspresso-allure-support-sample/src/main/kotlin/com/kaspersky/kaspresso/alluresupport/sample/MainActivity.kt b/samples/kaspresso-allure-support-sample/src/main/kotlin/com/kaspersky/kaspresso/alluresupport/sample/MainActivity.kt index 0aa308802..83ac1e71d 100644 --- a/samples/kaspresso-allure-support-sample/src/main/kotlin/com/kaspersky/kaspresso/alluresupport/sample/MainActivity.kt +++ b/samples/kaspresso-allure-support-sample/src/main/kotlin/com/kaspersky/kaspresso/alluresupport/sample/MainActivity.kt @@ -5,6 +5,25 @@ import android.view.View import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.alluresupport.sample.databinding.ActivityMainBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsDisabledSanityTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsDisabledSanityTest.kt index cc690cf69..ed5cac43f 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsDisabledSanityTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsDisabledSanityTest.kt @@ -15,6 +15,25 @@ import org.junit.Test import org.junit.runner.RunWith import java.lang.AssertionError +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class AutoScrollSemanticsDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport( diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsEnabledSanityTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsEnabledSanityTest.kt index c6dcc4a30..e63910314 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsEnabledSanityTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/autoscroll/AutoScrollSemanticsEnabledSanityTest.kt @@ -16,6 +16,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class AutoScrollSemanticsEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport( diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeDisabledSanityTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeDisabledSanityTest.kt index fad556532..639070ae5 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeDisabledSanityTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeDisabledSanityTest.kt @@ -14,6 +14,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class FlakyComposeDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport( diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeEnabledSanityTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeEnabledSanityTest.kt index fca5da216..b351d9280 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeEnabledSanityTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/kaspresso/sanity/flaky/FlakyComposeEnabledSanityTest.kt @@ -16,6 +16,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class FlakyComposeEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport( diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeMainScreen.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeMainScreen.kt index b2f9252d1..7e2e9e94d 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeMainScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeMainScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.composesupport.core.KNode import com.kaspersky.kaspresso.composesupport.sample.resources.C import io.github.kakaocup.compose.node.element.ComposeScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComposeMainScreen(semanticsProvider: SemanticsNodeInteractionsProvider) : ComposeScreen( semanticsProvider = semanticsProvider, diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSanityFlakyScreen.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSanityFlakyScreen.kt index b1f18dbda..6b7e9a8b1 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSanityFlakyScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSanityFlakyScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.composesupport.core.KNode import com.kaspersky.kaspresso.composesupport.sample.resources.C import io.github.kakaocup.compose.node.element.ComposeScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComposeSanityFlakyScreen(semanticsProvider: SemanticsNodeInteractionsProvider) : ComposeScreen( semanticsProvider = semanticsProvider, diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeScrollScreen.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeScrollScreen.kt index 005501d20..097125ce5 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeScrollScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeScrollScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.composesupport.core.KNode import com.kaspersky.kaspresso.composesupport.sample.resources.C import io.github.kakaocup.compose.node.element.ComposeScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComposeScrollScreen(semanticsProvider: SemanticsNodeInteractionsProvider) : ComposeScreen( semanticsProvider = semanticsProvider, diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSimpleFlakyScreen.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSimpleFlakyScreen.kt index 96bc1b8b2..d55fb8410 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSimpleFlakyScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/screen/ComposeSimpleFlakyScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.composesupport.core.KNode import com.kaspersky.kaspresso.composesupport.sample.resources.C import io.github.kakaocup.compose.node.element.ComposeScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComposeSimpleFlakyScreen(semanticsProvider: SemanticsNodeInteractionsProvider) : ComposeScreen( semanticsProvider = semanticsProvider, diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeCustomizeTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeCustomizeTest.kt index a66baa1fb..a284efa6b 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeCustomizeTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeCustomizeTest.kt @@ -15,6 +15,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class ComposeCustomizeTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport( diff --git a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeSimpleFlakyTest.kt b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeSimpleFlakyTest.kt index d029a4436..b63952920 100644 --- a/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeSimpleFlakyTest.kt +++ b/samples/kaspresso-compose-support-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/composesupport/sample/test/ComposeSimpleFlakyTest.kt @@ -13,6 +13,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class ComposeSimpleFlakyTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport() diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/MainActivity.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/MainActivity.kt index e7315e32f..a88f46d67 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/MainActivity.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/MainActivity.kt @@ -16,6 +16,25 @@ import com.kaspersky.kaspresso.composesupport.sample.features.sanityflaky.Sanity import com.kaspersky.kaspresso.composesupport.sample.features.scroll.ScrollScreen import com.kaspersky.kaspresso.composesupport.sample.resources.C +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { private val simpleFlakyViewModel: SimpleFlakyViewModel by viewModels() diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyScreen.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyScreen.kt index f7e1e4097..d1b3ca815 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyScreen.kt @@ -25,6 +25,25 @@ import androidx.lifecycle.MutableLiveData import com.kaspersky.kaspresso.composesupport.sample.R import com.kaspersky.kaspresso.composesupport.sample.resources.C +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Composable fun SimpleFlakyScreen( simpleFlakyStateLiveData: LiveData, diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyState.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyState.kt index 72d997e9e..0a6b66f52 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyState.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyState.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.composesupport.sample.features.flaky +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class SimpleFlakyState( val firstButtonVisibility: Boolean, val secondButtonVisibility: Boolean, diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyViewModel.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyViewModel.kt index 406a17c4f..068cc622e 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyViewModel.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/flaky/SimpleFlakyViewModel.kt @@ -9,6 +9,25 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.plus +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val TIMEOUT = 1_000L class SimpleFlakyViewModel : ViewModel() { diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/main/MainScreen.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/main/MainScreen.kt index 6c283761b..b347024e3 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/main/MainScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/main/MainScreen.kt @@ -19,6 +19,25 @@ import androidx.compose.ui.unit.dp import com.kaspersky.kaspresso.composesupport.sample.R import com.kaspersky.kaspresso.composesupport.sample.resources.C +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Composable fun MainScreen( simpleFlakyClick: () -> Unit, diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyScreen.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyScreen.kt index c9f85f09d..1da0a7940 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyScreen.kt @@ -21,6 +21,25 @@ import androidx.lifecycle.MutableLiveData import com.kaspersky.kaspresso.composesupport.sample.R import com.kaspersky.kaspresso.composesupport.sample.resources.C +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Composable fun SanityFlakyScreen( sanityFlakyStateLiveData: LiveData, diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyState.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyState.kt index a143c3a9f..778f6ce97 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyState.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyState.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.composesupport.sample.features.sanityflaky +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class SanityFlakyState( val firstButtonVisibility: Boolean, val secondButtonVisibility: Boolean diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyViewModel.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyViewModel.kt index eb3bb3cc3..f3438ab22 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyViewModel.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/sanityflaky/SanityFlakyViewModel.kt @@ -9,6 +9,25 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.plus +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val TIMEOUT = 3_000L class SanityFlakyViewModel : ViewModel() { diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/scroll/ScrollScreen.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/scroll/ScrollScreen.kt index 94f4e0a5b..77fd69094 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/scroll/ScrollScreen.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/features/scroll/ScrollScreen.kt @@ -21,6 +21,25 @@ import androidx.compose.ui.unit.dp import com.kaspersky.kaspresso.composesupport.sample.R import com.kaspersky.kaspresso.composesupport.sample.resources.C +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Composable fun ScrollScreen() { Column( diff --git a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/resources/C.kt b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/resources/C.kt index 97fe70727..6e9f2a01c 100644 --- a/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/resources/C.kt +++ b/samples/kaspresso-compose-support-sample/src/main/kotlin/com/kaspersky/kaspresso/composesupport/sample/resources/C.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.composesupport.sample.resources +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + // Like R, but C object C { object Tag { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/adb_server_tests/AdbServerTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/adb_server_tests/AdbServerTest.kt index 75b5967cf..5b2469ca0 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/adb_server_tests/AdbServerTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/adb_server_tests/AdbServerTest.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AdbServerTest : TestCase() { @get:Rule val runtimePermissionRule: GrantPermissionRule = GrantPermissionRule.grant( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/artifacts_pulling/ArtifactsPullingTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/artifacts_pulling/ArtifactsPullingTest.kt index 20348a609..456ccd9fa 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/artifacts_pulling/ArtifactsPullingTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/artifacts_pulling/ArtifactsPullingTest.kt @@ -14,6 +14,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * After test completes screenshots directory would be pulled into provided destination path ob the host machine */ diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/autoscrollfallback_tests/ScrollViewWithPaddingTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/autoscrollfallback_tests/ScrollViewWithPaddingTest.kt index 35a3667d4..d423b41fd 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/autoscrollfallback_tests/ScrollViewWithPaddingTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/autoscrollfallback_tests/ScrollViewWithPaddingTest.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScrollViewWithPaddingTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/ComplexComposeTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/ComplexComposeTest.kt index 016837819..059fe3165 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/ComplexComposeTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/ComplexComposeTest.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComplexComposeTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/SimpleComposeTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/SimpleComposeTest.kt index 46215b495..da2159043 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/SimpleComposeTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/SimpleComposeTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SimpleComposeTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/WebComposeTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/WebComposeTest.kt index f4b02f27f..8e8c16db1 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/WebComposeTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/compose_tests/WebComposeTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WebComposeTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/DisabledStepAutoNumberingTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/DisabledStepAutoNumberingTest.kt index e3a9ae3b7..08b46c29d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/DisabledStepAutoNumberingTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/DisabledStepAutoNumberingTest.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DisabledStepAutoNumberingTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple().apply { stepParams.autonumber = false diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsChecker.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsChecker.kt index 7ac5d71f2..5c5d1ccc5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsChecker.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsChecker.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.configurator_tests.defaultaction_tests import org.junit.Assert.assertTrue +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object DefaultActionsChecker { private val checkList = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsTest.kt index 80047403a..cab58a94d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/DefaultActionsTest.kt @@ -11,6 +11,25 @@ import org.junit.After import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DefaultActionsTest : ParentTestCase( kaspressoBuilderAdditional = { beforeEachTest { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/ParentTestCase.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/ParentTestCase.kt index ab17abd8d..c778c1b7a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/ParentTestCase.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/defaultaction_tests/ParentTestCase.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspressample.configurator_tests.defaultaction_tests import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.api.testcase.TestCase +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + open class ParentTestCase( kaspressoBuilderAdditional: Kaspresso.Builder.() -> Unit ) : TestCase(kaspressoBuilder = Kaspresso.Builder.simple().apply { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/EnricherTestCase.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/EnricherTestCase.kt index 204acc2a9..83234aa2d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/EnricherTestCase.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/EnricherTestCase.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspressample.configurator_tests.enricher_tests.enrichers.L import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.api.testcase.BaseTestCase +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Example of base class with not default TestContext and main section enrichers. */ diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/MainSectionEnricherTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/MainSectionEnricherTest.kt index fa1d7642d..e979576d8 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/MainSectionEnricherTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/MainSectionEnricherTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspressample.screen.SimpleScreen import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainSectionEnricherTest : EnricherTestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/EnricherTestData.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/EnricherTestData.kt index 3e48667e6..92e914fb8 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/EnricherTestData.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/EnricherTestData.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class EnricherTestData( val users: List, val posts: List diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/Post.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/Post.kt index 38f910859..984af2c3f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/Post.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/Post.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class Post( val id: Long, val userId: Long, diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/User.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/User.kt index 488961b61..f206c4b91 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/User.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data/User.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class User( val id: Long, val name: String diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data_producers/EnricherTestCaseDataProducer.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data_producers/EnricherTestCaseDataProducer.kt index c28a32fee..f3defd84b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data_producers/EnricherTestCaseDataProducer.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/data_producers/EnricherTestCaseDataProducer.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.configurator_tests.enricher_tests.data.Post import com.kaspersky.kaspressample.configurator_tests.enricher_tests.data.User import com.kaspersky.kaspressample.configurator_tests.enricher_tests.dsl.EnricherTestDsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class EnricherTestCaseDataProducer { fun initData(action: (EnricherTestDsl.() -> Unit)?): EnricherTestData { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestCaseDsl.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestCaseDsl.kt index f0fb0bf7f..fdae317f8 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestCaseDsl.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestCaseDsl.kt @@ -1,4 +1,23 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.dsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @DslMarker annotation class EnricherTestCaseDsl diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestDsl.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestDsl.kt index 91c85bb1e..ef579a6b6 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestDsl.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/EnricherTestDsl.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.dsl import java.util.UUID +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @EnricherTestCaseDsl class EnricherTestDsl { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/PostDsl.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/PostDsl.kt index c5e6d5959..f90f85ed6 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/PostDsl.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/PostDsl.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.dsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @EnricherTestCaseDsl class PostDsl( val uniqueTestId: String, diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/UserDsl.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/UserDsl.kt index 5f35cbcd3..b2122eebe 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/UserDsl.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/dsl/UserDsl.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.configurator_tests.enricher_tests.dsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @EnricherTestCaseDsl class UserDsl( val uniqueTestId: String, diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/AssertionMainSectionEnricher.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/AssertionMainSectionEnricher.kt index 365f6c95f..be0baae06 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/AssertionMainSectionEnricher.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/AssertionMainSectionEnricher.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.enricher.MainSectionEnricher import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AssertionMainSectionEnricher : MainSectionEnricher { override fun TestContext.afterMainSectionRun(testInfo: TestInfo) { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/LoggingMainSectionEnricher.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/LoggingMainSectionEnricher.kt index 08f04afc5..fc67a77ee 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/LoggingMainSectionEnricher.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/enricher_tests/enrichers/LoggingMainSectionEnricher.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.enricher.MainSectionEnricher import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext import com.kaspersky.kaspresso.testcases.models.info.TestInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoggingMainSectionEnricher : MainSectionEnricher { override fun TestContext.beforeMainSectionRun(testInfo: TestInfo) { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/KaspressoConfiguringTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/KaspressoConfiguringTest.kt index 79aa966b1..8b89dc4cb 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/KaspressoConfiguringTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/KaspressoConfiguringTest.kt @@ -16,6 +16,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * In this test we show how to configure your custom Kaspresso interceptors. * Besides in the test there are some assertions to check a work of interceptors. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/helpers/CheckCustomInterceptorsStorage.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/helpers/CheckCustomInterceptorsStorage.kt index d447a2a73..e22b070de 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/helpers/CheckCustomInterceptorsStorage.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/helpers/CheckCustomInterceptorsStorage.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.configurator_tests.interceptor_tests.helpers import org.junit.Assert.assertTrue +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object CheckCustomInterceptorsStorage { private val viewActionInterceptorCheckList = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomStepWatcherInterceptor.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomStepWatcherInterceptor.kt index c4ffd6c55..291a624d2 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomStepWatcherInterceptor.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomStepWatcherInterceptor.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspressample.configurator_tests.interceptor_tests.helpers. import com.kaspersky.kaspresso.interceptors.watcher.testcase.StepWatcherInterceptor import com.kaspersky.kaspresso.testcases.models.info.StepInfo +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CustomStepWatcherInterceptor : StepWatcherInterceptor { override fun interceptAfterFinally(stepInfo: StepInfo) { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewActionWatcherInterceptor.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewActionWatcherInterceptor.kt index 416e29285..c4e404ee5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewActionWatcherInterceptor.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewActionWatcherInterceptor.kt @@ -5,6 +5,25 @@ import androidx.test.espresso.ViewAction import com.kaspersky.kaspressample.configurator_tests.interceptor_tests.helpers.CheckCustomInterceptorsStorage import com.kaspersky.kaspresso.interceptors.watcher.view.ViewActionWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CustomViewActionWatcherInterceptor : ViewActionWatcherInterceptor { override fun intercept(viewAction: ViewAction, view: View) { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewAssertionWatcherInterceptor.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewAssertionWatcherInterceptor.kt index f8ed84905..1272e1b46 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewAssertionWatcherInterceptor.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/configurator_tests/interceptor_tests/interceptors/CustomViewAssertionWatcherInterceptor.kt @@ -6,6 +6,25 @@ import androidx.test.espresso.ViewAssertion import com.kaspersky.kaspressample.configurator_tests.interceptor_tests.helpers.CheckCustomInterceptorsStorage import com.kaspersky.kaspresso.interceptors.watcher.view.ViewAssertionWatcherInterceptor +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CustomViewAssertionWatcherInterceptor : ViewAssertionWatcherInterceptor { private var previousViewAssertion: ViewAssertion? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/ContinuouslyTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/ContinuouslyTest.kt index e40dcb4eb..eb539dcc7 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/ContinuouslyTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/ContinuouslyTest.kt @@ -13,6 +13,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ContinuouslyTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/UiContinuouslyTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/UiContinuouslyTest.kt index 498b65363..c00596c1d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/UiContinuouslyTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/continuously_tests/UiContinuouslyTest.kt @@ -13,6 +13,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UiContinuouslyTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/customclick_tests/CustomClickTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/customclick_tests/CustomClickTest.kt index a09a03f78..2d11ed12b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/customclick_tests/CustomClickTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/customclick_tests/CustomClickTest.kt @@ -16,6 +16,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The example of how to apply kakao custom clicks in Kaspresso */ diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAccessibilitySampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAccessibilitySampleTest.kt index 0ad079978..5f4489f16 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAccessibilitySampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAccessibilitySampleTest.kt @@ -17,6 +17,25 @@ import org.junit.Ignore import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Sometimes, this test is unstable. * The possible reason is a slow (not immediate) update of ContentResolver by which the test is checking diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceActivitiesSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceActivitiesSampleTest.kt index 653a9d83c..d560692dd 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceActivitiesSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceActivitiesSampleTest.kt @@ -10,6 +10,25 @@ import org.junit.Assert.assertThat import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceActivitiesSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAppSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAppSampleTest.kt index b23ec5ea9..ea5e430e5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAppSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceAppSampleTest.kt @@ -15,6 +15,25 @@ import org.junit.Assume.assumeTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Installs and then uninstalls an apk file placed at /artifacts directory. * [Apps.install] uses the [TEST_APK_FILE_RELATIVE_PATH] relative path to install the apk. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceExploitSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceExploitSampleTest.kt index 9b9ede8de..e0c45bc3b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceExploitSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceExploitSampleTest.kt @@ -14,6 +14,25 @@ import org.junit.Assert.assertNull import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceExploitSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFilesSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFilesSampleTest.kt index 80ee53c72..112e7998b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFilesSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFilesSampleTest.kt @@ -13,6 +13,25 @@ import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Pushes and then removes a file file placed at /artifacts directory. * [Files.push] uses the [FILE_PATH] relative path to push the file. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFullScreenshotSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFullScreenshotSampleTest.kt index 693213bf7..67690e82c 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFullScreenshotSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceFullScreenshotSampleTest.kt @@ -10,6 +10,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceFullScreenshotSampleTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceHackPermissionsSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceHackPermissionsSampleTest.kt index 6cdf17c11..2d1909eaa 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceHackPermissionsSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceHackPermissionsSampleTest.kt @@ -13,6 +13,25 @@ import org.junit.Assume.assumeTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * Attention please! * Before you start this test you must remove Kaspresso sample application at the device or diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceKeyboardSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceKeyboardSampleTest.kt index 839534522..983e5168b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceKeyboardSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceKeyboardSampleTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceKeyboardSampleTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLanguageSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLanguageSampleTest.kt index 49c85de3a..d9a4a161e 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLanguageSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLanguageSampleTest.kt @@ -11,6 +11,25 @@ import org.junit.Rule import org.junit.Test import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceLanguageSampleTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLocationSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLocationSampleTest.kt index 95d6af7c4..eb73b048a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLocationSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLocationSampleTest.kt @@ -20,6 +20,25 @@ import org.junit.Ignore import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Ignore("There's a bug in AVD images that makes geolocation change non-possible in AVD launched with '-no-window' flag") class DeviceLocationSampleTest : TestCase() { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLogcatSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLogcatSampleTest.kt index 4e0908760..38947b170 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLogcatSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceLogcatSampleTest.kt @@ -11,6 +11,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceLogcatSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceNetworkSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceNetworkSampleTest.kt index eebe2a9a9..00ae8c740 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceNetworkSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceNetworkSampleTest.kt @@ -23,6 +23,25 @@ import org.junit.Test import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceNetworkSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePermissionsSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePermissionsSampleTest.kt index afd5a6c61..214dffac8 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePermissionsSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePermissionsSampleTest.kt @@ -14,6 +14,25 @@ import org.junit.Assume.assumeTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DevicePermissionsSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePhoneSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePhoneSampleTest.kt index fe97ba8bb..7a6fe064e 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePhoneSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DevicePhoneSampleTest.kt @@ -14,6 +14,25 @@ import org.junit.Assert.assertNotNull import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DevicePhoneSampleTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceScreenshotSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceScreenshotSampleTest.kt index 569f12dd9..275d909d7 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceScreenshotSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceScreenshotSampleTest.kt @@ -10,6 +10,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceScreenshotSampleTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceServerSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceServerSampleTest.kt index e6d657d4a..b49f916a0 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceServerSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/device_tests/DeviceServerSampleTest.kt @@ -8,6 +8,25 @@ import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceServerSampleTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCase.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCase.kt index 0ec0e2249..492b7676c 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCase.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCase.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.DocLocScreenshotTestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of [DocLocScreenshotTestCase] usage with locale's changing at OS. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCaseLegacy.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCaseLegacy.kt index e1e769a65..4b88bdbd1 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCaseLegacy.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ChangeSysLanguageTestCaseLegacy.kt @@ -11,6 +11,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of [DocLocScreenshotTestCase] usage with locale's changing at OS. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotActivityWithToolbarTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotActivityWithToolbarTest.kt index 499f8bab0..4486df36a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotActivityWithToolbarTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotActivityWithToolbarTest.kt @@ -13,6 +13,25 @@ import org.junit.Assert.assertTrue import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private lateinit var testDirsProvider: DirsProvider private lateinit var testRootDirsProvider: ResourcesRootDirsProvider diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotDialogSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotDialogSampleTest.kt index b2a0d377d..278e2f345 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotDialogSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotDialogSampleTest.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.DocLocScreenshotTestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotDialogSampleTest : DocLocScreenshotTestCase(locales = "en,ru", toggleNightMode = true) { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotFullWindowSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotFullWindowSampleTest.kt index 6c95aad35..ab61c64f0 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotFullWindowSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotFullWindowSampleTest.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.DocLocScreenshotTestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of [DocLocScreenshotTestCase] usage. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTest.kt index b04ca15b8..f7794cecb 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTest.kt @@ -11,6 +11,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of [DocLocScreenshotTestCase] usage. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTestLegacy.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTestLegacy.kt index 2700bb809..a3e27b2b6 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTestLegacy.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/ScreenshotSampleTestLegacy.kt @@ -12,6 +12,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of [DocLocScreenshotTestCase] usage. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTest.kt index 459e2608d..bc4093b3a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTest.kt @@ -14,6 +14,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of advanced [DocLocScreenshotTestCase] usage. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTestLegacy.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTestLegacy.kt index fc63e425c..ba6671917 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTestLegacy.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/advanced/AdvancedScreenshotSampleTestLegacy.kt @@ -15,6 +15,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of advanced [DocLocScreenshotTestCase] usage. * For more information see DocLoc wiki page. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/AutoNumeratedNamesProvider.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/AutoNumeratedNamesProvider.kt index e131272c1..471e0047f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/AutoNumeratedNamesProvider.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/AutoNumeratedNamesProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.docloc_tests.customdirectory import com.kaspersky.kaspresso.files.resources.ResourceFileNamesProvider +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class AutoNumeratedNamesProvider : ResourceFileNamesProvider { private var counter = 0 override fun getFileName(tag: String, fileExtension: String): String = "screenshot#${counter++}_$tag$fileExtension" diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/CustomDirectoryScreenshotSampleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/CustomDirectoryScreenshotSampleTest.kt index c32643059..d0f5421d0 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/CustomDirectoryScreenshotSampleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/CustomDirectoryScreenshotSampleTest.kt @@ -18,6 +18,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of how to change default screenshots directories and file names. * As result all screenshots will be stored at '/sdcard/custom_directory/' path. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/FlatDirectoryProvider.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/FlatDirectoryProvider.kt index 85c31cd79..814758079 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/FlatDirectoryProvider.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/FlatDirectoryProvider.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.files.resources.impl.DefaultResourcesDirNameProvi import com.kaspersky.kaspresso.internal.extensions.other.createDirIfNeeded import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class FlatDirectoryProvider( private val dirsProvider: DirsProvider ) : ResourcesDirsProvider by DefaultResourcesDirsProvider( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/AutoNumeratedNameProvider.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/AutoNumeratedNameProvider.kt index aabdb8665..3a2ef6662 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/AutoNumeratedNameProvider.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/AutoNumeratedNameProvider.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.docloc_tests.customdirectory.legacy import com.kaspersky.kaspresso.device.screenshots.screenshotfiles.ScreenshotNameProvider +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal class AutoNumeratedNameProvider : ScreenshotNameProvider { private var counter = 0 diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/CustomDirectoryScreenshotSampleTestLegacy.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/CustomDirectoryScreenshotSampleTestLegacy.kt index b1e6a9a53..37b270dc1 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/CustomDirectoryScreenshotSampleTestLegacy.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/CustomDirectoryScreenshotSampleTestLegacy.kt @@ -12,6 +12,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * An example of how to change default screenshots directories and file names. * As result all screenshots will be stored at '/sdcard/custom_directory/' path. diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/FlatDirectoryProvider.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/FlatDirectoryProvider.kt index 9737126c1..2369edfb5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/FlatDirectoryProvider.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/docloc_tests/customdirectory/legacy/FlatDirectoryProvider.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspressample.docloc_tests.customdirectory.legacy import com.kaspersky.kaspresso.device.screenshots.screenshotfiles.ScreenshotDirectoryProvider import com.kaspersky.kaspresso.device.screenshots.screenshotfiles.TestMethod +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + internal object FlatDirectoryProvider : ScreenshotDirectoryProvider { override fun getDirectoryForTest(testMethod: TestMethod, runNumber: Int): String = "" } diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/BaseParametrizedTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/BaseParametrizedTest.kt index 848270676..05d4e4346 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/BaseParametrizedTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/BaseParametrizedTest.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspressample.dsl_tests.data_producers.TestCaseDataProducer import com.kaspersky.kaspresso.kaspresso.Kaspresso import com.kaspersky.kaspresso.testcases.api.testcase.BaseTestCase +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + open class BaseParametrizedTest( kaspressoBuilder: Kaspresso.Builder = Kaspresso.Builder.simple() ) : BaseTestCase( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/InitTransformDataTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/InitTransformDataTest.kt index c243ff4f3..98c7ed979 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/InitTransformDataTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/InitTransformDataTest.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspressample.screen.MainScreen import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class InitTransformDataTest : BaseParametrizedTest() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Company.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Company.kt index c2c656977..db7817789 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Company.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Company.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.dsl_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class Company( var name: String? = null, var city: String? = null, diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Owner.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Owner.kt index e05903311..8c496ca84 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Owner.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/Owner.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.dsl_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class Owner( var firstName: String? = null, var secondName: String? = null, diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseData.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseData.kt index 64020d5f9..589e40853 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseData.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseData.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.dsl_tests.data +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class TestCaseData( val companies: MutableList = mutableListOf(), val owners: MutableList = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseDsl.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseDsl.kt index 6290c2091..ef317acba 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseDsl.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data/TestCaseDsl.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.dsl_tests.data import com.kaspersky.kaspressample.dsl_tests.dsl.TestCaseDslMarker +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @TestCaseDslMarker class TestCaseDsl { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data_producers/TestCaseDataProducer.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data_producers/TestCaseDataProducer.kt index eb9ce5934..99dde4459 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data_producers/TestCaseDataProducer.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/data_producers/TestCaseDataProducer.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspressample.dsl_tests.data_producers import com.kaspersky.kaspressample.dsl_tests.data.TestCaseData import com.kaspersky.kaspressample.dsl_tests.data.TestCaseDsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class TestCaseDataProducer { /** diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/dsl/TestCaseDslMarker.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/dsl/TestCaseDslMarker.kt index 0886a6fe8..a94c424c9 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/dsl/TestCaseDslMarker.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/dsl_tests/dsl/TestCaseDslMarker.kt @@ -1,4 +1,23 @@ package com.kaspersky.kaspressample.dsl_tests.dsl +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @DslMarker annotation class TestCaseDslMarker diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiCommonFlakyScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiCommonFlakyScreen.kt index 1380b5db7..8bc3583fd 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiCommonFlakyScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiCommonFlakyScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.flaky.CommonFlakyActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiCommonFlakyScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_common_flaky diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog1.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog1.kt index c31d0ed03..739789fe9 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog1.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog1.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiComposeDialog1 : UiSampleScreen() { override val layoutId: Int? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog2.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog2.kt index 82ac88f8f..d7ca26857 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog2.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiComposeDialog2.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiComposeDialog2 : UiSampleScreen() { override val layoutId: Int? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyDialogScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyDialogScreen.kt index eaa28d223..3de9b1743 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyDialogScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyDialogScreen.kt @@ -4,6 +4,25 @@ import androidx.appcompat.app.AlertDialog import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiContinuouslyDialogScreen : UiSampleScreen() { override val layoutId: Int? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyScreen.kt index 69277be62..b6f25840d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiContinuouslyScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.continuously.ContinuouslySampleActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiContinuouslyScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_continuously diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMainScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMainScreen.kt index b51839ec0..50ad069d7 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMainScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMainScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.kaspressample.MainActivity import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiMainScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_main diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMeasureScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMeasureScreen.kt index 30aebe9d6..4eaabf294 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMeasureScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiMeasureScreen.kt @@ -7,6 +7,25 @@ import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.measure.MeasureActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiMeasureScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_measure diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSampleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSampleScreen.kt index aa48ddf42..c2636fa6a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSampleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSampleScreen.kt @@ -4,6 +4,25 @@ import android.content.Context import androidx.test.platform.app.InstrumentationRegistry import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class UiSampleScreen> : UiScreen() { override val packageName: String = "com.kaspersky.kaspressample" diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSimpleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSimpleScreen.kt index 8d43fcd2b..85db9800d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSimpleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiSimpleScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.simple.SimpleActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiSimpleScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_simple diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiWaitForIdleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiWaitForIdleScreen.kt index 95dcfaa67..214e30b4f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiWaitForIdleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/external_screens/UiWaitForIdleScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.edit.UiEditText import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.idlingwait.WaitForIdleActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiWaitForIdleScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_idlewaiting diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/CommonFlakyTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/CommonFlakyTest.kt index f9191eb3e..e0298e7c8 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/CommonFlakyTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/CommonFlakyTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CommonFlakyTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/UiCommonFlakyTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/UiCommonFlakyTest.kt index f99e19c45..837ee2dac 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/UiCommonFlakyTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/flaky_tests/UiCommonFlakyTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UiCommonFlakyTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/idlingwait_tests/WaitForIdleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/idlingwait_tests/WaitForIdleTest.kt index 509450cec..318dd9514 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/idlingwait_tests/WaitForIdleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/idlingwait_tests/WaitForIdleTest.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WaitForIdleTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { kautomatorWaitForIdleSettings = KautomatorWaitForIdleSettings.boost() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/measure_tests/KautomatorMeasureTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/measure_tests/KautomatorMeasureTest.kt index e8863f0e1..c705c0029 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/measure_tests/KautomatorMeasureTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/measure_tests/KautomatorMeasureTest.kt @@ -15,6 +15,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class KautomatorMeasureTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { kautomatorWaitForIdleSettings = KautomatorWaitForIdleSettings.boost() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerScreen.kt index b4a28a590..ac5c47b10 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.recycler.KRecyclerView import io.github.kakaocup.kakao.text.KTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object RecyclerScreen : KScreen() { override val layoutId: Int = R.layout.fragment_recycler override val viewClass: Class<*> = RecyclerFragment::class.java diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerTest.kt index 4b9f9fc28..73b206a76 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/recycler/RecyclerTest.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.R import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class RecyclerTest : TestCase() { @Test fun test() = before { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ChangeLocaleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ChangeLocaleScreen.kt index 460da2144..475f89e6e 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ChangeLocaleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ChangeLocaleScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.systemlanguage.ChangeLocaleActivity import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ChangeLocaleScreen : KScreen() { override val layoutId: Int = R.layout.activity_change_locale override val viewClass: Class<*> = ChangeLocaleActivity::class.java diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/CommonFlakyScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/CommonFlakyScreen.kt index 510f46aaa..ad283fd3c 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/CommonFlakyScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/CommonFlakyScreen.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.scroll.KScrollView import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object CommonFlakyScreen : KScreen() { override val layoutId: Int = R.layout.activity_common_flaky diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ComplexComposeScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ComplexComposeScreen.kt index 01bafc8e1..92251d11f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ComplexComposeScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ComplexComposeScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.compose.ComplexComposeSampleActivity import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ComplexComposeScreen : KScreen() { override val layoutId: Int = R.layout.activity_complex_compose diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyDialogScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyDialogScreen.kt index 65817f6b7..36d17a1c4 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyDialogScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyDialogScreen.kt @@ -4,6 +4,25 @@ import io.github.kakaocup.kakao.text.KTextView import com.kaspersky.kaspressample.R import com.kaspersky.kaspresso.screens.KScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ContinuouslyDialogScreen : KScreen() { override val layoutId: Int? = null override val viewClass: Class<*>? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyScreen.kt index 991753831..13fbb8afc 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ContinuouslyScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.continuously.ContinuouslySampleActivity import com.kaspersky.kaspresso.screens.KScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ContinuouslyScreen : KScreen() { override val layoutId = R.layout.activity_continuously override val viewClass = ContinuouslySampleActivity::class.java diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceFullWindowScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceFullWindowScreen.kt index d35c8765e..f8890e766 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceFullWindowScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceFullWindowScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.devicefull.DeviceFullWindowSampleActivity import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object DeviceFullWindowScreen : KScreen() { override val layoutId: Int = R.layout.activity_device_full_window_sample diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceSampleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceSampleScreen.kt index 006eb2fdc..cb870ba9a 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceSampleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/DeviceSampleScreen.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.edit.KEditText import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object DeviceSampleScreen : KScreen() { override val layoutId: Int = R.layout.activity_device_sample diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/MainScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/MainScreen.kt index e23144adb..cab1f95a2 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/MainScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/MainScreen.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KButton import io.github.kakaocup.kakao.text.KTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object MainScreen : KScreen() { override val layoutId: Int = R.layout.activity_main diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ScrollViewWithPaddingScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ScrollViewWithPaddingScreen.kt index 6819e3965..961455ccb 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ScrollViewWithPaddingScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/ScrollViewWithPaddingScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.autoscrollfallback.AutoscrollScrollViewWithPa import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ScrollViewWithPaddingScreen : KScreen() { override val layoutId: Int = R.layout.activity_scrollview_with_padding diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SharedTestScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SharedTestScreen.kt index de299e1e8..06a1b3c42 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SharedTestScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SharedTestScreen.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.edit.KEditText import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object SharedTestScreen : KScreen() { override val layoutId: Int = R.layout.activity_sharedtest diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SimpleScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SimpleScreen.kt index c1a7dfd69..d36ece5fa 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SimpleScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SimpleScreen.kt @@ -6,6 +6,25 @@ import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.edit.KEditText import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object SimpleScreen : KScreen() { override val layoutId: Int = R.layout.activity_simple diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SystemDialogsScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SystemDialogsScreen.kt index d50fd0f0f..6149fb6a2 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SystemDialogsScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/SystemDialogsScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspressample.R import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.text.KButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object SystemDialogsScreen : KScreen() { override val layoutId: Int = R.layout.activity_system_dialogs diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WebViewScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WebViewScreen.kt index c822caf72..4df7390f4 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WebViewScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WebViewScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.kaspressample.web.WebViewActivity import com.kaspersky.kaspresso.screens.KScreen import io.github.kakaocup.kakao.web.KWebView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object WebViewScreen : KScreen() { override val layoutId: Int = R.layout.activity_webview diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WithToolbarScreen.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WithToolbarScreen.kt index 37f1e4349..867511a0e 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WithToolbarScreen.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/screen/WithToolbarScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspresso.screens.KScreen import com.kaspersky.kaspressample.R import io.github.kakaocup.kakao.toolbar.KToolbar +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object WithToolbarScreen : KScreen() { override val layoutId: Int? = null override val viewClass: Class<*>? = null diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedInstrumentationTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedInstrumentationTest.kt index ffac998ee..e11eafa19 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedInstrumentationTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedInstrumentationTest.kt @@ -9,6 +9,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + const val ASSERT_PACKAGE_NAME = "com.kaspersky.kaspressample" const val CACHE_DIR_NAME = "cache" diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedSimpleFlakyTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedSimpleFlakyTest.kt index 8fb36f60a..906d3bf6f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedSimpleFlakyTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/sharedtest/SharedSimpleFlakyTest.kt @@ -8,6 +8,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class SharedSimpleFlakyTest : TestCase() { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CheckEditScenario.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CheckEditScenario.kt index 7802048b2..7414e4fb5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CheckEditScenario.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CheckEditScenario.kt @@ -4,6 +4,25 @@ import com.kaspersky.kaspressample.screen.SimpleScreen import com.kaspersky.kaspresso.testcases.api.scenario.BaseScenario import com.kaspersky.kaspresso.testcases.core.testcontext.TestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CheckEditScenario : BaseScenario() { override val steps: TestContext.() -> Unit = { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CustomizedSimpleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CustomizedSimpleTest.kt index d657a25af..679045c6c 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CustomizedSimpleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/CustomizedSimpleTest.kt @@ -30,6 +30,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CustomizedSimpleTest : TestCase( kaspressoBuilder = Kaspresso.Builder.advanced( customize = { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTest.kt index e326abb6f..6674e6d62 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * In this example you can observe a test tuned by default Kaspresso configuration. * When you start the test you can see output of default Kaspresso interceptors: diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTestWithRule.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTestWithRule.kt index 45d4b4ce6..9f871384d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTestWithRule.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/simple_tests/SimpleTestWithRule.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcaserule.TestCaseRule import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * In this example you can observe a test tuned by default Kaspresso configuration. * When you start the test you can see output of default Kaspresso interceptors: diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeSystemLanguageMidTestCase.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeSystemLanguageMidTestCase.kt index 79e016009..227372259 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeSystemLanguageMidTestCase.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeSystemLanguageMidTestCase.kt @@ -11,6 +11,25 @@ import org.junit.Rule import org.junit.Test import java.util.Locale +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ChangeSystemLanguageMidTestCase : TestCase() { @get:Rule val runtimePermissionRule: GrantPermissionRule = GrantPermissionRule.grant( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/utils/SafeAssert.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/utils/SafeAssert.kt index ff610dd94..dc71d7b3b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/utils/SafeAssert.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/utils/SafeAssert.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspressample.utils import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext import org.junit.Assert +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object SafeAssert { fun BaseTestContext.assertTrueSafely( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/visual/VisualTestSample.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/visual/VisualTestSample.kt index 2b1c78dce..8dc00306f 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/visual/VisualTestSample.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/visual/VisualTestSample.kt @@ -11,6 +11,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class VisualTestSample : VisualTestCase() { @get:Rule val runtimePermissionRule: GrantPermissionRule = GrantPermissionRule.grant( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/web_tests/WebViewTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/web_tests/WebViewTest.kt index a7d5e89eb..2bf110c8c 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/web_tests/WebViewTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspressample/web_tests/WebViewTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WebViewTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/device/DeviceScreenshotSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/device/DeviceScreenshotSanityTest.kt index c8ace861e..b80e32fc5 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/device/DeviceScreenshotSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/device/DeviceScreenshotSanityTest.kt @@ -8,6 +8,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceScreenshotSanityTest : TestCase() { companion object { diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/docloc/DocLocSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/docloc/DocLocSanityTest.kt index 802347c5e..50f107d74 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/docloc/DocLocSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/docloc/DocLocSanityTest.kt @@ -18,6 +18,25 @@ import org.junit.Rule import org.junit.Test import java.io.File +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private lateinit var testDirsProvider: DirsProvider private lateinit var testRootDirsProvider: ResourcesRootDirsProvider diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewDisabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewDisabledSanityTest.kt index 6090221d7..0e2abf67d 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewDisabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewDisabledSanityTest.kt @@ -11,6 +11,25 @@ import org.junit.Assert import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollViewDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { viewBehaviorInterceptors = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewEnabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewEnabledSanityTest.kt index 85f131644..50dac5482 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewEnabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/autoscroll/AutoScrollViewEnabledSanityTest.kt @@ -12,6 +12,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollViewEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { viewBehaviorInterceptors = mutableListOf( diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewDisabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewDisabledSanityTest.kt index 3566d7087..6aa5867d7 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewDisabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewDisabledSanityTest.kt @@ -13,6 +13,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogSafetyViewDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { viewBehaviorInterceptors = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewEnabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewEnabledSanityTest.kt index a73f4b622..9b6ef5c32 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewEnabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/dialogs_safety/SystemDialogSafetyViewEnabledSanityTest.kt @@ -10,6 +10,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogSafetyViewEnabledSanityTest : TestCase() { @get:Rule diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewDisabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewDisabledSanityTest.kt index 948e6ce43..0a50ffa50 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewDisabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewDisabledSanityTest.kt @@ -12,6 +12,25 @@ import org.junit.Assert import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyViewDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { viewBehaviorInterceptors = mutableListOf() diff --git a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewEnabledSanityTest.kt b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewEnabledSanityTest.kt index eaebbe2f7..a543cb38b 100644 --- a/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewEnabledSanityTest.kt +++ b/samples/kaspresso-sample/src/androidTest/kotlin/com/kaspersky/kaspresso/sanity/interceptors/flaky/FlakyViewEnabledSanityTest.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyViewEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { viewBehaviorInterceptors = mutableListOf( diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/MainActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/MainActivity.kt index 8ae5f021d..7a3062f67 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/MainActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/MainActivity.kt @@ -19,6 +19,25 @@ import com.kaspersky.kaspressample.upgrade.UpgradeTestActivity import com.kaspersky.kaspressample.web.WebViewActivity import com.kaspersky.kaspressample.withtoolbar.WithToolbarActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/autoscrollfallback/AutoscrollScrollViewWithPaddingActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/autoscrollfallback/AutoscrollScrollViewWithPaddingActivity.kt index 2f390160f..53687ad17 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/autoscrollfallback/AutoscrollScrollViewWithPaddingActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/autoscrollfallback/AutoscrollScrollViewWithPaddingActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoscrollScrollViewWithPaddingActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/compose/ComplexComposeSampleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/compose/ComplexComposeSampleActivity.kt index 6ca9660dd..53e43987a 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/compose/ComplexComposeSampleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/compose/ComplexComposeSampleActivity.kt @@ -8,6 +8,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.databinding.ActivityComplexComposeBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComplexComposeSampleActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/continuously/ContinuouslySampleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/continuously/ContinuouslySampleActivity.kt index 794d55c8d..cae7f7f25 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/continuously/ContinuouslySampleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/continuously/ContinuouslySampleActivity.kt @@ -10,6 +10,25 @@ import com.kaspersky.kaspressample.databinding.ActivityContinuouslyBinding import java.util.concurrent.TimeUnit import kotlin.random.Random +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ContinuouslySampleActivity : AppCompatActivity() { private companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleAccessibilityService.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleAccessibilityService.kt index 2fd8c1d47..4f9459a7c 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleAccessibilityService.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleAccessibilityService.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspressample.device import android.accessibilityservice.AccessibilityService import android.view.accessibility.AccessibilityEvent +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceSampleAccessibilityService : AccessibilityService() { override fun onInterrupt() { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleActivity.kt index 763f5f568..c234459ac 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/device/DeviceSampleActivity.kt @@ -6,6 +6,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.databinding.ActivityDeviceSampleBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceSampleActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/devicefull/DeviceFullWindowSampleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/devicefull/DeviceFullWindowSampleActivity.kt index 149dd9477..fcdcfc4c9 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/devicefull/DeviceFullWindowSampleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/devicefull/DeviceFullWindowSampleActivity.kt @@ -5,6 +5,25 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.databinding.ActivityDeviceFullWindowSampleBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class DeviceFullWindowSampleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleFragment.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleFragment.kt index d5521323a..a09bd5b49 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleFragment.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleFragment.kt @@ -9,6 +9,25 @@ import androidx.fragment.app.Fragment import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.databinding.FragmentScreenshotBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotSampleFragment : Fragment(), ScreenshotSampleView { private val presenter = ScreenshotSamplePresenter(this) diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSamplePresenter.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSamplePresenter.kt index 9f7eb8494..7db4cc406 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSamplePresenter.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSamplePresenter.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspressample.docloc import android.graphics.Color +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScreenshotSamplePresenter(private val view: ScreenshotSampleView) { var value = 0 diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleView.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleView.kt index 8aa79a017..b23aa35b6 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleView.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/docloc/ScreenshotSampleView.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspressample.docloc +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ScreenshotSampleView { fun setBackgroundColor(color: Int) fun setCounterValue(value: Int) diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/flaky/CommonFlakyActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/flaky/CommonFlakyActivity.kt index 898bde0bf..c23b853ed 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/flaky/CommonFlakyActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/flaky/CommonFlakyActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.databinding.ActivityCommonFlakyBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CommonFlakyActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/idlingwait/WaitForIdleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/idlingwait/WaitForIdleActivity.kt index ec0b174c8..e3a48746a 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/idlingwait/WaitForIdleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/idlingwait/WaitForIdleActivity.kt @@ -9,6 +9,25 @@ import com.kaspersky.kaspressample.databinding.ActivityIdlewaitingBinding import java.util.concurrent.Executors import java.util.concurrent.TimeUnit +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WaitForIdleActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/measure/MeasureActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/measure/MeasureActivity.kt index dccd18bd3..2931daeb0 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/measure/MeasureActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/measure/MeasureActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.databinding.ActivityMeasureBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MeasureActivity : AppCompatActivity() { private var button2ClicksCount = 0 diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerAdapter.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerAdapter.kt index 7219f9fbe..14adb6ec5 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerAdapter.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerAdapter.kt @@ -7,6 +7,25 @@ import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class RecyclerAdapter : RecyclerView.Adapter() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerViewHolder { val view = LayoutInflater.from(parent.context).inflate(R.layout.item_recycler, parent, false) diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerFragment.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerFragment.kt index 4832c3541..81b30b18b 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerFragment.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/recycler/RecyclerFragment.kt @@ -7,6 +7,25 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class RecyclerFragment : Fragment(R.layout.fragment_recycler) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/sharedtest/SharedTestActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/sharedtest/SharedTestActivity.kt index 06ee65623..d4b3c8460 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/sharedtest/SharedTestActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/sharedtest/SharedTestActivity.kt @@ -7,6 +7,25 @@ import androidx.lifecycle.lifecycleScope import com.kaspersky.kaspressample.databinding.ActivitySharedtestBinding import kotlinx.coroutines.delay +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val TIMEOUT = 2000L class SharedTestActivity : AppCompatActivity() { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/simple/SimpleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/simple/SimpleActivity.kt index b5de069d7..413e8a376 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/simple/SimpleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/simple/SimpleActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.databinding.ActivitySimpleBinding import java.util.concurrent.Executors +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SimpleActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemdialogs/SystemDialogsActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemdialogs/SystemDialogsActivity.kt index 4b27404f4..0b85d0d57 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemdialogs/SystemDialogsActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemdialogs/SystemDialogsActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import com.kaspersky.kaspressample.databinding.ActivitySystemDialogsBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogsActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeLocaleActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeLocaleActivity.kt index 9bef50429..71dd760fa 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeLocaleActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/systemlanguage/ChangeLocaleActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ChangeLocaleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/upgrade/UpgradeTestActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/upgrade/UpgradeTestActivity.kt index 9172b85f9..018f34049 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/upgrade/UpgradeTestActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/upgrade/UpgradeTestActivity.kt @@ -8,6 +8,25 @@ import androidx.core.content.edit import com.kaspersky.kaspressample.R import com.kaspersky.kaspressample.databinding.ActivityUpgradeTestBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UpgradeTestActivity : AppCompatActivity() { companion object { diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/web/WebViewActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/web/WebViewActivity.kt index 976463108..6a17653d4 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/web/WebViewActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/web/WebViewActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspressample.databinding.ActivityWebviewBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WebViewActivity : AppCompatActivity() { private lateinit var binding: ActivityWebviewBinding diff --git a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/withtoolbar/WithToolbarActivity.kt b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/withtoolbar/WithToolbarActivity.kt index b3eb197ec..e619755aa 100644 --- a/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/withtoolbar/WithToolbarActivity.kt +++ b/samples/kaspresso-sample/src/main/kotlin/com/kaspersky/kaspressample/withtoolbar/WithToolbarActivity.kt @@ -6,6 +6,25 @@ import com.google.android.material.appbar.CollapsingToolbarLayout import com.google.android.material.appbar.MaterialToolbar import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WithToolbarActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiMainScreen.kt b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiMainScreen.kt index 2b5416e03..4369d78f5 100644 --- a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiMainScreen.kt +++ b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiMainScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.kaspressample.MainActivity import com.kaspersky.kaspressample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UiMainScreen : UiSampleScreen() { override val layoutId: Int? = R.layout.activity_main diff --git a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiSampleScreen.kt b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiSampleScreen.kt index daed1ab3e..e4620968a 100644 --- a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiSampleScreen.kt +++ b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/screen/UiSampleScreen.kt @@ -4,6 +4,25 @@ import android.content.Context import androidx.test.platform.app.InstrumentationRegistry import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + abstract class UiSampleScreen> : UiScreen() { override val packageName: String = "com.kaspersky.kaspressample" diff --git a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingDeviceRobolectricTest.kt b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingDeviceRobolectricTest.kt index 6f1a007f9..09349990f 100644 --- a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingDeviceRobolectricTest.kt +++ b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingDeviceRobolectricTest.kt @@ -12,6 +12,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class FailingDeviceRobolectricTest : TestCase() { diff --git a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingKautomatorRobolectricTest.kt b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingKautomatorRobolectricTest.kt index 9de11ba7d..6de87aa8a 100644 --- a/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingKautomatorRobolectricTest.kt +++ b/samples/kaspresso-sample/src/test/kotlin/com/kaspersky/kaspressample/tests/FailingKautomatorRobolectricTest.kt @@ -13,6 +13,25 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @RunWith(AndroidJUnit4::class) class FailingKautomatorRobolectricTest : TestCase() { diff --git a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/common/UpdateManager.kt b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/common/UpdateManager.kt index ff826c64e..919982306 100644 --- a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/common/UpdateManager.kt +++ b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/common/UpdateManager.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.upgradesample.common import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UpdateManager { private const val MAIN_APP_PACKAGE_ID = "com.kaspersky.kaspressample" diff --git a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/MainScreen.kt b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/MainScreen.kt index 16581cbeb..f734525c5 100644 --- a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/MainScreen.kt +++ b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/MainScreen.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.upgradesample.screen import com.kaspersky.components.kautomator.component.text.UiButton +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object MainScreen : UpgradeUiScreen() { val upgradeButton = UiButton { withId(this@MainScreen.packageName, "activity_main_button_upgrade_scenario") } diff --git a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeScreen.kt b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeScreen.kt index 891e91cd9..5b23c278e 100644 --- a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeScreen.kt +++ b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.edit.UiEditText import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.component.text.UiTextView +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object UpgradeScreen : UpgradeUiScreen() { val version = UiTextView { withId(this@UpgradeScreen.packageName, "upgrade_version") } diff --git a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeUiScreen.kt b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeUiScreen.kt index 0c571afaa..9c12d06e9 100644 --- a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeUiScreen.kt +++ b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/screen/UpgradeUiScreen.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.upgradesample.screen import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + @Suppress("UNCHECKED_CAST") abstract class UpgradeUiScreen> : UiScreen() { diff --git a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/test/UpgradeTestSample.kt b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/test/UpgradeTestSample.kt index 4fd229fe1..52bbfd779 100644 --- a/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/test/UpgradeTestSample.kt +++ b/samples/kautomator-sample-app-upgrade/src/androidTest/java/com/kaspersky/kaspresso/upgradesample/test/UpgradeTestSample.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.upgradesample.screen.UpgradeScreen import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class UpgradeTestSample : TestCase() { companion object { diff --git a/samples/kautomator-sample-app-upgrade/src/main/java/com/kaspersky/kaspresso/upgradesample/MainActivity.kt b/samples/kautomator-sample-app-upgrade/src/main/java/com/kaspersky/kaspresso/upgradesample/MainActivity.kt index 38960813b..8ea13697a 100644 --- a/samples/kautomator-sample-app-upgrade/src/main/java/com/kaspersky/kaspresso/upgradesample/MainActivity.kt +++ b/samples/kautomator-sample-app-upgrade/src/main/java/com/kaspersky/kaspresso/upgradesample/MainActivity.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.upgradesample import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/HintMatchersTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/HintMatchersTest.kt index df237c93f..94e576407 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/HintMatchersTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/HintMatchersTest.kt @@ -9,6 +9,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class HintMatchersTest : TestCase() { @get:Rule diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/InterceptorSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/InterceptorSanityTest.kt index 44f46195f..d8856a8cd 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/InterceptorSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/InterceptorSanityTest.kt @@ -18,6 +18,25 @@ import org.junit.Ignore import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private lateinit var testElementLoaderParams: ElementLoaderParams private lateinit var testFlakySafetyParams: FlakySafetyParams private lateinit var logger: UiTestLogger diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectDisabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectDisabledSanityTest.kt index 132fda6e9..6036c61f6 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectDisabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectDisabledSanityTest.kt @@ -10,6 +10,25 @@ import org.junit.Assert import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollObjectDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { objectBehaviorInterceptors = mutableListOf() diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectEnabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectEnabledSanityTest.kt index 439a25a9f..a3f4a4fbd 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectEnabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/autoscroll/AutoScrollObjectEnabledSanityTest.kt @@ -11,6 +11,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollObjectEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { objectBehaviorInterceptors = mutableListOf(AutoScrollObjectBehaviorInterceptor(UiTestLoggerImpl(Kaspresso.DEFAULT_TEST_LOGGER_TAG), AutoScrollParams.default())) diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectDisabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectDisabledSanityTest.kt index 56f918966..5f827b371 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectDisabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectDisabledSanityTest.kt @@ -13,6 +13,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogSafetyObjectDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { objectBehaviorInterceptors = mutableListOf() diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectEnabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectEnabledSanityTest.kt index 3e2f393ef..545f92320 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectEnabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/dialogs_safety/SystemDialogSafetyObjectEnabledSanityTest.kt @@ -9,6 +9,25 @@ import org.junit.Assume import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogSafetyObjectEnabledSanityTest : TestCase() { @get:Rule diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectDisabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectDisabledSanityTest.kt index 89e1b3bca..2f32de4b8 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectDisabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectDisabledSanityTest.kt @@ -12,6 +12,25 @@ import org.junit.Rule import org.junit.Test import java.lang.Error +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyObjectDisabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { objectBehaviorInterceptors = mutableListOf() diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectEnabledSanityTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectEnabledSanityTest.kt index 868ad2fd5..ccd4042a8 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectEnabledSanityTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/flaky/FlakyObjectEnabledSanityTest.kt @@ -13,6 +13,25 @@ import io.github.kakaocup.kakao.common.utilities.getResourceString import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyObjectEnabledSanityTest : TestCase( kaspressoBuilder = Kaspresso.Builder.simple { objectBehaviorInterceptors = mutableListOf( diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AmbiguousScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AmbiguousScreen.kt index 674cd0ddc..7efccd3f7 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AmbiguousScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AmbiguousScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen import java.util.regex.Pattern +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + private const val PATTERN = ".*Ambiguous button.*" object AmbiguousScreen : UiScreen() { diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AutoScrollScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AutoScrollScreen.kt index 121f6bf3c..2c902ab80 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AutoScrollScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/AutoScrollScreen.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.kautomatorsample.screen import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object AutoScrollScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ComponentsScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ComponentsScreen.kt index d8ca835d3..99a0382f9 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ComponentsScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ComponentsScreen.kt @@ -9,6 +9,25 @@ import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen import com.kaspersky.kaspresso.kautomatorsample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ComponentsScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/FlakyScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/FlakyScreen.kt index 4c846830a..92a1e049f 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/FlakyScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/FlakyScreen.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.kautomatorsample.screen import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object FlakyScreen : UiScreen() { private const val TOP_TEXT = "Beginning" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainNativeScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainNativeScreen.kt index efd9a033a..bcb92575b 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainNativeScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainNativeScreen.kt @@ -8,6 +8,25 @@ import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.components.kautomator.screen.UiScreen import com.kaspersky.kaspresso.kautomatorsample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object MainNativeScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainScreen.kt index cd1b58f29..13b03e7cf 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/MainScreen.kt @@ -5,6 +5,25 @@ import com.kaspersky.components.kautomator.component.edit.UiEditText import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object MainScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ParentSearchScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ParentSearchScreen.kt index ed155cfee..f9ac7730c 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ParentSearchScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ParentSearchScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.components.kautomator.screen.UiScreen import com.kaspersky.kaspresso.kautomatorsample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ParentSearchScreen : UiScreen() { override val packageName = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/RecyclerScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/RecyclerScreen.kt index 10fd1cb13..a5116900a 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/RecyclerScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/RecyclerScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.scroll.UiScrollView import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object RecyclerScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ScrollScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ScrollScreen.kt index d7d5a3cd3..f3371fc54 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ScrollScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ScrollScreen.kt @@ -4,6 +4,25 @@ import com.kaspersky.components.kautomator.component.scroll.UiScrollView import com.kaspersky.components.kautomator.component.text.UiTextView import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ScrollScreen : UiScreen() { private const val TOP_TEXT = "Beginning" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/SystemDialogsScreen.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/SystemDialogsScreen.kt index 4c28fc49a..cf68750ae 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/SystemDialogsScreen.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/SystemDialogsScreen.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.kautomatorsample.screen import com.kaspersky.components.kautomator.component.text.UiButton import com.kaspersky.components.kautomator.screen.UiScreen +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object SystemDialogsScreen : UiScreen() { override val packageName: String = "com.kaspersky.kaspresso.kautomatorsample" diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/AmbiguousScreenTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/AmbiguousScreenTest.kt index a8fa553c6..529ed1ec9 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/AmbiguousScreenTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/AmbiguousScreenTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AmbiguousScreenTest : TestCase() { @get:Rule diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/NativeSimpleTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/NativeSimpleTest.kt index 53c2a7e9b..3ec39a305 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/NativeSimpleTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/NativeSimpleTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The sample of how to use native resources in combination with kAutomator */ diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/ParentSearchTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/ParentSearchTest.kt index cc321cb09..8dab1e70a 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/ParentSearchTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/ParentSearchTest.kt @@ -8,6 +8,25 @@ import org.junit.Rule import org.junit.Test import com.kaspersky.kaspresso.kautomatorsample.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ParentSearchTest : TestCase() { @get:Rule val activityRule = activityScenarioRule() diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/UiSimpleTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/UiSimpleTest.kt index dd33be87c..1061934fb 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/UiSimpleTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/UiSimpleTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * The simple sample of how Kautomator looks and * its beautiful possibility to intercept all actions and assertions as Kakao does diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/AlertDialogTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/AlertDialogTest.kt index 2ec29f799..dc54f54fe 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/AlertDialogTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/AlertDialogTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AlertDialogTest : TestCase() { @get:Rule diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/BottomNavigationViewTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/BottomNavigationViewTest.kt index 4efb2f4b7..92efb3d4e 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/BottomNavigationViewTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/BottomNavigationViewTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class BottomNavigationViewTest : TestCase() { companion object { diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/CheckboxTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/CheckboxTest.kt index 9ab2c7dd8..8624a1c70 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/CheckboxTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/CheckboxTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class CheckboxTest : TestCase() { @get:Rule diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ChipGroupTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ChipGroupTest.kt index ace4657fa..af2625c29 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ChipGroupTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ChipGroupTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ChipGroupTest : TestCase() { companion object { diff --git a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ScrollViewTest.kt b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ScrollViewTest.kt index e7b6cbb90..58e1fad79 100644 --- a/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ScrollViewTest.kt +++ b/samples/kautomator-sample/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/components/ScrollViewTest.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.testcases.api.testcase.TestCase import org.junit.Rule import org.junit.Test +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + /** * This sample shows how to work with UiScrollView */ diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/AmbiguousActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/AmbiguousActivity.kt index 429aeffe1..5d5f09d02 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/AmbiguousActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/AmbiguousActivity.kt @@ -6,6 +6,25 @@ import android.widget.Button import androidx.appcompat.app.AppCompatActivity import kotlin.random.Random +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AmbiguousActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ComponentsActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ComponentsActivity.kt index b3a5cd6f9..08568fdc4 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ComponentsActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ComponentsActivity.kt @@ -5,6 +5,25 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivityUiComponentsBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ComponentsActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/MainActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/MainActivity.kt index b9d1c98c8..6fdc49f9a 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/MainActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/MainActivity.kt @@ -5,6 +5,25 @@ import android.os.Bundle import android.widget.TextView import androidx.appcompat.app.AppCompatActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { @SuppressLint("SetTextI18n") diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ParentSearchActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ParentSearchActivity.kt index 8c682b026..3a02e64a7 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ParentSearchActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ParentSearchActivity.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.kautomatorsample import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ParentSearchActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/autoscroll/AutoScrollActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/autoscroll/AutoScrollActivity.kt index 42e0520f1..fdc206f84 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/autoscroll/AutoScrollActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/autoscroll/AutoScrollActivity.kt @@ -5,6 +5,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.kautomatorsample.R import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivityAutoScrollBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AutoScrollActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/flaky/FlakyActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/flaky/FlakyActivity.kt index b8f2948d2..5c10c8560 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/flaky/FlakyActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/flaky/FlakyActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.kautomatorsample.R import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivityFlakyBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyActivity : AppCompatActivity() { private lateinit var binding: ActivityFlakyBinding diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/model/SimpleModel.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/model/SimpleModel.kt index 14f5478d7..3303867e4 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/model/SimpleModel.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/model/SimpleModel.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.kautomatorsample.model import kotlin.random.Random +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class SimpleModel( val text: String, val number: Int diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerActivity.kt index 45268381f..20826c0c6 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerActivity.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.kautomatorsample.R import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivityRecyclerBinding import com.kaspersky.kaspresso.kautomatorsample.model.SimpleModel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class RecyclerActivity : AppCompatActivity() { companion object { diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerAdapter.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerAdapter.kt index 521317e56..d545d371d 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerAdapter.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/recycler/RecyclerAdapter.kt @@ -8,6 +8,25 @@ import androidx.recyclerview.widget.RecyclerView import com.kaspersky.kaspresso.kautomatorsample.R import com.kaspersky.kaspresso.kautomatorsample.model.SimpleModel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class RecyclerAdapter( private val collection: List ) : RecyclerView.Adapter() { diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/scroll/ScrollActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/scroll/ScrollActivity.kt index 29e188c07..ec802b6d8 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/scroll/ScrollActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/scroll/ScrollActivity.kt @@ -7,6 +7,25 @@ import com.kaspersky.kaspresso.kautomatorsample.R import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivityScrollBinding import com.kaspersky.kaspresso.kautomatorsample.model.SimpleModel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class ScrollActivity : AppCompatActivity() { companion object { diff --git a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/systemdialogs/SystemDialogsActivity.kt b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/systemdialogs/SystemDialogsActivity.kt index e5ab4cc7d..7af149ef5 100644 --- a/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/systemdialogs/SystemDialogsActivity.kt +++ b/samples/kautomator-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/systemdialogs/SystemDialogsActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.app.ActivityCompat import com.kaspersky.kaspresso.kautomatorsample.databinding.ActivitySystemDialogsBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SystemDialogsActivity : AppCompatActivity() { companion object { diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/MainActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/MainActivity.kt index 6c01a5252..ab4ff8b99 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/MainActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/MainActivity.kt @@ -13,6 +13,25 @@ import com.kaspersky.kaspresso.tutorial.simple.SimpleActivity import com.kaspersky.kaspresso.tutorial.user.LoadUserActivity import com.kaspersky.kaspresso.tutorial.wifi.WiFiActivity +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MainActivity : AppCompatActivity() { private lateinit var binding: ActivityMainBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/afterlogin/AfterLoginActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/afterlogin/AfterLoginActivity.kt index d2966645f..f059c34ea 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/afterlogin/AfterLoginActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/afterlogin/AfterLoginActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.databinding.ActivityAfterLoginBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class AfterLoginActivity : AppCompatActivity() { private lateinit var binding: ActivityAfterLoginBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/flaky/FlakyActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/flaky/FlakyActivity.kt index 72cf426b1..94a2e3cbc 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/flaky/FlakyActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/flaky/FlakyActivity.kt @@ -8,6 +8,25 @@ import com.kaspersky.kaspresso.tutorial.R import com.kaspersky.kaspresso.tutorial.databinding.ActivityFlakyBinding import kotlinx.coroutines.delay +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class FlakyActivity : AppCompatActivity() { private lateinit var binding: ActivityFlakyBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/Note.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/Note.kt index f6be2c4ba..0d45aa91d 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/Note.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/Note.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.tutorial.lists +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class Note( val id: Int, val text: String, diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteDiffCallback.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteDiffCallback.kt index 484bd69d4..949f7b9ca 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteDiffCallback.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteDiffCallback.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.tutorial.lists import androidx.recyclerview.widget.DiffUtil +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object NoteDiffCallback : DiffUtil.ItemCallback() { override fun areItemsTheSame(oldItem: Note, newItem: Note): Boolean { diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteListActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteListActivity.kt index 1af9b202a..d800f5b41 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteListActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NoteListActivity.kt @@ -7,6 +7,25 @@ import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.RecyclerView import com.kaspersky.kaspresso.tutorial.databinding.ActivityNoteListBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NoteListActivity : AppCompatActivity() { private lateinit var binding: ActivityNoteListBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesAdapter.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesAdapter.kt index fc3f14c47..a21f55016 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesAdapter.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesAdapter.kt @@ -6,6 +6,25 @@ import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView import com.kaspersky.kaspresso.tutorial.databinding.NoteItemBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NotesAdapter : ListAdapter(NoteDiffCallback) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NoteViewHolder { diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesViewModel.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesViewModel.kt index f7546b5d0..9c5cb7498 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesViewModel.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/lists/NotesViewModel.kt @@ -4,6 +4,25 @@ import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NotesViewModel : ViewModel() { private val initialList = mutableListOf().apply { diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/login/LoginActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/login/LoginActivity.kt index 4246dd4da..365e6bc02 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/login/LoginActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/login/LoginActivity.kt @@ -6,6 +6,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.afterlogin.AfterLoginActivity import com.kaspersky.kaspresso.tutorial.databinding.ActivityLoginBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoginActivity : AppCompatActivity() { private lateinit var binding: ActivityLoginBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/notification/NotificationActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/notification/NotificationActivity.kt index 525c93f80..ff56f798b 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/notification/NotificationActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/notification/NotificationActivity.kt @@ -10,6 +10,25 @@ import androidx.core.app.NotificationCompat import com.kaspersky.kaspresso.tutorial.R import com.kaspersky.kaspresso.tutorial.databinding.ActivityNotificationBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class NotificationActivity : AppCompatActivity() { private lateinit var binding: ActivityNotificationBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/permission/MakeCallActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/permission/MakeCallActivity.kt index 7cf3d0b4e..e77d243e1 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/permission/MakeCallActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/permission/MakeCallActivity.kt @@ -8,6 +8,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.databinding.ActivityMakeCallBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class MakeCallActivity : AppCompatActivity() { private lateinit var binding: ActivityMakeCallBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/simple/SimpleActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/simple/SimpleActivity.kt index 50f2381cf..efa6eb80b 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/simple/SimpleActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/simple/SimpleActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.databinding.ActivitySimpleBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class SimpleActivity : AppCompatActivity() { private lateinit var binding: ActivitySimpleBinding diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiFactory.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiFactory.kt index 74f620eed..c90f25239 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiFactory.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiFactory.kt @@ -3,6 +3,25 @@ package com.kaspersky.kaspresso.tutorial.user import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object ApiFactory { private val retrofit = Retrofit.Builder() diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiService.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiService.kt index fd8fb838b..2a3a18699 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiService.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/ApiService.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.tutorial.user import retrofit2.http.GET +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + interface ApiService { @GET("api/users/random_user") diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserActivity.kt index 5460e024a..a1aa5ff46 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserActivity.kt @@ -4,6 +4,25 @@ import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.R +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoadUserActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserFragment.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserFragment.kt index 3581f7628..c41a1da55 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserFragment.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserFragment.kt @@ -13,6 +13,25 @@ import androidx.lifecycle.repeatOnLifecycle import com.kaspersky.kaspresso.tutorial.databinding.FragmentLoadUserBinding import kotlinx.coroutines.launch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoadUserFragment : Fragment() { private var _binding: FragmentLoadUserBinding? = null diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserRepository.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserRepository.kt index 30d287a9a..92ec28538 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserRepository.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserRepository.kt @@ -1,5 +1,24 @@ package com.kaspersky.kaspresso.tutorial.user +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + object LoadUserRepository { private val apiService = ApiFactory.apiService diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserViewModel.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserViewModel.kt index 5f72cee6e..66fbcc453 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserViewModel.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/LoadUserViewModel.kt @@ -6,6 +6,25 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class LoadUserViewModel : ViewModel() { private val repository = LoadUserRepository diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/User.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/User.kt index 433ce3092..ecc3eeee5 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/User.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/user/User.kt @@ -2,6 +2,25 @@ package com.kaspersky.kaspresso.tutorial.user import com.google.gson.annotations.SerializedName +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + data class User( @SerializedName("first_name") val name: String, @SerializedName("last_name") val lastName: String diff --git a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/wifi/WiFiActivity.kt b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/wifi/WiFiActivity.kt index 4512cce65..e67999b14 100644 --- a/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/wifi/WiFiActivity.kt +++ b/tutorial/src/main/kotlin/com/kaspersky/kaspresso/tutorial/wifi/WiFiActivity.kt @@ -8,6 +8,25 @@ import androidx.appcompat.app.AppCompatActivity import com.kaspersky.kaspresso.tutorial.R import com.kaspersky.kaspresso.tutorial.databinding.ActivityWifiBinding +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache 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.apache.org/licenses/LICENSE-2.0 + * + * 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. + */ + class WiFiActivity : AppCompatActivity() { private lateinit var binding: ActivityWifiBinding