diff --git a/.github/ISSUE_TEMPLATE/a_question.md b/.github/ISSUE_TEMPLATE/a_question.md
deleted file mode 100644
index bed0d9f6cc..0000000000
--- a/.github/ISSUE_TEMPLATE/a_question.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-name: Question 🤔
-about: Usage question or discussion about Eclipse Che.
-title: ''
-labels: 'kind/question'
-assignees: ''
-
----
-
-
-## Summary
-
-## Relevant information
-
-
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 26c69b63f6..0000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-name: Bug report 🐞
-about: Report a bug found in Eclipse Che
-title: ''
-labels: 'kind/bug'
-assignees: ''
-
----
-
-
-### Describe the bug
-
-
-### Che version
-
- - [ ] latest
- - [ ] nightly
- - [ ] other: please specify
-
-### Steps to reproduce
-
-
-
-### Expected behavior
-
-
-### Runtime
- - [ ] kubernetes (include output of `kubectl version`)
- - [ ] Openshift (include output of `oc version`)
- - [ ] minikube (include output of `minikube version` and `kubectl version`)
- - [ ] minishift (include output of `minishift version` and `oc version`)
- - [ ] docker-desktop + K8S (include output of `docker version` and `kubectl version`)
- - [ ] other: (please specify)
-
-### Screenshots
-
-
-### Installation method
- - [ ] chectl
- * provide a full command that was used to deploy Eclipse Che (including the output)
- * provide an output of `chectl version` command
- - [ ] OperatorHub
- - [ ] I don't know
-
-### Environment
- - [ ] my computer
- - [ ] Windows
- - [ ] Linux
- - [ ] macOS
- - [ ] Cloud
- - [ ] Amazon
- - [ ] Azure
- - [ ] GCE
- - [ ] other (please specify)
- - [ ] Dev Sandbox (workspaces.openshift.com)
- - [ ] other: please specify
-
-### Eclipse Che Logs
-
-
-### Additional context
-
diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md
deleted file mode 100644
index 3b025e72b3..0000000000
--- a/.github/ISSUE_TEMPLATE/enhancement.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: Enhancement💡
-about: Suggest a enhancement for Eclipse Che
-title: ''
-labels: 'kind/enhancement'
-assignees: ''
-
----
-### Is your enhancement related to a problem? Please describe.
-
-
-### Describe the solution you'd like
-
-
-### Describe alternatives you've considered
-
-
-### Additional context
-
diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md
deleted file mode 100644
index 990d6bc8a9..0000000000
--- a/.github/ISSUE_TEMPLATE/release.md
+++ /dev/null
@@ -1,54 +0,0 @@
----
-name: Release📦
-about: Create new release issue for Eclipse Che
-title: ''
-labels: 'kind/release'
-assignees: ''
-
----
-
-### List of pending issues / PRs
-* [ ] description #xxx https://github.com/eclipse/che/issues/xxx
-
-### Release status
-
-The following will be released via [che-release](https://github.com/eclipse/che-release/blob/master/cico_release.sh) according to a series of phases:
-
-1. [ ] che-machine-exec, che-theia, che-devfile-registry, che-dashboard, devworkspace-operator, jwtproxy, kubernetes image puller
-2. [ ] che-plugin-registry (once che-theia and machine-exec are done)
-3. [ ] che-parent and che server
-4. [ ] devworkspace-che-operator
-5. [ ] che-operator
-
-Each phase will [send a Mattermost notification to the Eclipse Che releases channel](https://mattermost.eclipse.org/eclipse/channels/eclipse-che-releases).
-
-Then, these steps will be done, once the above projects are released and PRs are merged:
-
-- [ ] [chectl](https://github.com/che-incubator/chectl/actions/workflows/release-stable-PRs.yml) _(depends on che-operator)_
-- [ ] [Che community operator PRs](https://github.com/operator-framework/community-operators/pulls?q=%22Update+eclipse-che+operator%22+is%3Aopen) _(depends on che-operator)_
-- [ ] [che-docs PR](https://github.com/eclipse/che-docs/pulls/che-bot) _(depends on che-operator)_
-
-If this is a .0 release:
-
-- [ ] complete current milestone
- - [ ] move incomplete *deferred* issues to backlog
- - [ ] move incomplete *WIP* issues to next milestone
- - [ ] close completed issues
- - [ ] close milestone
-
-| Process [1] | Script | Action | Container(s) + Artifact(s) |
-| --- | --- | --- | --- |
-| [che-release](https://github.com/eclipse/che-release/blob/master/RELEASE.md) | [cico_release.sh](https://github.com/eclipse/che-release/blob/master/cico_release.sh) | [Action](https://github.com/eclipse/che-release/actions?query=workflow%3A%22Release+-+Orchestrate+Overall+Release+Phases%22) | n/a |
-| [che-theia](https://github.com/eclipse/che-theia/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse/che-theia/blob/master/make-release.sh) | [Action](https://github.com/eclipse/che-theia/actions?query=workflow%3A%22Release+Che+Theia%22) | [`eclipse/che-theia`](https://quay.io/eclipse/che-theia) |
-| [che-machine-exec](https://github.com/eclipse-che/che-machine-exec/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse-che/che-machine-exec/blob/master/make-release.sh) | [Action](https://github.com/eclipse-che/che-machine-exec/actions?query=workflow%3A%22Release+Che+Machine+Exec%22) | [`eclipse/che-machine-exec`](https://quay.io/eclipse/che-machine-exec)|
-| [che-devfile-registry](https://github.com/eclipse/che-devfile-registry/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse/che-devfile-registry/blob/master/make-release.sh) | [Action](https://github.com/eclipse/che-devfile-registry/actions?query=workflow%3A%22Release+Che+Devfile+Registry%22) | [`eclipse/che-devfile-registry`](https://quay.io/eclipse/che-devfile-registry)|
-| [che-plugin-registry](https://github.com/eclipse/che-plugin-registry/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse/che-plugin-registry/blob/master/make-release.sh) | [Action](https://github.com/eclipse/che-plugin-registry/actions?query=workflow%3A%22Release+Che+Plugin+Registry%22) | [`eclipse/che-plugin-registry`](https://quay.io/eclipse/che-plugin-registry)|
-| [che-parent](https://github.com/eclipse/che-parent/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse/che-parent/blob/master/make-release.sh) | [Action](https://github.com/eclipse/che/actions?query=workflow%3A%22Release+Che+Server%22) | [che-server](https://search.maven.org/search?q=a:che-server) [2] |
-| [che-dashboard](https://github.com/eclipse-che/che-dashboard/blob/main/RELEASE.md) | [make-release.sh](https://github.com/eclipse-che/che-dashboard/blob/master/make-release.sh) | [Action](https://github.com/eclipse-che/che-dashboard/actions?query=workflow%3A%22Release+Che+Dashboard%22) | [`che-dashboard`](https://quay.io/repository/eclipse/che-dashboard?tag=next&tab=tags) |
-| [che](https://github.com/eclipse/che/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse/che/blob/master/make-release.sh) | [Action](https://github.com/eclipse/che/actions?query=workflow%3A%22Release+Che+Server%22) | [`eclipse/che-server`](https://quay.io/eclipse/che-server),
[`eclipse/che-endpoint-watcher`](https://quay.io/eclipse/che-endpoint-watcher),
[`eclipse/che-keycloak`](https://quay.io/eclipse/che-keycloak),
[`eclipse/che-postgres`](https://quay.io/eclipse/che-postgres),
[`eclipse/che-server`](https://quay.io/eclipse/che-server),
[`eclipse/che-e2e`](https://quay.io/eclipse/che-e2e) |
-| [devworkspace-operator (controller)](https://github.com/devfile/devworkspace-operator/) | [make-release.sh](https://github.com/devfile/devworkspace-operator/blob/main/make-release.sh) | [Action](https://github.com/devfile/devworkspace-operator/actions/workflows/release.yml) | [`devfile/devworkspace-controller`](https://quay.io/repository/devfile/devworkspace-controller?tab=tags)|
-| [devworkspace-che-operator](https://github.com/che-incubator/devworkspace-che-operator/) | [make-release.sh](https://github.com/che-incubator/devworkspace-che-operator/blob/main/make-release.sh) | [Action](https://github.com/che-incubator/devworkspace-che-operator/actions/workflows/release.yml) | [`che-incubator/devworkspace-che-operator`](https://quay.io/repository/che-incubator/devworkspace-che-operator?tab=tags)|
-| [che-operator](https://github.com/eclipse-che/che-operator/blob/master/RELEASE.md) | [make-release.sh](https://github.com/eclipse-che/che-operator/blob/master/make-release.sh) | [Action](https://github.com/eclipse-che/che-operator/actions?query=workflow%3A%22Release+Che+Operator%22) | [`eclipse/che-operator`](https://quay.io/eclipse/che-operator)|
-| [chectl](https://github.com/che-incubator/chectl/blob/master/RELEASE.md) | [make-release.sh](https://github.com/che-incubator/chectl/blob/master/make-release.sh) | [Action](https://github.com/che-incubator/chectl/actions) | [chectl releases](https://github.com/che-incubator/chectl/releases)
-
-[1] Overall process owner: @mkuznyetsov
diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md
deleted file mode 100644
index 9f6ffb0db6..0000000000
--- a/.github/ISSUE_TEMPLATE/task.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-name: Task 🔧
-about: Internal things, technical debt, and to-do tasks to be performed.
-title: ''
-labels: 'kind/task'
-assignees: ''
-
----
-### Is your task related to a problem? Please describe.
-
-
-### Describe the solution you'd like
-
-
-### Describe alternatives you've considered
-
-
-### Additional context
-
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index e216080137..0000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# Contributor Code of Conduct
-
-As contributors and maintainers of this project, and in the interest of
-fostering an open and welcoming community, we pledge to respect all people who
-contribute through reporting issues, posting feature requests, updating
-documentation, submitting pull requests or patches, and other activities.
-
-We are committed to making participation in this project a harassment-free
-experience for everyone, regardless of level of experience, gender, gender
-identity and expression, sexual orientation, disability, personal appearance,
-body size, race, ethnicity, age, religion, or nationality.
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
-* Public or private harassment
-* Publishing other's private information, such as physical or electronic
- addresses, without explicit permission
-* Other unethical or unprofessional conduct
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-By adopting this Code of Conduct, project maintainers commit themselves to
-fairly and consistently applying these principles to every aspect of managing
-this project. Project maintainers who do not follow or enforce the Code of
-Conduct may be permanently removed from the project team.
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community.
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting a project maintainer at che-dev@eclipse.org. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. Maintainers are
-obligated to maintain confidentiality with regard to the reporter of an
-incident.
-
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage],
-version 1.3.0, available at
-[http://contributor-covenant.org/version/1/3/0/][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/3/0/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 3db2fa9ae8..0000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,242 +0,0 @@
-
-# Contributing to Che
-
-- [Other Che repositories](#other-che-repositories)
-- [Devfile to contribute](#devfile-to-contribute)
-- [Contribute to ...](#contribute-to-...)
- - [Dashboard](#dashboard)
- - [Che Server a.k.a WS master](#che-server-a.k.a-ws-master)
-
-## Other Che repositories
-
-Che is composed of multiple sub projects. For each projects we provide a *CONTRIBUTE.md* file describing how to setup the development environment to start your contribution. Most of the time, we encourage you to use Che to contribute to Che.
-
-
-Repository | Component | Description | Devfile | Documentation
---- | --- | --- | --- | ---
-[che](https://github.com/eclipse/che) | | (this repository) the main project repository | [devfile](https://github.com/eclipse/che/blob/master/devfile.yaml) | [doc](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#che-server-aka-ws-master)
----| [dockerfiles](https://github.com/eclipse/che/tree/master/dockerfiles) | source code, dockerfiles to build our main docker images. Note that Che-theia related dockerfiles are located in che-theia repo. | | |
----| [wsmaster](https://github.com/eclipse/che/tree/master/wsmaster) | orchestrates the Che workspaces with devfiles on Kubernetes | | |
----| [tests](https://github.com/eclipse/che/tree/master/tests) | source code of our integration tests. | | |
-[che-theia](https://github.com/eclipse-che/che-theia) | | Theia IDE integrated in Che. | [devfile](https://github.com/eclipse-che/che-theia/blob/master/devfiles/che-theia-all.devfile.yaml) | [doc](https://github.com/eclipse-che/che-theia/blob/master/CONTRIBUTING.md)
----| [generator](https://github.com/eclipse-che/che-theia/tree/master/generator) | `che:theia init` CLI to prepare and build che-theia | | |
-[chectl](https://github.com/che-incubator/chectl) | | The CLI to install Che, create and start workspaces and devfiles | [devfile](https://github.com/che-incubator/chectl/blob/master/devfile.yaml) | [doc](https://github.com/che-incubator/chectl/blob/master/CONTRIBUTING.md)
-[dashboard](https://github.com/eclipse-che/che-dashboard) | | UI to manage workspaces, devfiles, etc. | [devfile](https://github.com/eclipse-che/che-dashboard/blob/main/devfile.yaml) | [doc](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#dashboard)
-[devfile-registry](https://github.com/eclipse-che/che-devfile-registry) | | The default set of devfiles that would be made available on the Che dashboard stacks. | |
-[docs](https://github.com/eclipse/che-docs) | | Eclipse Che documentation https://www.eclipse.org/che/docs/ source code. | [devfile](https://github.com/eclipse/che-docs/blob/master/devfile.yaml) | [doc](https://github.com/eclipse/che/blob/master/CONTRIBUTING.md#dashboard)
-[machine-exec](https://github.com/eclipse-che/che-machine-exec) | | Interface to execute tasks and terminals on other containers within a workspace. | [devfile](https://github.com/eclipse-che/che-machine-exec/blob/master/devfile.yaml) | [doc](https://github.com/eclipse-che/che-machine-exec/blob/master/CONTRIBUTING.md)
-[operator](https://github.com/eclipse-che/che-operator) | | Che operator to deploy, update and manage K8S/OpenShift resources of Che. | [devfile](https://github.com/eclipse-che/che-operator/blob/master/devfile.yaml) |
-[plugin-broker](https://github.com/eclipse/che-plugin-broker) | | The workspace microservice that is in charge of analyzing, preparing and installing the workspace components defined in a Devfile. | [devfile](https://github.com/eclipse/che-plugin-broker/blob/master/devfile.yaml) | [doc](https://github.com/eclipse/che-plugin-broker/blob/master/CONTRIBUTING.md)
-[plugin-registry](https://github.com/eclipse-che/che-plugin-registry) | | The default set of Che plugins (vscode extension + containers) or editors that could be installed on any Che workspaces. | |
-[website](https://github.com/eclipse/che-website) | | https://eclipse.org/che website source code. | [devfile](https://github.com/eclipse/che-website/blob/master/devfile.yaml) |
-[workspace-client](https://github.com/eclipse-che/che-workspace-client) | | JS library to interact with a che-server. | |
-[che-sidecar-bazel](https://github.com/che-dockerfiles/che-sidecar-bazel) | | Eclipse Che Sidecar container for Bazel tooling | |
-[che-sidecar-protobuf](https://github.com/che-dockerfiles/che-sidecar-protobuf) | | Eclipse Che Sidecar container for Protobuf tooling | |
-[che-sidecar-tekton](https://github.com/che-dockerfiles/che-sidecar-tekton) | | Eclipse Che Sidecar container for Tekton tooling | |
-[che-sidecar-kubernetes-tooling](https://github.com/che-dockerfiles/che-sidecar-kubernetes-tooling) | | Eclipse Che Sidecar container for Kubernetes tooling | |
-[che-sidecar-openshift-connector](https://github.com/che-dockerfiles/che-sidecar-openshift-connector) | | Eclipse Che Sidecar container for OpenShift connector tooling | |
-[che-container-tools](https://github.com/che-dockerfiles/che-container-tools) | | Base image used for sidecars that service container tooling plugins | |
-[che-sidecar-python](https://github.com/che-dockerfiles/che-sidecar-python) | | Eclipse Che Sidecar container for python tooling | |
-[che-custom-nodejs-deasync](https://github.com/che-dockerfiles/che-custom-nodejs-deasync) | | Provides a custom nodejs binary embedding deasync node-gyp module as builtin module | |
-[che-sidecar-go](https://github.com/che-dockerfiles/che-sidecar-go) | | Eclipse Che sidecar container for go | |
-[che-sidecar-sonarlint](https://github.com/che-dockerfiles/che-sidecar-sonarlint) | | Eclipse Che sidecar container for sonalint extension | |
-[che-sidecar-dotnet](https://github.com/che-dockerfiles/che-sidecar-dotnet) | | Eclipse Che sidecar container for dotnet | |
-[che-sidecar-shellcheck](https://github.com/che-dockerfiles/che-sidecar-shellcheck) | | Eclipse Che sidecar container for shellcheck | |
-[che-sidecar-camelk](https://github.com/che-dockerfiles/che-sidecar-camelk) | | Eclipse Che sidecar container for camelk | |
-[che-sidecar-vale](https://github.com/che-dockerfiles/che-sidecar-vale) | | Eclipse Che sidecar container for vale | |
-[che-cert-manager-ca-cert-generator-image](https://github.com/che-dockerfiles/che-cert-manager-ca-cert-generator-image) | | CA cert generation job image used by chectl | |
-[che-buildkit-base](https://github.com/che-dockerfiles/che-buildkit-base) | | Eclipse Che Sidecar container for buildkit tooling | |
-[che-sidecar-scala](https://github.com/che-dockerfiles/che-sidecar-scala) | | Eclipse Che Sidecar container for scala tooling | |
-[che-buildah-base](https://github.com/che-dockerfiles/che-buildah-base) | | Use this image to build docker images using buildah | |
-[che-docker-registry-image-copier](https://github.com/che-dockerfiles/che-docker-registry-image-copier) | | copy images between public and private docker registry inside k8s cluster | |
-[che-php-base](https://github.com/che-dockerfiles/che-php-base) | | Base image to be used for the PHP devfile | |
-[che-tls-secret-creator](https://github.com/che-dockerfiles/che-tls-secret-creator) | | This images generates TLS certificates | |
-[build-action](https://github.com/che-dockerfiles/build-action) | | Custom GitHub Action for building sidecar Dockerfiles | |
-[che-sidecar-podman](https://github.com/che-dockerfiles/che-sidecar-podman) | | Eclipse Che Sidecar container for podman tooling | |
-[che-sidecar-clang](https://github.com/che-dockerfiles/che-sidecar-clang) | | Eclipse Che Sidecar container for clang tooling | |
-[che-sidecar-php](https://github.com/che-dockerfiles/che-sidecar-php) | | Eclipse Che Sidecar container for php tooling | |
-[che-sidecar-java](https://github.com/che-dockerfiles/che-sidecar-java) | | Eclipse Che Sidecar container for java tooling | |
-[che-sidecar-dependency-analytics](https://github.com/che-dockerfiles/che-sidecar-dependency-analytics) | | Eclipse Che Sidecar container for dependency analytics tooling | |
-[che-sidecar-node](https://github.com/che-dockerfiles/che-sidecar-node) | | Eclipse Che Sidecar container for node tooling | |
-[che-theia-openshift-auth](https://github.com/che-incubator/che-theia-openshift-auth) | | OpenShift authentication plugin | |
-[configbump](https://github.com/che-incubator/configbump) | | Simple Kubernetes controller that is able to quickly synchronize a set of config maps | |
-[workspace-data-sync](https://github.com/che-incubator/workspace-data-sync) | | Provides the ability to increase I/O performance for a developer workspaces | |
-[che-workspace-telemetry-client](https://github.com/che-incubator/che-workspace-telemetry-client) | | abstract telemetry API and a Typescript implementation of the API. | |
-[kubernetes-image-puller](https://github.com/che-incubator/kubernetes-image-puller) | | ensures that all nodes in the cluster have those images cached | |
-
-
-## Devfile to contribute
-
-We are trying to provide a devfile for each areas where you could contribute. Each devfile could be run on any Che instances to setup a *ready-to-code* developer environment. Beware that each of them may need a certain amount of memory.
-Devfile could be launched through a factory or [chectl](https://github.com/che-incubator/chectl) cli.
-
-```bash
-$ chectl workspace:start -f devfiles/che-theia-all.devfile.yaml
-```
-
-or
-
-```bash
-$ chectl workspace:start -f https://raw.githubusercontent.com/eclipse/che-theia/master/devfiles/che-theia-all.devfile.yaml
-```
-
-or `https:///f?url=https://raw.githubusercontent.com/eclipse/che-theia/master/devfiles/che-theia-all.devfile.yaml`
-
-## Contribute to ...
-
-Let's cover the developer flow for theses projects:
-
-### Dashboard
-
-Dashboard source code is located in [https://github.com/eclipse-che/che-dashboard](https://github.com/eclipse-che/che-dashboard) repository.
-It is an AngularJS application. Here is the developer workflow if you want to contribute to it:
-
-#### Devfile for dashboard development
-
-The devfile: [https://github.com/eclipse-che/che-dashboard/blob/master/devfile.yaml](https://github.com/eclipse-che/che-dashboard/blob/master/devfile.yaml)
-
-In this section, we show how to setup a Che environment to work on the Che dashboard, and how to use it.
-For the whole workflows, we will need a workspace with such containers:
-
-- Dashboard Dev container (a.k.a dash-dev): Dashdev is a all in one container for running commands such as build, test or start the dashboard server.
-
-All containers have `/projects` folder mounted, which is shared among them.
-
-Developer workflow:
-
-1. Start the workspace with the devfile, it is cloning Che repo.
-2. Build
-3. Code ...
-4. Run unit test
-5. Start dashboard server and preview
-
-#### Step 1: Start the workspace with the devfile, it is cloning Che repo.
-
-In this section we are going to start a new workspace to work on che-theia. The new workspace will have few projects cloned: `theia` and `che-theia`. It will also setup the containers and commands in the `My workspace` view. We will use these commands in the next steps.
-
-The devfile could be started using `chectl`:
-
-```bash
-$ chectl workspace:start -f https://raw.githubusercontent.com/eclipse-che/che-dashboard/master/devfile.yaml
-```
-
-#### Step 2: Build
-
-In this section we are going to build the dashboard project.
-
-You can use the Che command `dashboard_build` (command pallette > Run task > … or containers view)
-Basically, this command will run
-
-```bash
-# [dash-dev]
-$ yarn
-```
-
-#### Step 3: Code ...
-
-#### Step 4: Run unit test (optional)
-
-In this step, we will run the Dashboard unit tests:
-
-You can use the Che command `dashboard_test` (command pallette > Run task > … or containers view)
-Basically, this command will run
-
-```bash
-# [dash-dev]
-$ yarn test
-```
-
-#### Step 5: Start dashboard server and preview
-
-In this step, we will run the dashboard server and see the live reloadable preview.
-
-You can use the Che command `dashboard_dev_server` (command pallette > Run task > … or containers view)
-
-```bash
-# [dashboard_dev_server]
-$ node_modules/.bin/gulp serve --server=
-```
-
-### Che server a.k.a WS master
-There is a [devfile](https://github.com/eclipse/che/blob/master/devfile.yaml) for development of Che server in Che.
-To build Che one may run a predefined build task from the devfile.
-
-Starting Che master requires some manual steps.
-Open a terminal in runtime container (`che-server-runtime`) and perform:
- - First, set `CHE_HOME` environment variable with absolute path to parent folder of Che master's Tomcat.
- It might look like `/projects/che/assembly/assembly-main/target/eclipse-che-*-SNAPSHOT/eclipse-che-*-SNAPSHOT`.
- - Then set `CHE_HOST` with the endpoint of new Che master.
- If using the [devfile](devfile.yaml) the endpoint is `che-dev` and already set.
- - After, set `CHE_INFRASTRUCTURE_ACTIVE` according to your environment.
- For example: `openshift` (note, use `kubernetes` and `openshift` insted of `minikube` and `minishift` correspondingly).
- - Run `/entrypoint.sh`.
- After this, new Che master should be accesible from the `che-dev` endpoint.
- To reach Swagger use url from `che-dev` endpoint with `/swagger` suffix.
-
-To start a workspace from Che server under development some additional configuration of the cluster is needed.
-One should add rights for the service account to be able to perform all needed for Che server actions.
-Example for Openshift (in case of Kubernetes replace `oc` with `kubectl`):
-```bash
-cat << EOF | oc apply -f -
-apiVersion: rbac.authorization.k8s.io/v1
-kind: RoleBinding
-metadata:
- labels:
- app: che
- component: che
- name: che-workspace-admin
- namespace: che
-roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: admin
-subjects:
-- kind: ServiceAccount
- name: che-workspace
- namespace: che
-EOF
-```
-
-Also `CHE_API_INTERNAL`, `CHE_API_EXTERNAL` and `CHE_API` should be set in runner container and point to new Che server API.
-If one uses provided devfile, they are already set to: `http://che-dev:8080/api`, which should be changed in case of https protocol.
-
-
-## Pull Request Template and its Checklist
-
-Che repositories includes a GitHub Pull Request Template. Contributors must read and complete the template. In particular there is a list of requirements that the author needs to fulfil to merge the PR. This sections goes into the details of this checklist.
-
-### The Eclipse Contributor Agreement is valid
-
-The author has completed the [Eclipse Contributor Agreement](https://accounts.eclipse.org/user/eca) and has signed the commits using his email.
-
-### Code produced is complete
-
-No `TODO` comments left in the PR source code.
-
-### Code builds without errors
-
-The author has verified that code builds, tests pass and linters are happy.
-
-### Tests are covering the bugfix
-
-If the Pull Request fixes a bug it must includes a new automated test. The test validates the fix and protect against future regressions.
-
-### The repository devfile is up to date and works
-
-The devfile commands used to build and run the application are still working.
-
-### Sections "What issues does this PR fix or reference" and "How to test this PR" completed
-
-Never omit the two sections "What issues does this PR fix or reference" and "How to test this PR".
-
-### Relevant user documentation updated
-
-The author has documented the changes to Che installation, usage or management in [Che documentation](https://github.com/eclipse/che-docs).
-
-### Relevant contributing documentation updated
-
-Document changes to the steps to contribute to the project in the `CONTRIBUTING.md` files.
-
-### CI/CD changes implemented, documented and communicated
-
-Update CI/CD scripts and documentation when the PR includes changes to the build, test, distribute or deploy procedures. Communicate CI/CD changes to the whole community with an email.
diff --git a/README.md b/README.md
index e411b94bd9..ef2ff697c0 100644
--- a/README.md
+++ b/README.md
@@ -1,83 +1,2 @@
-
-
-
-
----
-
-**Visit website at: https://www.eclipse.org/che/** and documentation at: https://www.eclipse.org/che/docs
-
-- [**Getting Started**](#getting-started)
-- [**Using Eclipse Che**](#using-eclipse-che)
-- [**Feedback and Community**](#feedback-and-community)
-- [**Contributing**](#contributing)
-- [**Roadmap**](#roadmap)
-- [**License**](#license)
-
----
-
-### Getting Started
-Here you can find links on how to get started with Eclipse Che:
-- [Use Eclipse Che online](https://www.eclipse.org/che/getting-started/cloud/)
-- [Run Eclipse Che on your own K8S cluster](https://www.eclipse.org/che/docs/che-7/che-quick-starts)
-
-
-### Using Eclipse Che
-Here you can find references to useful documentation and hands-on guides to learn how to get the most of Eclipse Che:
-- [Customize Che workspaces for your projects](https://www.eclipse.org/che/docs/che-7/configuring-a-workspace-using-a-devfile/)
-- [Run VSCode Extensions in Che workspaces](https://www.eclipse.org/che/docs/che-7/end-user-guide/adding-a-vs-code-extension-to-a-workspace/)
-- [Creating and configuring a new Che 7 workspace](https://www.eclipse.org/che/docs/che-7/end-user-guide/creating-and-configuring-a-new-workspace/)
-- [Making a workspace portable using a devfile](https://www.eclipse.org/che/docs/che-7/end-user-guide/making-a-workspace-portable-using-a-devfile/)
-
-
-### Feedback and Community
-We love to hear from users and developers. Here are the various ways to get in touch with us:
-* **Support:** You can ask questions, report bugs, and request features using [GitHub issues](https://github.com/eclipse/che/issues).
-* **Public Chat:** Join the public [eclipse-che](https://mattermost.eclipse.org/eclipse/channels/eclipse-che) Mattermost channel to discuss with community and contributors.
-* **Twitter:** [@eclipse_che](https://twitter.com/eclipse_che)
-* **Mailing List:** [che-dev@eclipse.org](https://accounts.eclipse.org/mailing-list/che-dev)
-* **Weekly Meetings:** Join us in our [Che community meeting](https://github.com/eclipse/che/wiki/Che-Dev-Meetings) every second monday.
-
-
-### Contributing
-If you are interested in fixing issues and contributing directly to the code base:
-- :bug: [Submitting bugs](https://github.com/eclipse/che/issues/new/choose)
-- :page_facing_up: [Contributor license agreement](https://github.com/eclipse/che/wiki/Eclipse-Contributor-Agreement)
-- :checkered_flag: [Development workflows](./CONTRIBUTING.md)
-- :ok_hand: [Review source code changes](https://github.com/eclipse/che/pulls)
-- :pencil: [Improve docs](https://github.com/eclipse/che-docs)
-- :building_construction: [Che architecture](https://www.eclipse.org/che/docs/che-7/administration-guide/che-architecture-overview/)
-- :octocat: [Che repositories](./CONTRIBUTING.md#other-che-repositories)
-- :sparkles: [Good first issue for new contributors](https://github.com/eclipse/che/wiki/Labels#new-contributors)
-
-
-#### Extending Eclipse Che
-- [Add a new language support. (to be provided soon)](https://www.eclipse.org/che/docs/che-7/adding-support-for-a-new-language/)
-- [Package your favorite VSCode extensions and make them available in Che.](https://www.eclipse.org/che/docs/che-7/end-user-guide/publishing-metadata-for-a-vs-code-extension/)
-- [Write your own VSCode extension that runs on a dedicated side car container.](https://www.eclipse.org/che/docs/che-7/what-is-a-che-theia-plug-in/)
-- [Build and package your custom Che-Theia editor with your extensions and plugins.](https://www.eclipse.org/che/docs/che-7/using-alternative-ides-in-che/)
-
-### Roadmap
-We maintain the [Che roadmap](https://github.com/eclipse/che/wiki/Roadmap) in the open way. We welcome anyone to ask question and contribute to the roadmap by joining our [community meetings](https://github.com/eclipse/che/wiki/Che-Dev-Meetings).
-
-## CI
-There are several [GitHub Actions](https://github.com/eclipse/che/actions) workflows implemented for this repository:
-
-- [`nightly`](https://github.com/eclipse/che/actions/workflows/nightly-build.yml) - builds Maven artifacts, builds container images and pushes them to [quay.io](https://quay.io/organization/eclipse) on a daily basis from the [`master`](https://github.com/eclipse/che/tree/master) branch.
-- [`release`](https://github.com/eclipse/che/actions/workflows/release.yml) - builds Maven artifacts and container images. Images are public and pushed to [quay.io](https://quay.io/organization/eclipse). See [RELEASE.md](https://github.com/eclipse/che/blob/master/RELEASE.md) for more information about this workflow.
-
-### License
-Che is open sourced under the Eclipse Public License 2.0.
+TODO
+### Che server
\ No newline at end of file
diff --git a/tests/.infra/centos-ci/common-qe/README.md b/tests/.infra/centos-ci/common-qe/README.md
deleted file mode 100644
index fc2dce82f1..0000000000
--- a/tests/.infra/centos-ci/common-qe/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# How to use this functions
-
- - Coppy and paste this block of code inside your script. This script utomatically download and import all necessary files
- and all functions from the "common-qe" scripts may be invoked directly by function name without any additional actions.
-
- ```
-#Download and import the "common-qe" functions
-export IS_TESTS_FAILED="false"
-DOWNLOADER_URL=https://raw.githubusercontent.com/eclipse/che/master/tests/.infra/centos-ci/common-qe/downloader.sh
-curl $DOWNLOADER_URL -o downloader.sh
-chmod u+x downloader.sh
-. ./downloader.sh
-
-```
-
- - For correct displaying of the tests result add next block of code to the end of your script.
- ```
- if [ "$IS_TESTS_FAILED" == "true" ]; then
- exit 1;
-fi
- ```
-
-# How to configure this functions
-
- - You can configure existing ```"common-qe-configuration.conf"``` which downloading automatically by "downloader.sh".
- For configure it use next method:
- ```
-setConfigProperty "" "value"
-```
- Here an example:
-```
-setConfigProperty "test.suite" "test-all-devfiles"
-```
-
- - Or you can use your own configuration file. For this, export next variable , with path to file:
- ```
-export PATH_TO_CONFIGURATION_FILE=
- ```
- Here an example
-```
-export PATH_TO_CONFIGURATION_FILE=/full/path/to/conf/file/qe-config.conf
-
-#Download and import the "common-qe" functions
-export IS_TESTS_FAILED="false"
-DOWNLOADER_URL=https://raw.githubusercontent.com/eclipse/che/master/tests/.infra/centos-ci/common-qe/downloader.sh
-curl $DOWNLOADER_URL -o downloader.sh
-chmod u+x downloader.sh
-. ./downloader.sh
-```
diff --git a/tests/.infra/centos-ci/common-qe/che-cert-generation.sh b/tests/.infra/centos-ci/common-qe/che-cert-generation.sh
deleted file mode 100755
index b8c990517a..0000000000
--- a/tests/.infra/centos-ci/common-qe/che-cert-generation.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012-2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-
-#Declare CN
-export CA_CN=eclipse-che-signer
-
-export DOMAIN=*.$(minishift ip).nip.io
-
-#Create Root Key
-openssl genrsa -out rootCA.key 4096
-
-#Create and self sign the Root Certificate
-openssl req -x509 -new -nodes -key rootCA.key -subj /CN=${CA_CN} -sha256 -days 1024 -out rootCA.crt
-
-#Create the certificate key
-openssl genrsa -out domain.key 2048
-
-#Create the signing (csr)
-openssl req -new -sha256 -key domain.key -subj "/C=US/ST=CK/O=RedHat/CN=${DOMAIN}" -out domain.csr
-
-#Verify Csr
-openssl req -in domain.csr -noout -text
-
-#Generate the certificate using the domain csr and key along with the CA Root key
-openssl x509 -req -in domain.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out domain.crt -days 500 -sha256
-
-#Verify the certificate's content
-openssl x509 -in domain.crt -text -noout
diff --git a/tests/.infra/centos-ci/common-qe/che-util.sh b/tests/.infra/centos-ci/common-qe/che-util.sh
deleted file mode 100755
index acc883a601..0000000000
--- a/tests/.infra/centos-ci/common-qe/che-util.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012-2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-
-set -e
-
-SCRIPT_PATH="${BASH_SOURCE[0]}"
-SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
-. $SCRIPT_DIR/common-util.sh
-
-function obtainUserToken() {
- local username=$(readConfigProperty test.username)
- local password=$(readConfigProperty test.password)
- KEYCLOAK_URL=$(oc get checluster eclipse-che -o jsonpath='{.status.keycloakURL}')
- KEYCLOAK_BASE_URL="${KEYCLOAK_URL}/auth"
-
- local userAccessToken=$(curl -k -v -X POST $KEYCLOAK_BASE_URL/realms/che/protocol/openid-connect/token -H "Content-Type: application/x-www-form-urlencoded" -d "username=${username}" -d "password=${password}" -d "grant_type=password" -d "client_id=che-public" | jq -r .access_token)
-
- echo "$userAccessToken"
-}
-
-function installChectl(){
- bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next
-}
-
-function createServerPatchFile(){
- if [ -z "$1" ]
- then
- echo "Patch template has not been provided"
- exit 1
- fi
-
- echo "$1" > /tmp/che-cr-patch.yaml
-}
-
-function startCheServer(){
- createServerPatchFile "$1"
-
- if chectl server:deploy --telemetry=off --listr-renderer=verbose -a operator -p openshift --k8spodreadytimeout=600000 --k8spodwaittimeout=600000 --k8spoddownloadimagetimeout=600000 --che-operator-cr-patch-yaml=/tmp/che-cr-patch.yaml --chenamespace=eclipse-che; then
- echo "Started successfully"
- oc get checluster -o yaml
- else
- echo "======== oc get events ========"
- oc get events
- echo "======== oc get all ========"
- oc get all
- getOpenshiftLogs
- oc get checluster -o yaml || true
- exit 133
- fi
-}
-
-function createTestWorkspace(){
- local devfile_url=$(readConfigProperty test.workspace.devfile.url)
- local userAccessToken=$(obtainUserToken)
-
- chectl workspace:create --start --access-token "$userAccessToken" --telemetry=off --chenamespace=eclipse-che --devfile="$devfile_url"
-}
-
-function runTest() {
- local username=$(readConfigProperty test.username)
- local password=$(readConfigProperty test.password)
- local suite=$(readConfigProperty test.suite)
- local multiuser=$(readConfigProperty test.multiuser)
- local default_timeout=$(readConfigProperty timeout.default)
- local workspace_status_polling=$(readConfigProperty timeout.workspace.status.polling)
- local load_page_timeout=$(readConfigProperty timeout.load.page)
- local additional_options=$(readConfigProperty test.additional.options)
- local che_url=$(oc get checluster eclipse-che -o jsonpath='{.status.cheURL}')
-
- # ### Create directory for report
- cd /root/payload
- mkdir report
- REPORT_FOLDER=$(pwd)/report
-
- ### Run tests
- docker run --shm-size=1g --net=host --ipc=host -v $REPORT_FOLDER:/tmp/e2e/report:Z \
- -e TS_SELENIUM_BASE_URL="$che_url" \
- -e TS_SELENIUM_LOG_LEVEL=DEBUG \
- -e TS_SELENIUM_MULTIUSER="$multiuser" \
- -e TS_SELENIUM_USERNAME="$username" \
- -e TS_SELENIUM_PASSWORD="$password" \
- -e TS_SELENIUM_DEFAULT_TIMEOUT="$default_timeout" \
- -e TS_SELENIUM_WORKSPACE_STATUS_POLLING="$workspace_status_polling" \
- -e TS_SELENIUM_LOAD_PAGE_TIMEOUT="$load_page_timeout" \
- -e TEST_SUITE="$suite" \
- -e NODE_TLS_REJECT_UNAUTHORIZED=0 \
- $additional_options quay.io/eclipse/che-e2e:nightly || IS_TESTS_FAILED=true
-
- export IS_TESTS_FAILED
-}
diff --git a/tests/.infra/centos-ci/common-qe/common-qe-configuration.conf b/tests/.infra/centos-ci/common-qe/common-qe-configuration.conf
deleted file mode 100644
index 81cd484a4b..0000000000
--- a/tests/.infra/centos-ci/common-qe/common-qe-configuration.conf
+++ /dev/null
@@ -1,17 +0,0 @@
-# Environment
-env.root.dir.path=
-env.setup.environment.script.path=
-env.setup.environment.method.name=
-
-# Run test
-test.username=admin
-test.password=admin
-test.suite=test-happy-path
-test.multiuser=true
-test.workspace.devfile.url=https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/happy-path/happy-path-workspace.yaml
-test.additional.options=
-
-# Timeouts
-timeout.default=20000
-timeout.workspace.status.polling=20000
-timeout.load.page=420000
diff --git a/tests/.infra/centos-ci/common-qe/common-util.sh b/tests/.infra/centos-ci/common-qe/common-util.sh
deleted file mode 100755
index e8661c52e5..0000000000
--- a/tests/.infra/centos-ci/common-qe/common-util.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012-2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-
-set -e
-
-SCRIPT_PATH="${BASH_SOURCE[0]}"
-SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
-PATH_TO_CONFIGURATION_FILE=${PATH_TO_CONFIGURATION_FILE:="$SCRIPT_DIR/common-qe-configuration.conf"}
-
-function printError(){
- >&2 echo ""
- >&2 echo "▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼ !!! ERROR !!! ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼"
- >&2 echo ""
- >&2 echo "$1"
- >&2 echo ""
- >&2 echo "▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲"
- >&2 echo ""
-}
-
-function readConfigProperty(){
- if [ -z "$1" ]
- then
- printError "The 'readConfigProperty' function can't read property with the 'null' value."
- exit 1
- fi
-
- local propertyRow=$(cat $PATH_TO_CONFIGURATION_FILE | grep $1)
-
- if [ -z "$propertyRow" ]
- then
- printError "Can't read the '$1' property. Please revise config and correct the property name."
- exit 1
- fi
-
- local propertyValue=$(echo "$propertyRow" | sed s@$1=@''@)
-
- echo "$propertyValue"
-}
-
-function setConfigProperty(){
- # Check of the property existing
- readConfigProperty $1 > /dev/null
-
- # Set property value
- sed -i s@$1=.*@$1=$2@ $PATH_TO_CONFIGURATION_FILE
-
- echo "Property value has been changed '$1=$2'"
-}
-
-function getOpenshiftLogs() {
- echo "====== Che server logs ======"
- oc logs $(oc get pods --selector=component=che -o jsonpath="{.items[].metadata.name}") || true
- echo "====== Keycloak logs ======"
- oc logs $(oc get pods --selector=component=keycloak -o jsonpath="{.items[].metadata.name}") || true
- echo "====== Che operator logs ======"
- oc logs $(oc get pods --selector=app=che-operator -o jsonpath="{.items[].metadata.name}") || true
-}
-
-function archiveArtifacts() {
- JOB_NAME=$1
- DATE=$(date +"%m-%d-%Y-%H-%M")
- echo "Archiving artifacts from ${DATE} for ${JOB_NAME}/${BUILD_NUMBER}"
- cd /root/payload
- ls -la ./artifacts.key
- chmod 600 ./artifacts.key
- chown $(whoami) ./artifacts.key
- mkdir -p ./che/${JOB_NAME}/${BUILD_NUMBER}
- cp -R ./report ./che/${JOB_NAME}/${BUILD_NUMBER}/ || true
- rsync --password-file=./artifacts.key -Hva --partial --relative ./che/${JOB_NAME}/${BUILD_NUMBER} devtools@artifacts.ci.centos.org::devtools/
-}
diff --git a/tests/.infra/centos-ci/common-qe/downloader.sh b/tests/.infra/centos-ci/common-qe/downloader.sh
deleted file mode 100755
index 27c893b5e3..0000000000
--- a/tests/.infra/centos-ci/common-qe/downloader.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012-2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-
-COMMON_FOLDER_URL="https://raw.githubusercontent.com/eclipse/che/master/tests/.infra/centos-ci/common-qe"
-
-COMMON_FOLDER_NAME="common-qe"
-CERT_GENERATION_SCRIPT_NAME="che-cert-generation.sh"
-CHE_UTIL_SCRIPT_NAME="che-util.sh"
-COMMON_UTIL_SCRIPT_NAME="common-util.sh"
-INSTALLATION_UTIL_SCRIPT_NAME="installation-util.sh"
-CONFIG_FILE_NAME="common-qe-configuration.conf"
-
-SCRIPT_PATH="${BASH_SOURCE[0]}"
-SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
-ROOT_DIR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-
-function downloadAndSetPermissions(){
- local filename="$1"
- local fileUrl="$COMMON_FOLDER_URL/$filename"
-
- curl "$fileUrl" -o "$COMMON_FOLDER_NAME/$filename"
-
- chmod u+x "$COMMON_FOLDER_NAME/$filename"
-}
-
-set -e
-
-# clear destination folder
-rm -rf "$COMMON_FOLDER_NAME"
-mkdir "$COMMON_FOLDER_NAME"
-
-# download scripts
-downloadAndSetPermissions $CERT_GENERATION_SCRIPT_NAME
-downloadAndSetPermissions $CHE_UTIL_SCRIPT_NAME
-downloadAndSetPermissions $COMMON_UTIL_SCRIPT_NAME
-downloadAndSetPermissions $INSTALLATION_UTIL_SCRIPT_NAME
-downloadAndSetPermissions $CONFIG_FILE_NAME
-
-# import common methods
-. "$COMMON_FOLDER_NAME/$CERT_GENERATION_SCRIPT_NAME"
-. "$COMMON_FOLDER_NAME/$CHE_UTIL_SCRIPT_NAME"
-. "$COMMON_FOLDER_NAME/$COMMON_UTIL_SCRIPT_NAME"
-. "$COMMON_FOLDER_NAME/$INSTALLATION_UTIL_SCRIPT_NAME"
-
-setConfigProperty "env.root.dir.path" "$ROOT_DIR_PATH"
diff --git a/tests/.infra/centos-ci/common-qe/installation-util.sh b/tests/.infra/centos-ci/common-qe/installation-util.sh
deleted file mode 100755
index 353be33138..0000000000
--- a/tests/.infra/centos-ci/common-qe/installation-util.sh
+++ /dev/null
@@ -1,173 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2012-2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# Red Hat, Inc. - initial API and implementation
-
-set -e
-
-SCRIPT_PATH="${BASH_SOURCE[0]}"
-SCRIPT_DIR="$(dirname $SCRIPT_PATH)"
-
-. $SCRIPT_DIR/common-util.sh
-
-function setupTestEnvironment(){
- SCRIPT_PATH=$(readConfigProperty env.setup.environment.script.path)
-
- if [[ ! -z "$SCRIPT_PATH" ]]
- then
- ROOT_DIR_PATH=$(readConfigProperty env.root.dir.path)
- SETUP_ENV_SCRIPT_PATH=$ROOT_DIR_PATH/$SCRIPT_PATH
- SETUP_ENV_METHOD_NAME=$(readConfigProperty env.setup.environment.method.name)
-
- . $SETUP_ENV_SCRIPT_PATH
-
- eval $SETUP_ENV_METHOD_NAME
-
- else
- echo "The 'env.setup.environment.script.path' property is not set, the 'setupTestEnvironment' method is ignored"
-
- fi
-}
-
-function load_jenkins_vars() {
- if [ -e "jenkins-env.json" ]; then
- eval "$(./env-toolkit load -f jenkins-env.json \
- DEVSHIFT_TAG_LEN \
- QUAY_USERNAME \
- QUAY_PASSWORD \
- QUAY_ECLIPSE_CHE_USERNAME \
- QUAY_ECLIPSE_CHE_PASSWORD \
- JENKINS_URL \
- GIT_BRANCH \
- GIT_COMMIT \
- BUILD_NUMBER \
- ghprbSourceBranch \
- ghprbActualCommit \
- BUILD_URL \
- ghprbPullId)"
- fi
-}
-
-function install_tools() {
- # We need to disable selinux for now, XXX
- /usr/sbin/setenforce 0 || true
-
- # Get all the deps in
- yum install -d1 -y yum-utils device-mapper-persistent-data lvm2
- yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- yum install -d1 -y docker-ce \
- git
-
- service docker start
- echo 'CICO: Dependencies installed'
-}
-
-function installOC() {
- OC_DIR_NAME=openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit
- curl -vL "https://github.com/openshift/origin/releases/download/v3.11.0/${OC_DIR_NAME}.tar.gz" --output ${OC_DIR_NAME}.tar.gz
- tar -xvf ${OC_DIR_NAME}.tar.gz
- cp ${OC_DIR_NAME}/oc /usr/local/bin
- cp ${OC_DIR_NAME}/oc /tmp
-}
-
-function installKVM() {
- echo "======== Start to install KVM virtual machine ========"
-
- yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install
-
- curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 -o /usr/local/bin/docker-machine-driver-kvm
- chmod +x /usr/local/bin/docker-machine-driver-kvm
-
- systemctl enable libvirtd
- systemctl start libvirtd
-
- virsh net-list --all
- echo "======== KVM has been installed successfully ========"
-}
-
-function installEpelRelease() {
- if yum repolist | grep epel; then
- echo "Epel already installed, skipping instalation."
- else
- #excluding mirror1.ci.centos.org
- echo "exclude=mirror1.ci.centos.org" >>/etc/yum/pluginconf.d/fastestmirror.conf
- echo "Installing epel..."
- yum install -d1 --assumeyes epel-release
- yum update --assumeyes -d1
- fi
-}
-
-function installJQ() {
- installEpelRelease
- yum install --assumeyes -d1 jq
-}
-
-function installAndStartMinishift() {
- echo "======== Start to install minishift ========"
- curl -Lo minishift.tgz https://github.com/minishift/minishift/releases/download/v1.34.2/minishift-1.34.2-linux-amd64.tgz
- tar -xvf minishift.tgz --strip-components=1
- chmod +x ./minishift
- mv ./minishift /usr/local/bin/minishift
-
- #Setup GitHub token for minishift
- if [ -z "$CHE_BOT_GITHUB_TOKEN" ]
- then
- echo "\$CHE_BOT_GITHUB_TOKEN is empty. Minishift start might fail with GitGub API rate limit reached."
- else
- echo "\$CHE_BOT_GITHUB_TOKEN is set, checking limits."
- GITHUB_RATE_REMAINING=$(curl -slL "https://api.github.com/rate_limit?access_token=$CHE_BOT_GITHUB_TOKEN" | jq .rate.remaining)
- if [ "$GITHUB_RATE_REMAINING" -gt 1000 ]
- then
- echo "Github rate greater than 1000. Using che-bot token for minishift startup."
- export MINISHIFT_GITHUB_API_TOKEN=$CHE_BOT_GITHUB_TOKEN
- else
- echo "Github rate is lower than 1000. *Not* using che-bot for minishift startup."
- echo "If minishift startup fails, please try again later."
- fi
- fi
-
- minishift version
- minishift config set memory 14GB
- minishift config set cpus 4
-
- echo "======== Launch minishift ========"
- minishift start
-
- oc login -u system:admin
- oc adm policy add-cluster-role-to-user cluster-admin developer
- oc login -u developer -p developer
-
- . "${SCRIPT_DIR}"/che-cert-generation.sh
-
- oc project default
- oc delete secret router-certs
-
- cat domain.crt domain.key > minishift.crt
- oc create secret tls router-certs --key=domain.key --cert=minishift.crt
- oc rollout status dc router
- oc rollout latest router
- oc rollout status dc router
-
- oc create namespace eclipse-che
-
- cp rootCA.crt ca.crt
- oc create secret generic self-signed-certificate --from-file=ca.crt --namespace=eclipse-che
- oc project eclipse-che
-}
-
-function setup_environment(){
- load_jenkins_vars
- install_tools
- setupTestEnvironment
- installOC
- installKVM
- installAndStartMinishift
- installJQ
-}
diff --git a/tests/.infra/centos-ci/functional_tests_utils.sh b/tests/.infra/centos-ci/functional_tests_utils.sh
deleted file mode 100755
index 4d75683f58..0000000000
--- a/tests/.infra/centos-ci/functional_tests_utils.sh
+++ /dev/null
@@ -1,462 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (c) 2020 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-
-buildAndDeployArtifacts() {
- mvn clean install -U -Pintegration
- if [[ $? -eq 0 ]]; then
- echo 'Build Success!'
- echo 'Going to deploy artifacts'
- else
- die_with 'Build Failed!'
- fi
-}
-
-testImages() {
- echo "Going to build and push docker images"
- set -e
- set -o pipefail
-
- TAG=$1
- if [[ ${TAG} != "nightly" ]]; then #if given tag 'nightly' means that don't need to checkout and going to build master
- git checkout ${TAG}
- fi
- REGISTRY="quay.io"
- ORGANIZATION="eclipse"
- if [[ -n "${QUAY_ECLIPSE_CHE_USERNAME}" ]] && [[ -n "${QUAY_ECLIPSE_CHE_PASSWORD}" ]]; then
- docker login -u "${QUAY_ECLIPSE_CHE_USERNAME}" -p "${QUAY_ECLIPSE_CHE_PASSWORD}" "${REGISTRY}"
- else
- echo "Could not login, missing credentials for pushing to the '${ORGANIZATION}' organization"
- return
- fi
-
- # stop / rm all containers
- if [[ $(docker ps -aq) != "" ]]; then
- docker rm -f $(docker ps -aq)
- fi
-
- # KEEP RIGHT ORDER!!!
- DOCKER_FILES_LOCATIONS=(
- dockerfiles/endpoint-watcher
- dockerfiles/keycloak
- dockerfiles/postgres
- dockerfiles/dev
- dockerfiles/che
- dockerfiles/e2e
- )
-
- IMAGES_LIST=(
- eclipse/che-endpoint-watcher
- eclipse/che-keycloak
- eclipse/che-postgres
- eclipse/che-dev
- eclipse/che-server
- eclipse/che-e2e
- )
-
- # BUILD IMAGES
- for image_dir in ${DOCKER_FILES_LOCATIONS[@]}; do
- bash $(pwd)/${image_dir}/build.sh --tag:${TAG}
- if [[ ${image_dir} == "dockerfiles/che" ]]; then
- #CENTOS SINGLE USER
- BUILD_ASSEMBLY_DIR=$(echo assembly/assembly-main/target/eclipse-che-*/eclipse-che-*/)
- LOCAL_ASSEMBLY_DIR="${image_dir}/eclipse-che"
- if [[ -d "${LOCAL_ASSEMBLY_DIR}" ]]; then
- rm -r "${LOCAL_ASSEMBLY_DIR}"
- fi
- cp -r "${BUILD_ASSEMBLY_DIR}" "${LOCAL_ASSEMBLY_DIR}"
- docker build -t ${ORGANIZATION}/che-server:${TAG}-centos -f $(pwd)/${image_dir}/Dockerfile.centos $(pwd)/${image_dir}/
- fi
- if [[ $? -ne 0 ]]; then
- echo "ERROR:"
- echo "build of '${image_dir}' image is failed!"
- exit 1
- fi
- done
-
- echo '=========================== LIST OF IMAGES ==========================='
- docker images -a
- echo '=========================== LIST OF IMAGES ==========================='
-}
-
-function installOC() {
- OC_DIR_NAME=openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit
- curl -vL "https://github.com/openshift/origin/releases/download/v3.11.0/${OC_DIR_NAME}.tar.gz" --output ${OC_DIR_NAME}.tar.gz
- tar -xvf ${OC_DIR_NAME}.tar.gz
- cp ${OC_DIR_NAME}/oc /usr/local/bin
- cp ${OC_DIR_NAME}/oc /tmp
-}
-
-function installJQ() {
- installEpelRelease
- yum install --assumeyes -d1 jq
-}
-
-function installEpelRelease() {
- if yum repolist | grep epel; then
- echo "Epel already installed, skipping instalation."
- else
- #excluding mirror1.ci.centos.org
- echo "exclude=mirror1.ci.centos.org" >>/etc/yum/pluginconf.d/fastestmirror.conf
- echo "Installing epel..."
- yum install -d1 --assumeyes epel-release
- yum update --assumeyes -d1
- fi
-}
-
-function installYQ() {
- installEpelRelease
- yum install --assumeyes -d1 python3-pip
- pip3 install --upgrade setuptools
- pip3 install yq
-}
-
-function installStartDocker() {
- yum install --assumeyes -d1 yum-utils device-mapper-persistent-data lvm2
- yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- yum install --assumeyes -d1 docker-ce
- mkdir -p /etc/docker
- echo "{ \"insecure-registries\": [\"172.30.0.0/16\"] }" >/etc/docker/daemon.json
- systemctl start docker
- docker version
-}
-
-function installMvn() {
- mkdir -p /opt/apache-maven && curl -sSL https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar -xz --strip=1 -C /opt/apache-maven
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
- export PATH="/usr/lib/jvm/java-11-openjdk:/opt/apache-maven/bin:/usr/bin:${PATH:-/bin:/usr/bin}"
- export JAVACONFDIRS="/etc/java${JAVACONFDIRS:+:}${JAVACONFDIRS:-}"
- export M2_HOME="/opt/apache-maven"
-}
-
-function installNodejs() {
- curl -sL https://rpm.nodesource.com/setup_10.x | bash -
- yum install -y nodejs
-}
-
-function insalllYarn() {
- yum-config-manager --add-repo https://dl.yarnpkg.com/rpm/yarn.repo
- yum install -y yarn
-}
-
-function installGit() {
- yum install --assumeyes -d1 git
-}
-
-function installWget() {
- yum -y install wget
-}
-
-function installGssCompiler() {
- yum install -y gcc-c++ make
-}
-
-function installDependencies() {
- echo "======== Installing dependencies: ========"
- start=$(date +%s)
-
- installEpelRelease
- installYQ
- installStartDocker
- installJQ
- installOC
- installGit
- installWget
- # Getting dependencies ready
- yum install --assumeyes -d1 \
- patch \
- pcp \
- bzip2 \
- golang \
- make \
- java-11-openjdk-devel
- installMvn
- installNodejs
- insalllYarn
-
- stop=$(date +%s)
- instal_dep_duration=$(($stop - $start))
- echo "======== Installing all dependencies lasted $instal_dep_duration seconds. ========"
-
-}
-
-function checkAllCreds() {
- echo "======== Checking credentials: ========"
- CREDS_NOT_SET="false"
-
- echo ${#QUAY_ECLIPSE_CHE_USERNAME}
- echo ${#QUAY_ECLIPSE_CHE_PASSWORD}
-
- if [[ -z "${QUAY_ECLIPSE_CHE_USERNAME}" || -z "${QUAY_ECLIPSE_CHE_PASSWORD}" ]]; then
- echo "Docker registry credentials not set"
- CREDS_NOT_SET="true"
- fi
-
- if [[ "${CREDS_NOT_SET}" = "true" ]]; then
- echo "Failed to parse jenkins secure store credentials"
- exit 2
- else
- echo "Credentials set successfully."
- fi
-}
-
-function installKVM() {
- echo "======== Start to install KVM virtual machine ========"
-
- yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install
-
- curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 -o /usr/local/bin/docker-machine-driver-kvm
- chmod +x /usr/local/bin/docker-machine-driver-kvm
-
- systemctl enable libvirtd
- systemctl start libvirtd
-
- virsh net-list --all
- echo "======== KVM has been installed successfully ========"
-}
-
-function installAndStartMinishift() {
- echo "======== Start to install minishift ========"
- curl -Lo minishift.tgz https://github.com/minishift/minishift/releases/download/v1.34.2/minishift-1.34.2-linux-amd64.tgz
- tar -xvf minishift.tgz --strip-components=1
- chmod +x ./minishift
- mv ./minishift /usr/local/bin/minishift
-
- #Setup GitHub token for minishift
- if [ -z "$CHE_BOT_GITHUB_TOKEN" ]
- then
- echo "\$CHE_BOT_GITHUB_TOKEN is empty. Minishift start might fail with GitGub API rate limit reached."
- else
- echo "\$CHE_BOT_GITHUB_TOKEN is set, checking limits."
- GITHUB_RATE_REMAINING=$(curl -slL "https://api.github.com/rate_limit?access_token=$CHE_BOT_GITHUB_TOKEN" | jq .rate.remaining)
- if [ "$GITHUB_RATE_REMAINING" -gt 1000 ]
- then
- echo "Github rate greater than 1000. Using che-bot token for minishift startup."
- export MINISHIFT_GITHUB_API_TOKEN=$CHE_BOT_GITHUB_TOKEN
- else
- echo "Github rate is lower than 1000. *Not* using che-bot for minishift startup."
- echo "If minishift startup fails, please try again later."
- fi
- fi
-
- minishift version
- minishift config set memory 14GB
- minishift config set cpus 4
-
- echo "======== Lunch minishift ========"
- minishift start
-
- loginToOpenshiftAndSetDevRole
-
- setupSelfSignedCertificate
-}
-
-function installCheCtl() {
- channel=${1:-next}
- echo "======== Start to install chectl from channel $channel ========"
- bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=$channel
- echo "======== chectl has been installed successfully ========"
-}
-
-function getOpenshiftLogs() {
- oc logs $(oc get pods --selector=component=che -o jsonpath="{.items[].metadata.name}") || true
- oc logs $(oc get pods --selector=component=keycloak -o jsonpath="{.items[].metadata.name}") || true
-}
-
-function deployCheIntoCluster() {
- echo "======== Start to install CHE ========"
- if chectl server:deploy --telemetry=off --listr-renderer=verbose -a operator -p minishift --k8spodreadytimeout=600000 --k8spodwaittimeout=600000 --k8spoddownloadimagetimeout=600000 $1 --chenamespace=eclipse-che; then
- echo "Started successfully"
- oc get checluster -o yaml
- else
- echo "======== oc get events ========"
- oc get events
- echo "======== oc get all ========"
- oc get all
- # echo "==== docker ps ===="
- # docker ps
- # echo "==== docker ps -q | xargs -L 1 docker logs ===="
- # docker ps -q | xargs -L 1 docker logs | true
- getOpenshiftLogs
- curl -kvL https://keycloak-che.$(minishift ip).nip.io/auth/realms/che/.well-known/openid-configuration || true
- oc get checluster -o yaml || true
- exit 1337
- fi
-}
-
-function loginToOpenshiftAndSetDevRole() {
- oc login -u system:admin
- oc adm policy add-cluster-role-to-user cluster-admin developer
- oc login -u developer -p pass
-}
-
-function archiveArtifacts() {
- JOB_NAME=$1
- DATE=$(date +"%m-%d-%Y-%H-%M")
- echo "Archiving artifacts from ${DATE} for ${JOB_NAME}/${BUILD_NUMBER}"
- cd /root/payload
- ls -la ./artifacts.key
- chmod 600 ./artifacts.key
- chown $(whoami) ./artifacts.key
- mkdir -p ./che/${JOB_NAME}/${BUILD_NUMBER}
- cp -R ./report ./che/${JOB_NAME}/${BUILD_NUMBER}/ | true
- rsync --password-file=./artifacts.key -Hva --partial --relative ./che/${JOB_NAME}/${BUILD_NUMBER} devtools@artifacts.ci.centos.org::devtools/
-}
-
-function defineCheRoute(){
-CHE_ROUTE=$(oc get route che --template='{{ .spec.host }}')
- echo "====== Check CHE ROUTE ======"
- curl -kvL $CHE_ROUTE
-}
-
-createTestWorkspaceAndRunTest() {
- defineCheRoute
- ### Create workspace
- DEV_FILE_URL=$1
- echo "====== Create test workspace ======"
- if [[ ${DEV_FILE_URL} = "" ]]; then # by default it is used 'happy-path-devfile' yaml from CHE 'master' branch
- chectl workspace:create --start --access-token "$USER_ACCESS_TOKEN" --telemetry=off --chenamespace=eclipse-che --devfile=https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/happy-path/happy-path-workspace.yaml
- else
- chectl workspace:create --start --access-token "$USER_ACCESS_TOKEN" --telemetry=off --chenamespace=eclipse-che $1 # it can be directly indicated other URL to 'devfile' yaml
- fi
-
- ### Create directory for report
- cd /root/payload
- mkdir report
- REPORT_FOLDER=$(pwd)/report
- ### Run tests
- docker run --shm-size=1g --net=host --ipc=host -v $REPORT_FOLDER:/tmp/e2e/report:Z \
- -e TS_SELENIUM_BASE_URL="https://$CHE_ROUTE" \
- -e TS_SELENIUM_MULTIUSER=true \
- -e TS_SELENIUM_USERNAME="admin" \
- -e TS_SELENIUM_PASSWORD="admin" \
- -e TS_SELENIUM_LOG_LEVEL=TRACE \
- -e TS_SELENIUM_START_WORKSPACE_TIMEOUT=720000 \
- -e NODE_TLS_REJECT_UNAUTHORIZED=0 \
- quay.io/eclipse/che-e2e:nightly || IS_TESTS_FAILED=true
-}
-
-function createTestUserAndObtainUserToken() {
- ### Create user and obtain token
- KEYCLOAK_URL=$(oc get route/keycloak -o jsonpath='{.spec.host}')
- KEYCLOAK_BASE_URL="https://${KEYCLOAK_URL}/auth"
-
- ADMIN_USERNAME=admin
- ADMIN_PASS=admin
- TEST_USERNAME=admin
-
- echo "======== Getting admin token ========"
- ADMIN_ACCESS_TOKEN=$(curl -kX POST $KEYCLOAK_BASE_URL/realms/master/protocol/openid-connect/token -H "Content-Type: application/x-www-form-urlencoded" -d "username=admin" -d "password=admin" -d "grant_type=password" -d "client_id=admin-cli" | jq -r .access_token)
- echo $ADMIN_ACCESS_TOKEN
-
- echo "========Creating user========"
- USER_JSON="{\"username\": \"${TEST_USERNAME}\",\"enabled\": true,\"emailVerified\": true,\"email\":\"test1@user.aa\"}"
- echo $USER_JSON
-
- curl -kX POST $KEYCLOAK_BASE_URL/admin/realms/che/users -H "Authorization: Bearer ${ADMIN_ACCESS_TOKEN}" -H "Content-Type: application/json" -d "${USER_JSON}" -v
- USER_ID=$(curl -kX GET $KEYCLOAK_BASE_URL/admin/realms/che/users?username=${TEST_USERNAME} -H "Authorization: Bearer ${ADMIN_ACCESS_TOKEN}" | jq -r .[0].id)
- echo "========User id: $USER_ID========"
-
- echo "========Updating password========"
- CREDENTIALS_JSON={\"type\":\"password\",\"value\":\"${TEST_USERNAME}\",\"temporary\":false}
- echo $CREDENTIALS_JSON
-
- curl -kX PUT $KEYCLOAK_BASE_URL/admin/realms/che/users/${USER_ID}/reset-password -H "Authorization: Bearer ${ADMIN_ACCESS_TOKEN}" -H "Content-Type: application/json" -d "${CREDENTIALS_JSON}" -v
- export USER_ACCESS_TOKEN=$(curl -kX POST $KEYCLOAK_BASE_URL/realms/che/protocol/openid-connect/token -H "Content-Type: application/x-www-form-urlencoded" -d "username=${TEST_USERNAME}" -d "password=${TEST_USERNAME}" -d "grant_type=password" -d "client_id=che-public" | jq -r .access_token)
- echo "========User Access Token: $USER_ACCESS_TOKEN "
-}
-
-function setupEnvs() {
- eval "$(./env-toolkit load -f jenkins-env.json -r \
- CHE_BOT_GITHUB_TOKEN \
- CHE_MAVEN_SETTINGS \
- CHE_GITHUB_SSH_KEY \
- ^BUILD_NUMBER$ \
- CHE_OSS_SONATYPE_GPG_KEY \
- CHE_OSS_SONATYPE_PASSPHRASE \
- QUAY_ECLIPSE_CHE_USERNAME \
- QUAY_ECLIPSE_CHE_PASSWORD)"
-
-}
-
-function installDockerCompose() {
- echo "Install docker compose"
- sudo curl -L "https://github.com/docker/compose/releases/download/1.25.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
-}
-
-function runDevfileTestSuite() {
- defineCheRoute
- ### Create directory for report
- cd /root/payload
- mkdir report
- REPORT_FOLDER=$(pwd)/report
- ### Run tests
- docker run --shm-size=1g --net=host --ipc=host -v $REPORT_FOLDER:/tmp/e2e/report:Z \
- -e TS_SELENIUM_BASE_URL="https://$CHE_ROUTE" \
- -e TS_SELENIUM_LOG_LEVEL=DEBUG \
- -e TS_SELENIUM_MULTIUSER=true \
- -e TS_SELENIUM_USERNAME="admin" \
- -e TS_SELENIUM_PASSWORD="admin" \
- -e TEST_SUITE=test-all-devfiles \
- -e TS_SELENIUM_DEFAULT_TIMEOUT=300000 \
- -e TS_SELENIUM_LOAD_PAGE_TIMEOUT=240000 \
- -e TS_SELENIUM_WORKSPACE_STATUS_POLLING=20000 \
- -e NODE_TLS_REJECT_UNAUTHORIZED=0 \
- quay.io/eclipse/che-e2e:nightly || IS_TESTS_FAILED=true
-}
-
-function setupSelfSignedCertificate() {
- # Docs: https://www.eclipse.org/che/docs/che-7/installing-che-in-tls-mode-with-self-signed-certificates/#deploying-che-with-self-signed-tls-on-openshift3-using-operator_installing-che-in-tls-mode-with-self-signed-certificates
-
- # 1. Generate self-signed certificate
-
- ## Declare CN
- export CA_CN=eclipse-che-signer
-
- export DOMAIN=*.$(minishift ip).nip.io
-
- ## Create Root Key
- openssl genrsa -out rootCA.key 4096
-
- ## Create and self sign the Root Certificate
- openssl req -x509 -new -nodes -key rootCA.key -subj /CN=${CA_CN} -sha256 -days 1024 -out rootCA.crt
-
- ## Create the certificate key
- openssl genrsa -out domain.key 2048
-
- ## Create the signing (csr)
- openssl req -new -sha256 -key domain.key -subj "/C=US/ST=CK/O=RedHat/CN=${DOMAIN}" -out domain.csr
-
- ## Verify Csr
- openssl req -in domain.csr -noout -text
-
- ## Generate the certificate using the domain csr and key along with the CA Root key
- openssl x509 -req -in domain.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out domain.crt -days 500 -sha256
-
- ## Verify the certificate's content
- openssl x509 -in domain.crt -text -noout
-
- # 2. Configure che namespace to use self-signed certificate
-
- ## Re-configure the router with the generated certificate
- oc project default
- oc delete secret router-certs
- cat domain.crt domain.key > minishift.crt
- oc create secret tls router-certs --key=domain.key --cert=minishift.crt
- oc rollout status dc router
- oc rollout latest router
- oc rollout status dc router
-
- ## Pre-create a namespace for Che
- oc create namespace eclipse-che
-
- ## Create a secret from the CA certificate
- cp rootCA.crt ca.crt
- oc create secret generic self-signed-certificate --from-file=ca.crt --namespace=eclipse-che
- oc project eclipse-che
-}
diff --git a/tests/.infra/centos-ci/nightly/cico-devfiles-test.sh b/tests/.infra/centos-ci/nightly/cico-devfiles-test.sh
deleted file mode 100755
index 5f2884f48c..0000000000
--- a/tests/.infra/centos-ci/nightly/cico-devfiles-test.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2018 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-set -x
-
-echo "========Starting nigtly test job $(date)========"
-
-source tests/.infra/centos-ci/functional_tests_utils.sh
-
-function prepareCustomResourcePatchFile() {
- cat > /tmp/custom-resource-patch.yaml < /tmp/custom-resource-patch.yaml < /tmp/custom-resource-patch.yaml <```
-- ```npm install```
-
-## Default launch
-
-- ```npm test```
-
-## Custom launch
-
-- Use environment variables which described in the **```'TestConstants.ts'```** file
-- Use environment variables for setting timeouts if needed. You can see the list in **```'TimeoutConstants.ts'```**. You can see the list of those variables and their value if you set the ```'TS_SELENIUM_PRINT_TIMEOUT_VARIABLES = true'```
-
-## Docker launch
-
-- open terminal and go to the "e2e" directory
-- export the ```"TS_SELENIUM_BASE_URL"``` variable with "Che" url
-- run command ```"npm run test-docker"```
-
-## Docker launch with changed tests
-
-**For launching tests with local changes perform next steps:**
-
-- open terminal and go to the "e2e" directory
-- export the ```"TS_SELENIUM_BASE_URL"``` variable with "Che" url
-- run command ```"npm run test-docker-mount-e2e"```
-
-## Debug docker launch
-
-The ```'eclipse/che-e2e'``` docker image has VNC server instaled inside. For connecting use ```'0.0.0.0:5920'``` adress.
-
-## The "Happy Path" scenario launching
-
-**The easiest way to do that is to perform steps which are described in the "Docker launch" paragraph.
-For running tests without docker, please perform next steps:**
-
-- Deploy Che on Kubernetes infrastructure by using 'Minikube' and 'Chectl'
-- Create workspace by using 'Chectl' and devfile
- - link to 'Chectl' manual
- - link to devfile ( **```For successfull test passing, exactly provided devfile should be used```** )
-
-- Provide the **```'TS_SELENIUM_BASE_URL'```** environment variable as described above
-- perform command **```'npm run test-happy-path'```**
diff --git a/tests/e2e/TestConstants.ts b/tests/e2e/TestConstants.ts
deleted file mode 100644
index 466b6bbfce..0000000000
--- a/tests/e2e/TestConstants.ts
+++ /dev/null
@@ -1,238 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-function getBaseUrl(): string {
- const baseUrl: string | undefined = process.env.TS_SELENIUM_BASE_URL;
- if (!baseUrl) {
- return 'http://sample-url';
- }
-
- return baseUrl.replace(/\/$/, '');
-}
-
-export const TestConstants = {
- /**
- * Base URL of the application which should be checked
- */
- TS_SELENIUM_BASE_URL: getBaseUrl(),
-
- /**
- * Base URl of web console OpenShift which uses to test OperatorHub.
- */
- TS_SELENIUM_WEB_CONSOLE_OCP_URL: process.env.TS_SELENIUM_WEB_CONSOLE_OCP_URL || 'https://console-openshift-console.apps.',
-
- /**
- * Run browser in "Headless" (hiden) mode, "false" by default.
- */
- TS_SELENIUM_HEADLESS: process.env.TS_SELENIUM_HEADLESS === 'true',
-
- /**
- * Run browser in "Fullscreen" (kiosk) mode, "false" by default.
- */
- TS_SELENIUM_LAUNCH_FULLSCREEN: process.env.TS_SELENIUM_LAUNCH_FULLSCREEN === 'true',
-
- /**
- * Run browser with an enabled or disabled W3C protocol (on Chrome 76 and upper, it is enabled by default), "true" by default.
- */
- TS_SELENIUM_W3C_CHROME_OPTION: process.env.TS_SELENIUM_W3C_CHROME_OPTION !== 'false',
-
- /**
- * Browser width resolution, "1920" by default.
- */
- TS_SELENIUM_RESOLUTION_WIDTH: Number(process.env.TS_SELENIUM_RESOLUTION_WIDTH) || 1920,
-
- /**
- * Browser height resolution, "1080" by default.
- */
- TS_SELENIUM_RESOLUTION_HEIGHT: Number(process.env.TS_SELENIUM_RESOLUTION_HEIGHT) || 1080,
-
- /**
- * Default ammount of tries, "5" by default.
- */
- TS_SELENIUM_DEFAULT_ATTEMPTS: Number(process.env.TS_SELENIUM_DEFAULT_ATTEMPTS) || 5,
-
- /**
- * Default delay in milliseconds between tries, "1000" by default.
- */
- TS_SELENIUM_DEFAULT_POLLING: Number(process.env.TS_SELENIUM_DEFAULT_POLLING) || 1000,
-
- /**
- * Amount of tries for checking workspace status.
- */
- TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS: Number(process.env.TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS) || 90,
-
- /**
- * Delay in milliseconds between checking workspace status tries.
- */
- TS_SELENIUM_WORKSPACE_STATUS_POLLING: Number(process.env.TS_SELENIUM_WORKSPACE_STATUS_POLLING) || 10000,
-
- /**
- * Amount of tries for checking plugin precence.
- */
- TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS: Number(process.env.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS) || 20,
-
- /**
- * Name of workspace created for 'Happy Path' scenario validation.
- */
- TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME: process.env.TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME || 'petclinic-dev-environment',
-
- /**
- * Using 'single-host' strategy, "false" by default.
- */
- TS_SELENIUM_SINGLE_HOST: process.env.TS_SELENIUM_SINGLE_HOST === 'true',
-
- /**
- * Value of OpenShift oAuth property determines how to login in installed application,
- * if 'false' as an user of application, if 'true' as a regular user of OCP.
- */
- TS_SELENIUM_VALUE_OPENSHIFT_OAUTH: process.env.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH || 'false',
-
- /**
- * Username used to log in MultiUser Che.
- */
- TS_SELENIUM_USERNAME: process.env.TS_SELENIUM_USERNAME || 'che',
-
- /**
- * Password used to log in MultiUser Che.
- */
- TS_SELENIUM_PASSWORD: process.env.TS_SELENIUM_PASSWORD || '',
-
- /**
- * Log into OCP by using appropriate provider title.
- */
- TS_OCP_LOGIN_PAGE_PROVIDER_TITLE: process.env.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE || '',
-
- /**
- * Path to folder with load tests execution report.
- */
- TS_SELENIUM_LOAD_TEST_REPORT_FOLDER: process.env.TS_SELENIUM_LOAD_TEST_REPORT_FOLDER || './load-test-folder',
-
- /**
- * Regular username used to login in OCP.
- */
- TS_SELENIUM_OCP_USERNAME: process.env.TS_SELENIUM_OCP_USERNAME || '',
-
- /**
- * Password regular user used to login in OCP.
- */
- TS_SELENIUM_OCP_PASSWORD: process.env.TS_SELENIUM_OCP_PASSWORD || '',
-
- /**
- * Email of regular user OpenShift to login CHE.
- */
- TS_SELENIUM_EMAIL_USER: process.env.TS_SELENIUM_EMAIL_USER || 'test@test.com',
-
- /**
- * First name of regular user OpenShift to login CHE.
- */
- TS_SELENIUM_FIRST_NAME: process.env.TS_SELENIUM_FIRST_NAME || 'qa',
-
- /**
- * Last name of regular user Openshift to login CHE.
- */
- TS_SELENIUM_LAST_NAME: process.env.TS_SELENIUM_LAST_NAME || 'test',
-
- /**
- * Delay between screenshots catching in the milliseconds for the execution screencast.
- */
- TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS: Number(process.env.TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS) || 1000,
-
- /**
- * Path to folder with tests execution report.
- */
- TS_SELENIUM_REPORT_FOLDER: process.env.TS_SELENIUM_REPORT_FOLDER || './report',
-
- /**
- * Enable or disable storing of execution screencast, "false" by default.
- */
- TS_SELENIUM_EXECUTION_SCREENCAST: process.env.TS_SELENIUM_EXECUTION_SCREENCAST === 'true',
-
- /**
- * Delete screencast after execution if all tests passed, "true" by default.
- */
- DELETE_SCREENCAST_IF_TEST_PASS: process.env.DELETE_SCREENCAST_IF_TEST_PASS !== 'false',
-
- /**
- * Remote driver URL.
- */
- TS_SELENIUM_REMOTE_DRIVER_URL: process.env.TS_SELENIUM_REMOTE_DRIVER_URL || '',
-
- /**
- * Stop and remove workspace if a test fails.
- */
- DELETE_WORKSPACE_ON_FAILED_TEST: process.env.DELETE_WORKSPACE_ON_FAILED_TEST === 'true',
-
- /**
- * Log level settings, possible variants: 'INFO' (by default), 'DEBUG', 'TRACE'.
- */
- TS_SELENIUM_LOG_LEVEL: process.env.TS_SELENIUM_LOG_LEVEL || 'INFO',
-
- /**
- * Running test suite - possible variants can be found in package.json scripts part.
- */
- TEST_SUITE: process.env.TEST_SUITE || 'test-happy-path',
-
- /**
- * The repo (with README.md in root) and access token are needed for to run test-git-ssh
- */
- TS_GITHUB_TEST_REPO: process.env.TS_GITHUB_TEST_REPO || '',
-
- /**
- * Token for a github repository with permissions which allow add the ssh keys
- */
- TS_GITHUB_TEST_REPO_ACCESS_TOKEN: process.env.TS_GITHUB_TEST_REPO_ACCESS_TOKEN || '',
-
- /**
- * Login for a user whom has been created in the test Openshift cluster. Need for Openshift connector test
- */
- TS_TEST_OPENSHIFT_PLUGIN_USERNAME: process.env.TS_TEST_OPENSHIFT_PLUGIN_USERNAME || '',
-
- /**
- * Password for a user whom has been created in the test Openshift cluster. Need for Openshift connector test
- */
- TS_TEST_OPENSHIFT_PLUGIN_PASSWORD: process.env.TS_TEST_OPENSHIFT_PLUGIN_PASSWORD || '',
-
- /**
- * The name of project in the Openshift plugin tree
- */
- TS_TEST_OPENSHIFT_PLUGIN_PROJECT: process.env.TS_TEST_OPENSHIFT_PLUGIN_PROJECT || '',
-
- /**
- * The name of the Openshift connector plugin component type
- */
- TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_TYPE: process.env.TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_TYPE || 'nodejs (s2i)',
-
-
- /**
- * The name of the Openshift connector plugin component version
- */
- TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_VERSION: process.env.TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_VERSION || 'latest',
-
- /**
- * Print all timeout variables when tests launch, defaulte to false
- */
- TS_SELENIUM_PRINT_TIMEOUT_VARIABLES: process.env.TS_SELENIUM_PRINT_TIMEOUT_VARIABLES || false,
-
- /**
- * URL of the workspace created by devworkspace-controller
- */
- TS_SELENIUM_DEVWORKSPACE_URL: process.env.TS_SELENIUM_DEVWORKSPACE_URL,
-
- /**
- * This variable specifies that run test is used for load testing and that all artifacts will be sent to ftp client.
- */
- TS_LOAD_TESTS: process.env.TS_LOAD_TESTS || 'false',
-
- /**
- * This variable determines whether to delete the workspace after the test or leave the workspace running.
- */
- TS_DELETE_PLUGINS_TEST_WORKSPACE: process.env.TS_DELETE_PLUGINS_TEST_WORKSPACE || 'true'
-
-};
diff --git a/tests/e2e/TimeoutConstants.ts b/tests/e2e/TimeoutConstants.ts
deleted file mode 100644
index fc1556f63d..0000000000
--- a/tests/e2e/TimeoutConstants.ts
+++ /dev/null
@@ -1,210 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-export const TimeoutConstants = {
- // -------------------------------------------- INSTALLING AND STARTUP --------------------------------------------
-
- /**
- * Wait between workspace started and IDE ready to be used, "20 000" by default.
- */
- TS_IDE_LOAD_TIMEOUT: Number(process.env.TS_IDE_LOAD_TIMEOUT) || 20_000,
-
- /**
- * Timeout in milliseconds waiting for workspace start, "360 000" by default.
- */
- TS_SELENIUM_START_WORKSPACE_TIMEOUT: Number(process.env.TS_SELENIUM_START_WORKSPACE_TIMEOUT) || 360_000,
-
- /**
- * Timeout in milliseconds waiting for page load, "20 000" by default.
- */
- TS_SELENIUM_LOAD_PAGE_TIMEOUT: Number(process.env.TS_SELENIUM_LOAD_PAGE_TIMEOUT) || 20_000,
-
- /**
- * Wait for loader absence, "60 000" by default.
- */
- TS_WAIT_LOADER_ABSENCE_TIMEOUT: Number(process.env.TS_WAIT_LOADER_ABSENCE_TIMEOUT) || 60_000,
-
- /**
- * Wait for loader absence, "60 000" by default.
- */
- TS_WAIT_LOADER_PRESENCE_TIMEOUT: Number(process.env.TS_WAIT_LOADER_PRESENCE_TIMEOUT) || 60_000,
-
- /**
- * Timeout waiting for URL, "5 000" by default.
- */
- TS_WAIT_URL_TIMEOUT: Number(process.env.TS_WAIT_URL_TIMEOUT) || 5_000,
-
- // -------------------------------------------- DASHBOARD --------------------------------------------
- /**
- * Common timeout for dashboard items, "5 000" by default
- */
- TS_COMMON_DASHBOARD_WAIT_TIMEOUT: Number(process.env.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) || 5_000,
-
- /**
- * Timeout for clicking on dashboard menu items, "2 000" by default
- */
- TS_CLICK_DASHBOARD_ITEM_TIMEOUT: Number(process.env.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) || 2_000,
-
- /**
- * Timeout for workspace stopped status, "30 000" by default
- */
- TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT: Number(process.env.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) || 30_000,
-
- // -------------------------------------------- LANGUAGE SERVER VALIDATION --------------------------------------------
-
- /**
- * Timeout in milliseconds waiting for language server initialization, "180 000" by default.
- */
- TS_SELENIUM_LANGUAGE_SERVER_START_TIMEOUT: Number(process.env.TS_SELENIUM_LANGUAGE_SERVER_START_TIMEOUT) || 180_000,
-
- /**
- * Timeout for suggestion invoking, "60 000" by default.
- */
- TS_SUGGESTION_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 60_000,
-
- /**
- * Timeout for error highlighting presence, "90 000" by default
- */
- TS_ERROR_HIGHLIGHTING_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 90_000,
-
-
- // -------------------------------------------- PROJECT TREE --------------------------------------------
-
- /**
- * Wait for IDE showing project tree tab, "60 000" by default.
- */
- TS_PROJECT_TREE_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 60_000,
-
- /**
- * Click on item timeout (project tree), "10 000" by default.
- */
- TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT: Number(process.env.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) || 10_000,
-
- /**
- * Expand item in project tree, "5 000" by default.
- */
- TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT: Number(process.env.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) || 5_000,
-
- /**
- * Timeout for waiting workspace sample import, 50_000 by default.
- */
- TS_IMPORT_PROJECT_DEFAULT_POLLING: Number(process.env.TS_SELENIUM_DEFAULT_POLLING) || 50_000,
-
- // -------------------------------------------- EDITOR --------------------------------------------
-
- /**
- * Timeout for inetractions with editor tab - wait, click, select, "5 000" by default.
- */
- TS_EDITOR_TAB_INTERACTION_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 5_000,
-
- /**
- * Wait for file to be opened in editor, "30 000" by default.
- */
- TS_OPEN_EDITOR_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 30_000,
-
- /**
- * Wait for suggestion container closure, "3 000" by default.
- */
- TS_CLOSE_SUGGESTION_CONTAINER_TIMEOUT: Number(process.env.TS_CLOSE_SUGGESTION_CONTAINER_TIMEOUT) || 3_000,
-
-
- // -------------------------------------------- IDE --------------------------------------------
-
- /**
- * Timeout for context menu manipulation, "10 000" by default
- */
- TS_CONTEXT_MENU_TIMEOUT: Number(process.env.TS_CONTEXT_MENU_TIMEOUT) || 10_000,
-
- /**
- * Timeout for interactions with Notification center - open, close, "10 000" by default.
- */
- TS_NOTIFICATION_CENTER_TIMEOUT: Number(process.env.TS_OPEN_PROJECT_TREE_TIMEOUT) || 10_000,
-
- /**
- * Timeout for debugger to connect, "60 000" by default
- */
- TS_DEBUGGER_CONNECTION_TIMEOUT: Number(process.env.TS_DEBUGGER_CONNECTION_TIMEOUT) || 60_000,
-
- /**
- * Timeout for context menu manipulation, "10 000" by default
- */
- TS_DIALOG_WINDOW_DEFAULT_TIMEOUT: Number(process.env.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT) || 10_000,
-
- /**
- * Timeout for breakpoint interactions, "20 000" by default
- */
- TS_BREAKPOINT_DEFAULT_TIMEOUT: Number(process.env.TS_BREAKPOINT_DEFAULT_TIMEOUT) || 20_000,
-
- /**
- * Timeout for interactions with Git Plugin container, "20 000" by default
- */
- TS_GIT_CONAINER_INTERACTION_TIMEOUT: Number(process.env.TS_GIT_CONAINER_INTERACTION_TIMEOUT) || 20_000,
-
- /**
- * Timeout for toolbars interaction, "30 000" by default
- */
- TS_SELENIUM_TOOLBAR_TIMEOUT: Number(process.env.TS_SELENIUM_TOOLBAR_TIMEOUT) || 30_000,
-
- /**
- * Timeout for clicking on visible item, "3 000" by default
- */
- TS_SELENIUM_CLICK_ON_VISIBLE_ITEM: Number(process.env.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) || 3_000,
-
- /**
- * Timeout for OpenDialogWidget class, "5 000" by default
- */
- TS_SELENIUM_DIALOG_WIDGET_TIMEOUT: Number(process.env.TS_SELENIUM_DIALOG_WIDGET_TIMEOUT) || 5_000,
-
- /**
- * Default timeout for interaction with terminal, "3 000" by default
- */
- TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT: Number(process.env.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) || 5_000,
-
- /**
- * Default timeout for preview widget, "10 000" by default
- */
- TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT: Number(process.env.TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT) || 10_000,
-
- /**
- * Timeout for opening quick menu from top panel, "10 000" by default
- */
- TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT: Number(process.env.TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT) || 10_000,
-
- /**
- * Timeout waiting for url, "10 000" by default
- */
- TS_SELENIUM_WAIT_FOR_URL: Number(process.env.TS_SELENIUM_WAIT_FOR_URL) || 10_000,
-
- /**
- * Timeout waiting for an executed task to finish, waiting stops automatically if any exit code notification is present, "300 000" by default
- */
- TS_SELENIUM_WAIT_TASK_EXIT_CODE_TIMEOUT: Number(process.env.TS_SELENIUM_WAIT_TASK_EXIT_CODE_TIMEOUT) || 300_000,
-
-
- // ------------------------------------ OPENSHIFT RELATED ------------------------------------
-
- /**
- * Timeout for obtaining cluster IP, "10 000" by default.
- */
- TS_GET_CLUSTER_IP_TIMEOUT: Number(process.env.TS_GET_CLUSTER_IP_TIMEOUT) || 60_000,
-
- /**
- * Timeout for waiting fr openshift connector tree, "10 000" by default.
- */
- TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT: Number(process.env.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) || 120_000,
-
- // ----------------------------------------- PLUGINS -----------------------------------------
-
- /**
- * Common timeout for plugins.
- */
- TS_COMMON_PLUGIN_TEST_TIMEOUT: Number(process.env.TS_COMMON_PLUGIN_TEST_TIMEOUT) || 20_000
-
-};
diff --git a/tests/e2e/driver/CheReporter.ts b/tests/e2e/driver/CheReporter.ts
deleted file mode 100644
index c003ff4d52..0000000000
--- a/tests/e2e/driver/CheReporter.ts
+++ /dev/null
@@ -1,185 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import * as mocha from 'mocha';
-import { IDriver } from './IDriver';
-import { inversifyConfig } from '..';
-import { TYPES, CLASSES } from '..';
-import * as fs from 'fs';
-import * as rm from 'rimraf';
-import { TestConstants } from '../TestConstants';
-import { logging } from 'selenium-webdriver';
-import { DriverHelper } from '../utils/DriverHelper';
-import { ScreenCatcher } from '../utils/ScreenCatcher';
-import { ITestWorkspaceUtil } from '../utils/workspace/ITestWorkspaceUtil';
-import { PreferencesHandler, AskForConfirmationType, TerminalRendererType } from '../utils/PreferencesHandler';
-import { CheApiRequestHandler } from '../utils/requestHandlers/CheApiRequestHandler';
-import { TimeoutConstants } from '../TimeoutConstants';
-import { Logger } from '../utils/Logger';
-
-const e2eContainer = inversifyConfig.e2eContainer;
-const driver: IDriver = e2eContainer.get(TYPES.Driver);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const screenCatcher: ScreenCatcher = e2eContainer.get(CLASSES.ScreenCatcher);
-let methodIndex: number = 0;
-let deleteScreencast: boolean = true;
-let testWorkspaceUtil: ITestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-let preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-
-class CheReporter extends mocha.reporters.Spec {
- constructor(runner: mocha.Runner, options: mocha.MochaOptions) {
- super(runner, options);
-
- runner.on('start', async (test: mocha.Test) => {
- let launchInformation: string =
- `################## Launch Information ##################
-
- TS_SELENIUM_BASE_URL: ${TestConstants.TS_SELENIUM_BASE_URL}
- TS_SELENIUM_HEADLESS: ${TestConstants.TS_SELENIUM_HEADLESS}
-
- TS_SELENIUM_USERNAME: ${TestConstants.TS_SELENIUM_USERNAME}
- TS_SELENIUM_PASSWORD: ${TestConstants.TS_SELENIUM_PASSWORD}
-
- TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME: ${TestConstants.TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME}
- TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS: ${TestConstants.TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS}
- TS_SELENIUM_REPORT_FOLDER: ${TestConstants.TS_SELENIUM_REPORT_FOLDER}
- TS_SELENIUM_EXECUTION_SCREENCAST: ${TestConstants.TS_SELENIUM_EXECUTION_SCREENCAST}
- DELETE_SCREENCAST_IF_TEST_PASS: ${TestConstants.DELETE_SCREENCAST_IF_TEST_PASS}
- TS_SELENIUM_REMOTE_DRIVER_URL: ${TestConstants.TS_SELENIUM_REMOTE_DRIVER_URL}
- DELETE_WORKSPACE_ON_FAILED_TEST: ${TestConstants.DELETE_WORKSPACE_ON_FAILED_TEST}
- TS_SELENIUM_LOG_LEVEL: ${TestConstants.TS_SELENIUM_LOG_LEVEL}
-`;
-
- if (TestConstants.TS_SELENIUM_PRINT_TIMEOUT_VARIABLES) {
- launchInformation += `\n TS_SELENIUM_PRINT_TIMEOUT_VARIABLES is set to true: \n`;
- Object.entries(TimeoutConstants).forEach(
- ([key, value]) => launchInformation += `\n ${key}: ${value}`);
- } else {
- launchInformation += `\n to output timeout variables, set TS_SELENIUM_PRINT_TIMEOUT_VARIABLES to true`;
- }
-
- launchInformation += `\n ######################################################## \n`;
-
- console.log(launchInformation);
-
- rm.sync(TestConstants.TS_SELENIUM_REPORT_FOLDER);
- if (TestConstants.TS_SELENIUM_LOG_LEVEL === 'TRACE') {
- CheApiRequestHandler.enableRequestInteceptor();
- CheApiRequestHandler.enableResponseInterceptor();
- }
- await preferencesHandler.setConfirmExit(AskForConfirmationType.never);
- await preferencesHandler.setTerminalType(TerminalRendererType.dom);
- });
-
- runner.on('test', async function (test: mocha.Test) {
- if (!TestConstants.TS_SELENIUM_EXECUTION_SCREENCAST) {
- return;
- }
-
- methodIndex = methodIndex + 1;
- const currentMethodIndex: number = methodIndex;
- let iterationIndex: number = 1;
-
- while (!(test.state === 'passed' || test.state === 'failed')) {
- await screenCatcher.catchMethodScreen(test.title, currentMethodIndex, iterationIndex);
- iterationIndex = iterationIndex + 1;
-
- await driverHelper.wait(TestConstants.TS_SELENIUM_DELAY_BETWEEN_SCREENSHOTS);
- }
- });
-
- runner.on('pass', async (test: mocha.Test) => {
- if (TestConstants.TS_LOAD_TESTS) {
- const loadTestReportFolder: string = TestConstants.TS_SELENIUM_LOAD_TEST_REPORT_FOLDER;
- const loadTestFilePath: string = loadTestReportFolder + '/load-test-results.txt';
- const report = test.title + ': ' + test.duration + '\r';
- if (!fs.existsSync(loadTestReportFolder)) {
- fs.mkdirSync(loadTestReportFolder);
- }
- fs.appendFileSync(loadTestFilePath, report);
- }
- });
-
-
- runner.on('end', async function (test: mocha.Test) {
- // ensure that fired events done
- await driver.get().sleep(5000);
-
- // close driver
- await driver.get().quit();
-
- // delete screencast folder if conditions matched
- if (deleteScreencast && TestConstants.DELETE_SCREENCAST_IF_TEST_PASS) {
- rm.sync(TestConstants.TS_SELENIUM_REPORT_FOLDER);
- }
- });
-
- runner.on('fail', async function (test: mocha.Test) {
- Logger.error(`CheReporter runner.on.fail: ${test.fullTitle()} failed after ${test.duration}ms`);
- // raise flag for keeping the screencast
- deleteScreencast = false;
-
- const testFullTitle: string = test.fullTitle().replace(/\s/g, '_');
- const testTitle: string = test.title.replace(/\s/g, '_');
-
- const testReportDirPath: string = `${TestConstants.TS_SELENIUM_REPORT_FOLDER}/${testFullTitle}`;
- const screenshotFileName: string = `${testReportDirPath}/screenshot-${testTitle}.png`;
- const pageSourceFileName: string = `${testReportDirPath}/pagesource-${testTitle}.html`;
- const browserLogsFileName: string = `${testReportDirPath}/browserlogs-${testTitle}.txt`;
-
-
- // create reporter dir if not exist
- const reportDirExists: boolean = fs.existsSync(TestConstants.TS_SELENIUM_REPORT_FOLDER);
-
- if (!reportDirExists) {
- fs.mkdirSync(TestConstants.TS_SELENIUM_REPORT_FOLDER);
- }
-
- // create dir for failed test report if not exist
- const testReportDirExists: boolean = fs.existsSync(testReportDirPath);
-
- if (!testReportDirExists) {
- fs.mkdirSync(testReportDirPath);
- }
-
- // take screenshot and write to file
- const screenshot: string = await driver.get().takeScreenshot();
- const screenshotStream = fs.createWriteStream(screenshotFileName);
- screenshotStream.write(Buffer.from(screenshot, 'base64'));
- screenshotStream.end();
-
- // take pagesource and write to file
- const pageSource: string = await driver.get().getPageSource();
- const pageSourceStream = fs.createWriteStream(pageSourceFileName);
- pageSourceStream.write(Buffer.from(pageSource));
- pageSourceStream.end();
-
- // take browser console logs and write to file
- const browserLogsEntries: logging.Entry[] = await driverHelper.getDriver().manage().logs().get('browser');
- let browserLogs: string = '';
-
- browserLogsEntries.forEach(log => {
- browserLogs += `\"${log.level}\" \"${log.type}\" \"${log.message}\"\n`;
- });
-
- const browserLogsStream = fs.createWriteStream(browserLogsFileName);
- browserLogsStream.write(Buffer.from(browserLogs));
- browserLogsStream.end();
-
- // stop and remove running workspace
- if (TestConstants.DELETE_WORKSPACE_ON_FAILED_TEST) {
- console.log('Property DELETE_WORKSPACE_ON_FAILED_TEST se to true - trying to stop and delete running workspace.');
- testWorkspaceUtil.cleanUpAllWorkspaces();
- }
-
- });
- }
-}
-
-export = CheReporter;
diff --git a/tests/e2e/driver/ChromeDriver.ts b/tests/e2e/driver/ChromeDriver.ts
deleted file mode 100644
index c5ff7d9e44..0000000000
--- a/tests/e2e/driver/ChromeDriver.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'chromedriver';
-import 'reflect-metadata';
-import { injectable } from 'inversify';
-import { ThenableWebDriver, Builder } from 'selenium-webdriver';
-import { IDriver } from './IDriver';
-import { Options } from 'selenium-webdriver/chrome';
-import { TestConstants } from '../TestConstants';
-
-@injectable()
-export class ChromeDriver implements IDriver {
- private readonly driver: ThenableWebDriver;
-
- constructor() {
- const options: Options = this.getDriverOptions();
- this.driver = this.getDriverBuilder(options).build();
-
- this.driver
- .manage()
- .window()
- .setSize(TestConstants.TS_SELENIUM_RESOLUTION_WIDTH, TestConstants.TS_SELENIUM_RESOLUTION_HEIGHT);
- }
-
- get(): ThenableWebDriver {
- return this.driver;
- }
-
- private getDriverOptions(): Options {
- let options: Options = new Options()
- .addArguments('--no-sandbox')
- .addArguments('--disable-web-security')
- .addArguments('--allow-running-insecure-content')
- .addArguments('--ignore-certificate-errors');
- // if 'true' run in 'headless' mode
- if (TestConstants.TS_SELENIUM_HEADLESS) {
- options = options.addArguments('headless');
- }
- return options;
- }
-
- private getDriverBuilder(options: Options): Builder {
- const disableW3copts = { 'goog:chromeOptions' : { 'w3c' : false }};
- let builder: Builder = new Builder()
- .forBrowser('chrome')
- .setChromeOptions(options);
-
- // if 'false' w3c protocl is disabled
- if (! TestConstants.TS_SELENIUM_W3C_CHROME_OPTION) {
- builder.withCapabilities(disableW3copts)
- .forBrowser('chrome')
- .setChromeOptions(options);
- }
-
- // if 'true' run with remote driver
- if (TestConstants.TS_SELENIUM_REMOTE_DRIVER_URL) {
- builder = builder.usingServer(TestConstants.TS_SELENIUM_REMOTE_DRIVER_URL);
- }
-
- return builder;
-
- }
-
-}
diff --git a/tests/e2e/driver/IDriver.ts b/tests/e2e/driver/IDriver.ts
deleted file mode 100644
index 4c6d3d3c7c..0000000000
--- a/tests/e2e/driver/IDriver.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { ThenableWebDriver } from 'selenium-webdriver';
-
-export interface IDriver {
- get(): ThenableWebDriver;
-}
diff --git a/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml b/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml
deleted file mode 100644
index 91f0c88485..0000000000
--- a/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: java11-plugin-test
-projects:
- - name: console-java-simple
- source:
- location: 'https://github.com/che-samples/console-java-simple.git'
- type: git
- branch: java1.11
-components:
- - type: cheEditor
- id: eclipse/che-theia/next
- memoryLimit: 512Mi
- - id: redhat/java/latest
- preferences:
- java.server.launchMode: Standard
- type: chePlugin
diff --git a/tests/e2e/files/devfiles/plugins/PhpPluginTest.yaml b/tests/e2e/files/devfiles/plugins/PhpPluginTest.yaml
deleted file mode 100644
index 5be21284a3..0000000000
--- a/tests/e2e/files/devfiles/plugins/PhpPluginTest.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-apiVersion: 1.0.0
-metadata:
- generateName: php-plugin-test
-projects:
-- name: php-web-simple
- source:
- type: git
- location: "https://github.com/che-samples/web-php-simple"
-components:
-- type: chePlugin
- id: bmewburn/vscode-intelephense-client/latest
-- type: chePlugin
- id: felixfbecker/php-debug/latest
-- type: dockerimage
- alias: php
- image: quay.io/eclipse/che-php-7:nightly
- memoryLimit: 512Mi
- mountSources: true
- endpoints:
- - name: '8080-tcp'
- port: 8080
- volumes:
- - name: composer
- containerPath: "/home/user/.composer"
- - name: symfony
- containerPath: "/home/user/.symfony"
-commands:
-- name: Debug current file
- actions:
- - type: vscode-launch
- referenceContent: |
- {
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Launch currently open script",
- "type": "php",
- "request": "launch",
- "program": "${file}",
- "stopOnEntry": true,
- "cwd": "${fileDirname}",
- "port": 9000,
- "runtimeExecutable": "php"
- }
- ]
- }
diff --git a/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml b/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml
deleted file mode 100644
index 9b4ee17469..0000000000
--- a/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: python-plugin-test
-projects:
- - name: python-hello-world
- source:
- location: 'https://github.com/che-samples/python-hello-world.git'
- type: git
-components:
- - id: ms-python/python/latest
- type: chePlugin
- - type: cheEditor
- id: eclipse/che-theia/next
- memoryLimit: 512Mi
diff --git a/tests/e2e/files/devfiles/plugins/TypescriptNodeDebug2PluginTest.yaml b/tests/e2e/files/devfiles/plugins/TypescriptNodeDebug2PluginTest.yaml
deleted file mode 100644
index a9e5b3f949..0000000000
--- a/tests/e2e/files/devfiles/plugins/TypescriptNodeDebug2PluginTest.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: typescript-debug-plugins
-projects:
- - name: nodejs-web-app
- source:
- location: 'https://github.com/che-samples/web-nodejs-sample.git'
- branch: che-qe-tests
- type: git
-components:
- - type: cheEditor
- id: eclipse/che-theia/next
- memoryLimit: 512Mi
- - id: vscode/typescript-language-features/latest
- type: chePlugin
- - id: ms-vscode/node-debug2/latest
- preferences:
- debug.node.useV3: false
- type: chePlugin
- - mountSources: true
- endpoints:
- - name: nodejs
- port: 3000
- memoryLimit: 512Mi
- type: dockerimage
- alias: nodejs
- image: 'quay.io/eclipse/che-nodejs10-ubi:nightly'
-commands:
- - name: run the web app (debugging enabled)
- actions:
- - workdir: '${CHE_PROJECTS_ROOT}/nodejs-web-app/app'
- type: exec
- command: npm install && nodemon --inspect app.js
- component: nodejs
- - name: Attach remote debugger
- actions:
- - referenceContent: |
- {
- "version": "0.2.0",
- "configurations": [
- {
- "type": "node",
- "request": "attach",
- "name": "Attach to Remote",
- "address": "localhost",
- "port": 9229,
- "localRoot": "${workspaceFolder}",
- "remoteRoot": "${workspaceFolder}"
- }
- ]
- }
- type: vscode-launch
diff --git a/tests/e2e/files/devfiles/plugins/VscodeKubernetesPlugin.yaml b/tests/e2e/files/devfiles/plugins/VscodeKubernetesPlugin.yaml
deleted file mode 100644
index 7a07c661d5..0000000000
--- a/tests/e2e/files/devfiles/plugins/VscodeKubernetesPlugin.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: nodejs-24lop
-projects:
- - name: nodejs-web-app
- source:
- location: 'https://github.com/che-samples/web-nodejs-sample.git'
- branch: che-qe-tests
- type: git
-components:
- - type: chePlugin
- id: ms-kubernetes-tools/vscode-kubernetes-tools/latest
diff --git a/tests/e2e/files/devfiles/plugins/VscodeShellcheckPlugin.yaml b/tests/e2e/files/devfiles/plugins/VscodeShellcheckPlugin.yaml
deleted file mode 100644
index 10ec5687d5..0000000000
--- a/tests/e2e/files/devfiles/plugins/VscodeShellcheckPlugin.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: nodejs-zmecm
-projects:
- - name: nodejs-web-app
- source:
- location: 'https://github.com/che-samples/web-nodejs-sample.git'
- branch: che-qe-tests
- type: git
-components:
- - id: timonwong/shellcheck/latest
- type: chePlugin
diff --git a/tests/e2e/files/devfiles/plugins/VscodeValePlugin.yaml b/tests/e2e/files/devfiles/plugins/VscodeValePlugin.yaml
deleted file mode 100644
index 6b4d73360a..0000000000
--- a/tests/e2e/files/devfiles/plugins/VscodeValePlugin.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: che-docs-test
-projects:
- - name: che-docs
- source:
- location: 'https://github.com/eclipse/che-docs.git'
- type: git
- branch: master
-components:
- - mountSources: true
- endpoints:
- - name: Open-Livereload
- port: 35729
- - attributes:
- path: /che-7/overview/introduction-to-eclipse-che/
- name: Open-Preview-server
- port: 4000
- command:
- - tail
- args:
- - '-f'
- - /dev/null
- memoryLimit: 512M
- type: dockerimage
- alias: che-docs
- image: 'quay.io/eclipse/che-docs:latest'
- - type: chePlugin
- reference: 'https://che-plugin-registry-main.surge.sh/v3/plugins/errata-ai/vale-server/latest/meta.yaml'
- alias: vale-server
- preferences:
- vale.core.useCLI: true
diff --git a/tests/e2e/files/devfiles/plugins/VscodeXmlPlugin.yaml b/tests/e2e/files/devfiles/plugins/VscodeXmlPlugin.yaml
deleted file mode 100644
index 942642ac1a..0000000000
--- a/tests/e2e/files/devfiles/plugins/VscodeXmlPlugin.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: xml-plugin-test
-projects:
- - name: nodejs-web-app
- source:
- location: 'https://github.com/che-samples/web-nodejs-sample.git'
- branch: che-qe-tests
- type: git
-components:
- - id: redhat/vscode-xml/latest
- type: chePlugin
diff --git a/tests/e2e/files/devfiles/plugins/VscodeYamlPlugin.yaml b/tests/e2e/files/devfiles/plugins/VscodeYamlPlugin.yaml
deleted file mode 100644
index e11d7ed3b7..0000000000
--- a/tests/e2e/files/devfiles/plugins/VscodeYamlPlugin.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: 1.0.0
-metadata:
- name: nodejs-zmecm
-projects:
- - name: nodejs-web-app
- source:
- location: 'https://github.com/che-samples/web-nodejs-sample.git'
- branch: che-qe-tests
- type: git
-components:
- - id: redhat/vscode-yaml/latest
- type: chePlugin
diff --git a/tests/e2e/files/happy-path/containers-happy-path.yaml b/tests/e2e/files/happy-path/containers-happy-path.yaml
deleted file mode 100644
index 6203ab6535..0000000000
--- a/tests/e2e/files/happy-path/containers-happy-path.yaml
+++ /dev/null
@@ -1,127 +0,0 @@
----
-apiVersion: v1
-kind: Service
-metadata:
- name: mysql
- labels:
- app.kubernetes.io/name: mysql
- app.kubernetes.io/component: database
- app.kubernetes.io/part-of: petclinic
-spec:
- ports:
- - port: 3306
- targetPort: 3306
- selector:
- app.kubernetes.io/name: mysql
- app.kubernetes.io/component: database
- app.kubernetes.io/part-of: petclinic
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: db
- labels:
- app.kubernetes.io/name: mysql
- app.kubernetes.io/component: database
- app.kubernetes.io/part-of: petclinic
-spec:
- selector:
- matchLabels:
- app.kubernetes.io/name: mysql
- app.kubernetes.io/component: database
- app.kubernetes.io/part-of: petclinic
- replicas: 1
- template:
- metadata:
- labels:
- app.kubernetes.io/name: mysql
- app.kubernetes.io/component: database
- app.kubernetes.io/part-of: petclinic
- spec:
- containers:
- - name: mysql
- image: quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764
- resources:
- requests:
- memory: 256Mi
- env:
- - name: MYSQL_USER
- value: petclinic
- - name: MYSQL_PASSWORD
- value: petclinic
- - name: MYSQL_ROOT_PASSWORD
- value: petclinic
- - name: MYSQL_DATABASE
- value: petclinic
- ports:
- - containerPort: 3306
----
-apiVersion: v1
-kind: Service
-metadata:
- name: spring-boot-app
- labels:
- app.kubernetes.io/name: petclinic
- app.kubernetes.io/component: webapp
- app.kubernetes.io/part-of: petclinic
-spec:
- ports:
- - port: 8080
- targetPort: 8080
- selector:
- app.kubernetes.io/name: petclinic
- app.kubernetes.io/component: webapp
- app.kubernetes.io/part-of: petclinic
----
-apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
-kind: Deployment
-metadata:
- name: spring-boot-app
- labels:
- app.kubernetes.io/name: petclinic
- app.kubernetes.io/component: webapp
- app.kubernetes.io/part-of: petclinic
-spec:
- selector:
- matchLabels:
- app.kubernetes.io/name: petclinic
- app.kubernetes.io/component: webapp
- app.kubernetes.io/part-of: petclinic
- replicas: 1
- template:
- metadata:
- labels:
- app.kubernetes.io/name: petclinic
- app.kubernetes.io/component: webapp
- app.kubernetes.io/part-of: petclinic
- spec:
- containers:
- - name: spring-boot
- image: quay.io/mloriedo/spring-petclinic
- resources:
- requests:
- memory: 512Mi
- ports:
- - containerPort: 8080
----
-apiVersion: extensions/v1beta1
-kind: Ingress
-metadata:
- name: spring-boot-app
- labels:
- app: spring-petclinic
- tier: frontend
- annotations:
- kubernetes.io/ingress.class: "nginx"
- nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
- nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
- nginx.ingress.kubernetes.io/ssl-redirect: "false"
-spec:
- rules:
- - host: 192.168.99.100.nip.io
- http:
- paths:
- - path: /
- backend:
- serviceName: spring-boot-app
- servicePort: 8080
diff --git a/tests/e2e/files/happy-path/happy-path-workspace.yaml b/tests/e2e/files/happy-path/happy-path-workspace.yaml
deleted file mode 100644
index 176487fa9f..0000000000
--- a/tests/e2e/files/happy-path/happy-path-workspace.yaml
+++ /dev/null
@@ -1,94 +0,0 @@
----
-apiVersion: 1.0.0
-metadata:
- name: petclinic-dev-environment
-projects:
- - name: petclinic
- source:
- type: git
- location: "https://github.com/spring-projects/spring-petclinic.git"
-components:
- - type: cheEditor
- id: eclipse/che-theia/next
- memoryLimit: 512Mi
- - type: kubernetes
- alias: petclinic-web
- reference: https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/happy-path/containers-happy-path.yaml
- selector:
- app.kubernetes.io/component: webapp
- entrypoints:
- - containerName: spring-boot
- command: ["tail"]
- args: ["-f", "/dev/null"]
- - type: kubernetes
- alias: petclinic-db
- reference: https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/happy-path/containers-happy-path.yaml
- selector:
- app.kubernetes.io/component: database
- - type: dockerimage
- alias: maven-container
- image: quay.io/eclipse/happy-path:nightly
- env:
- - name: MAVEN_CONFIG
- value: /home/user/.m2
- memoryLimit: 1500Mi
- endpoints:
- - name: '8080-tcp'
- port: 8080
- - name: 'debug'
- port: 5005
- attributes:
- public: 'false'
- mountSources: true
- - type: chePlugin
- id: redhat/java/latest
- memoryLimit: "1000Mi"
- preferences:
- java.server.launchMode: Standard
- - type: chePlugin
- id: redhat/vscode-yaml/latest
-commands:
- - name: build
- actions:
- - type: exec
- component: maven-container
- command: mvn clean package | tee /workspace_logs/build.log && tail -n 40 /workspace_logs/build.log | grep 'BUILD SUCCESS' > /projects/petclinic/result-build.txt
- workdir: /projects/petclinic
- - name: build-file-output
- actions:
- - type: exec
- component: maven-container
- command: cd /projects/petclinic && mvn package | tee /workspace_logs/build-output.log && tail -n 40 /workspace_logs/build-output.log | grep 'BUILD SUCCESS' > /projects/petclinic/result-build-output.txt
- - name: run
- actions:
- - type: exec
- component: maven-container
- command: java -jar spring-petclinic-2.4.5.jar --spring.profiles.active=mysql | tee /workspace_logs/run.log
- workdir: /projects/petclinic/target
- - name: run-with-changes
- actions:
- - type: exec
- component: maven-container
- command: java -jar spring-petclinic-2.4.5.jar --spring.profiles.active=mysql | tee /workspace_logs/run-with-changes.log
- workdir: /projects/petclinic/target
- - name: run-debug
- actions:
- - type: exec
- component: maven-container
- command: java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 spring-petclinic-2.4.5.jar --spring.profiles.active=mysql | tee /workspace_logs/run-debug.log
- workdir: /projects/petclinic/target
- - name: Debug remote java application
- actions:
- - type: vscode-launch
- referenceContent: |
- {
- "version": "0.2.0",
- "configurations": [
- {
- "type": "java",
- "name": "Debug (Attach) - Remote",
- "request": "attach",
- "hostName": "localhost",
- "port": 5005
- }]
- }
diff --git a/tests/e2e/files/happy-path/petclinic-classpath.txt b/tests/e2e/files/happy-path/petclinic-classpath.txt
deleted file mode 100644
index 39abf1c5e9..0000000000
--- a/tests/e2e/files/happy-path/petclinic-classpath.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/e2e/generateIndex.sh b/tests/e2e/generateIndex.sh
deleted file mode 100755
index f2b0a5af38..0000000000
--- a/tests/e2e/generateIndex.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-
-echo "Generating index.ts file..."
-echo "import * as inversifyConfig from './inversify.config';
-export { inversifyConfig };
-export * from './inversify.types';
-export * from './TestConstants';
-export * from './TimeoutConstants';
-" > index.ts
-
-listOfDirs="driver utils pageobjects testsLibrary"
-listOfExcludes="./driver/CheReporter.ts"
-for dir in $listOfDirs
-do
- files=$(find ./$dir -type f | sort)
- for file in $files
- do
- case $file in *ts)
- for excludedFile in $listOfExcludes
- do
- if [ $excludedFile == $file ]; then
- continue
- else
- end=$((${#file}-3))
- file_without_ending=${file:0:end}
- echo "export * from '$file_without_ending';" >> index.ts
- fi
- done
- ;;
- *)
- echo "Excluding file $file - not a typescript file"
- ;;
- esac
- done
-done
diff --git a/tests/e2e/index.ts b/tests/e2e/index.ts
deleted file mode 100644
index 72bda60d81..0000000000
--- a/tests/e2e/index.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import * as inversifyConfig from './inversify.config';
-export { inversifyConfig };
-export * from './inversify.types';
-export * from './TestConstants';
-export * from './TimeoutConstants';
-
-export * from './driver/ChromeDriver';
-export * from './driver/IDriver';
-export * from './utils/BrowserTabsUtil';
-export * from './utils/DriverHelper';
-export * from './utils/Logger';
-export * from './utils/PreferencesHandler';
-export * from './utils/requestHandlers/CheApiRequestHandler';
-export * from './utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler';
-export * from './utils/requestHandlers/headers/IAuthorizationHeaderHandler';
-export * from './utils/requestHandlers/tokens/CheMultiuserTokenHandler';
-export * from './utils/requestHandlers/tokens/ITokenHandler';
-export * from './utils/ScreenCatcher';
-export * from './utils/VCS/CheGitApi';
-export * from './utils/VCS/github/GitHubUtil';
-export * from './utils/workspace/ITestWorkspaceUtil';
-export * from './utils/WorkspaceNameHandler';
-export * from './utils/workspace/TestWorkspaceUtil';
-export * from './utils/workspace/WorkspaceStatus';
-export * from './pageobjects/dashboard/CreateWorkspace';
-export * from './pageobjects/dashboard/Dashboard';
-export * from './pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins';
-export * from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
-export * from './pageobjects/dashboard/Workspaces';
-export * from './pageobjects/ide/ContextMenu';
-export * from './pageobjects/ide/DebugView';
-export * from './pageobjects/ide/DialogWindow';
-export * from './pageobjects/ide/Editor';
-export * from './pageobjects/ide/GitPlugin';
-export * from './pageobjects/ide/Ide';
-export * from './pageobjects/ide/LeftToolBar';
-export * from './pageobjects/ide/NotificationCenter';
-export * from './pageobjects/ide/OpenDialogWidget';
-export * from './pageobjects/ide/OpenshiftPlugin';
-export * from './pageobjects/ide/OpenWorkspaceWidget';
-export * from './pageobjects/ide/plugins/KubernetesPlugin';
-export * from './pageobjects/ide/PreviewWidget';
-export * from './pageobjects/ide/ProjectTree';
-export * from './pageobjects/ide/QuickOpenContainer';
-export * from './pageobjects/ide/RightToolBar';
-export * from './pageobjects/ide/Terminal';
-export * from './pageobjects/ide/TopMenu';
-export * from './pageobjects/login/ICheLoginPage';
-export * from './pageobjects/login/IOcpLoginPage';
-export * from './pageobjects/login/MultiUserLoginPage';
-export * from './pageobjects/login/OcpUserLoginPage';
-export * from './pageobjects/login/RegularUserOcpCheLoginPage';
-export * from './pageobjects/login/UpdateAccountInformationPage';
-export * from './pageobjects/openshift/CheLoginPage';
-export * from './pageobjects/openshift/OcpLoginPage';
-export * from './testsLibrary/CodeExecutionTests';
-export * from './testsLibrary/LanguageServerTests';
-export * from './testsLibrary/ProjectAndFileTests';
-export * from './testsLibrary/WorkspaceHandlingTests';
diff --git a/tests/e2e/initDevfileTests.sh b/tests/e2e/initDevfileTests.sh
deleted file mode 100755
index 70ad72f321..0000000000
--- a/tests/e2e/initDevfileTests.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-########################################
-############# Methods ##################
-########################################
-
-launchAllUserstories(){
- echo ""
- echo "Launching all userstories";
- echo ""
-
- npm run lint && npm run tsc && mocha --opts mocha-all-devfiles.opts ;
-}
-
-launchSingleUserstory(){
- echo ""
- echo "Launching the \"${USERSTORY}\" userstory";
- echo ""
-
- tsc && mocha --opts mocha-single-devfile.opts --spec dist/tests/login/Login.spec.js --spec dist/tests/devfiles/${USERSTORY}.spec.js ;
-}
-
-checkUserstoryName(){
- local checkedName="$(ls tests/devfiles | grep ${USERSTORY}.spec.ts)";
-
- if [ -z "$checkedName" ]; then
- echo ""
- echo "Current value USERSTORY=\"${USERSTORY}\" doesn't match to any existed test:"
- echo ""
- echo "$(ls tests/devfiles | sed -e 's/.spec.ts/ /g')"
- echo ""
- echo "Please choose one of the tests above, or unset the \"USERSTORY\" variable for launching all of them."
- echo ""
-
- exit 1;
- fi
-}
-
-########################################
-############# Launching ################
-########################################
-
-if [ -z "$USERSTORY" ]; then
- launchAllUserstories ;
-else
- checkUserstoryName ;
- launchSingleUserstory ;
-fi
diff --git a/tests/e2e/inversify.config.ts b/tests/e2e/inversify.config.ts
deleted file mode 100644
index 2cf9f8e8ec..0000000000
--- a/tests/e2e/inversify.config.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { Container } from 'inversify';
-import { IDriver } from './driver/IDriver';
-import { ChromeDriver } from './driver/ChromeDriver';
-import { TYPES, CLASSES } from './inversify.types';
-import { ITestWorkspaceUtil } from './utils/workspace/ITestWorkspaceUtil';
-import { TestWorkspaceUtil } from './utils/workspace/TestWorkspaceUtil';
-import { IOcpLoginPage } from './pageobjects/login/IOcpLoginPage';
-import { OcpUserLoginPage } from './pageobjects/login/OcpUserLoginPage';
-import { TestConstants } from './TestConstants';
-import { ICheLoginPage } from './pageobjects/login/ICheLoginPage';
-import { RegularUserOcpCheLoginPage } from './pageobjects/login/RegularUserOcpCheLoginPage';
-import { MultiUserLoginPage } from './pageobjects/login/MultiUserLoginPage';
-import { ContextMenu } from './pageobjects/ide/ContextMenu';
-import { DriverHelper } from './utils/DriverHelper';
-import { Dashboard } from './pageobjects/dashboard/Dashboard';
-import { Workspaces } from './pageobjects/dashboard/Workspaces';
-import { WorkspaceDetails } from './pageobjects/dashboard/workspace-details/WorkspaceDetails';
-import { WorkspaceDetailsPlugins } from './pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins';
-import { Ide } from './pageobjects/ide/Ide';
-import { ProjectTree } from './pageobjects/ide/ProjectTree';
-import { Editor } from './pageobjects/ide/Editor';
-import { TopMenu } from './pageobjects/ide/TopMenu';
-import { QuickOpenContainer } from './pageobjects/ide/QuickOpenContainer';
-import { PreviewWidget } from './pageobjects/ide/PreviewWidget';
-import { GitPlugin } from './pageobjects/ide/GitPlugin';
-import { RightToolBar } from './pageobjects/ide/RightToolBar';
-import { Terminal } from './pageobjects/ide/Terminal';
-import { DebugView } from './pageobjects/ide/DebugView';
-import { DialogWindow } from './pageobjects/ide/DialogWindow';
-import { ScreenCatcher } from './utils/ScreenCatcher';
-import { OcpLoginPage } from './pageobjects/openshift/OcpLoginPage';
-import { OpenWorkspaceWidget } from './pageobjects/ide/OpenWorkspaceWidget';
-import { CheLoginPage } from './pageobjects/openshift/CheLoginPage';
-import { NotificationCenter } from './pageobjects/ide/NotificationCenter';
-import { PreferencesHandler } from './utils/PreferencesHandler';
-import { IAuthorizationHeaderHandler } from './utils/requestHandlers/headers/IAuthorizationHeaderHandler';
-import { CheMultiuserAuthorizationHeaderHandler } from './utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler';
-import { CheMultiuserTokenHandler } from './utils/requestHandlers/tokens/CheMultiuserTokenHandler';
-import { ITokenHandler } from './utils/requestHandlers/tokens/ITokenHandler';
-import { CheApiRequestHandler } from './utils/requestHandlers/CheApiRequestHandler';
-import { CheGitApi } from './utils/VCS/CheGitApi';
-import { GitHubUtil } from './utils/VCS/github/GitHubUtil';
-import { CreateWorkspace } from './pageobjects/dashboard/CreateWorkspace';
-import { OpenshiftPlugin } from './pageobjects/ide/OpenshiftPlugin';
-import { OpenDialogWidget } from './pageobjects/ide/OpenDialogWidget';
-import { UpdateAccountInformationPage } from './pageobjects/login/UpdateAccountInformationPage';
-import { LeftToolBar } from './pageobjects/ide/LeftToolBar';
-import { KubernetesPlugin } from './pageobjects/ide/plugins/KubernetesPlugin';
-import { BrowserTabsUtil } from './utils/BrowserTabsUtil';
-import { PluginsView } from './pageobjects/ide/plugins/PluginsView';
-import { LanguageServerTests } from './testsLibrary/LanguageServerTests';
-import { CodeExecutionTests } from './testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from './testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from './testsLibrary/WorkspaceHandlingTests';
-
-const e2eContainer: Container = new Container({ defaultScope: 'Transient' });
-
-e2eContainer.bind(TYPES.Driver).to(ChromeDriver).inSingletonScope();
-e2eContainer.bind(TYPES.WorkspaceUtil).to(TestWorkspaceUtil);
-e2eContainer.bind(TYPES.OcpLogin).to(OcpUserLoginPage);
-
-e2eContainer.bind(TYPES.IAuthorizationHeaderHandler).to(CheMultiuserAuthorizationHeaderHandler);
-e2eContainer.bind(TYPES.ITokenHandler).to(CheMultiuserTokenHandler);
-
-if (JSON.parse(TestConstants.TS_SELENIUM_VALUE_OPENSHIFT_OAUTH)) {
- e2eContainer.bind(TYPES.CheLogin).to(RegularUserOcpCheLoginPage);
-} else {
- e2eContainer.bind(TYPES.CheLogin).to(MultiUserLoginPage);
-}
-
-e2eContainer.bind(CLASSES.BrowserTabsUtil).to(BrowserTabsUtil);
-e2eContainer.bind(CLASSES.ContextMenu).to(ContextMenu);
-e2eContainer.bind(CLASSES.DriverHelper).to(DriverHelper);
-e2eContainer.bind(CLASSES.Dashboard).to(Dashboard);
-e2eContainer.bind(CLASSES.Workspaces).to(Workspaces);
-e2eContainer.bind(CLASSES.WorkspaceDetails).to(WorkspaceDetails);
-e2eContainer.bind(CLASSES.WorkspaceDetailsPlugins).to(WorkspaceDetailsPlugins);
-e2eContainer.bind(CLASSES.Ide).to(Ide);
-e2eContainer.bind(CLASSES.ProjectTree).to(ProjectTree);
-e2eContainer.bind(CLASSES.Editor).to(Editor);
-e2eContainer.bind(CLASSES.TopMenu).to(TopMenu);
-e2eContainer.bind(CLASSES.QuickOpenContainer).to(QuickOpenContainer);
-e2eContainer.bind(CLASSES.PreviewWidget).to(PreviewWidget);
-e2eContainer.bind(CLASSES.GitPlugin).to(GitPlugin);
-e2eContainer.bind(CLASSES.RightToolBar).to(RightToolBar);
-e2eContainer.bind(CLASSES.LeftToolBar).to(LeftToolBar);
-e2eContainer.bind(CLASSES.Terminal).to(Terminal);
-e2eContainer.bind(CLASSES.DebugView).to(DebugView);
-e2eContainer.bind(CLASSES.DialogWindow).to(DialogWindow);
-e2eContainer.bind(CLASSES.ScreenCatcher).to(ScreenCatcher);
-e2eContainer.bind(CLASSES.OcpLoginPage).to(OcpLoginPage);
-e2eContainer.bind(CLASSES.OpenWorkspaceWidget).to(OpenWorkspaceWidget);
-e2eContainer.bind(CLASSES.CheLoginPage).to(CheLoginPage);
-e2eContainer.bind(CLASSES.NotificationCenter).to(NotificationCenter);
-e2eContainer.bind(CLASSES.PreferencesHandler).to(PreferencesHandler);
-e2eContainer.bind(CLASSES.CheApiRequestHandler).to(CheApiRequestHandler);
-e2eContainer.bind(CLASSES.CheGitApi).to(CheGitApi);
-e2eContainer.bind(CLASSES.GitHubUtil).to(GitHubUtil);
-e2eContainer.bind(CLASSES.OpenshiftPlugin).to(OpenshiftPlugin);
-e2eContainer.bind(CLASSES.CreateWorkspace).to(CreateWorkspace);
-e2eContainer.bind(CLASSES.OpenDialogWidget).to(OpenDialogWidget);
-e2eContainer.bind(CLASSES.UpdateAccountInformationPage).to(UpdateAccountInformationPage);
-e2eContainer.bind(CLASSES.KubernetesPlugin).to(KubernetesPlugin);
-e2eContainer.bind(CLASSES.PluginsView).to(PluginsView);
-e2eContainer.bind(CLASSES.LanguageServerTests).to(LanguageServerTests);
-e2eContainer.bind(CLASSES.CodeExecutionTests).to(CodeExecutionTests);
-e2eContainer.bind(CLASSES.ProjectAndFileTests).to(ProjectAndFileTests);
-e2eContainer.bind(CLASSES.WorkspaceHandlingTests).to(WorkspaceHandlingTests);
-
-export { e2eContainer };
diff --git a/tests/e2e/inversify.types.ts b/tests/e2e/inversify.types.ts
deleted file mode 100644
index 101f5aee78..0000000000
--- a/tests/e2e/inversify.types.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-const TYPES = {
- Driver: Symbol.for('Driver'),
- CheLogin: Symbol.for('CheLogin'),
- OcpLogin: Symbol.for('OcpLogin'),
- WorkspaceUtil: Symbol.for('WorkspaceUtil'),
- IAuthorizationHeaderHandler: Symbol.for('IAuthorizationHeaderHandler'),
- ITokenHandler: Symbol.for('ITokenHandler')
-
-
-};
-
-const CLASSES = {
- DriverHelper: 'DriverHelper',
- Dashboard: 'Dashboard',
- Workspaces: 'Workspaces',
- NewWorkspace: 'NewWorkspace',
- WorkspaceDetails: 'WorkspaceDetails',
- WorkspaceDetailsPlugins: 'WorkspaceDetailsPlugins',
- Ide: 'Ide',
- ProjectTree: 'ProjectTree',
- Editor: 'Editor',
- TopMenu: 'TopMenu',
- QuickOpenContainer: 'QuickOpenContainer',
- PreviewWidget: 'PreviewWidget',
- GitHubPlugin: 'GitHubPlugin',
- RightToolBar: 'RightToolBar',
- LeftToolBar: 'LeftToolBar',
- Terminal: 'Terminal',
- DebugView: 'DebugView',
- DialogWindow: 'DialogWindow',
- ScreenCatcher: 'ScreenCatcher',
- OpenshiftPlugin: 'OpenshiftPlugin',
- OcpLoginPage: 'OcpLoginPage',
- OpenWorkspaceWidget: 'OpenWorkspaceWidget',
- ContextMenu: 'ContextMenu',
- CheLoginPage: 'CheLoginPage',
- GitHubUtil: 'GitHubUtil',
- CheGitApi: 'CheGitApi',
- GitPlugin: 'GitPlugin',
- NotificationCenter: 'NotificationCenter',
- PreferencesHandler: 'PreferencesHandler',
- CheApiRequestHandler: 'CheApiRequestHandler',
- CreateWorkspace: 'CreateWorkspace',
- OpenDialogWidget: 'OpenDialogWidget',
- UpdateAccountInformationPage: 'UpdateAccountInformationPage',
- KubernetesPlugin: 'KubernetesPlugin',
- BrowserTabsUtil: 'BrowserTabsUtil',
- PluginsView: 'PluginsView',
- LanguageServerTests: 'LanguageServerTests',
- CodeExecutionTests: 'CodeExecutionTests',
- ProjectAndFileTests: 'ProjectAndFileTests',
- WorkspaceHandlingTests: 'WorkspaceHandlingTests'
-};
-
-export { TYPES, CLASSES };
diff --git a/tests/e2e/mocha-all-devfiles.opts b/tests/e2e/mocha-all-devfiles.opts
deleted file mode 100644
index 76172bc662..0000000000
--- a/tests/e2e/mocha-all-devfiles.opts
+++ /dev/null
@@ -1,8 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/devfiles/*.spec.js
---spec dist/tests/e2e/FactoryUrl.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-all-factories.opts b/tests/e2e/mocha-all-factories.opts
deleted file mode 100644
index 70e5c592ba..0000000000
--- a/tests/e2e/mocha-all-factories.opts
+++ /dev/null
@@ -1,11 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/e2e/DirectUrlFactoryWithKeepDirectoryTest.spec.js
---spec dist/tests/e2e/DirectUrlFactoryWithRootFolderTest.spec.js
---spec dist/tests/e2e/DirectUrlFactoryWithSpecificBranchTest.spec.js
---spec dist/tests/e2e/FactoryUrl.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-all-plugins.opts b/tests/e2e/mocha-all-plugins.opts
deleted file mode 100644
index 68c4c4b874..0000000000
--- a/tests/e2e/mocha-all-plugins.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/plugins/*.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-connector.opts b/tests/e2e/mocha-connector.opts
deleted file mode 100644
index 1fdca2bcba..0000000000
--- a/tests/e2e/mocha-connector.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e/OpenshiftConnector.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-devworkspace-happy-path.opts b/tests/e2e/mocha-devworkspace-happy-path.opts
deleted file mode 100644
index 0ad6731d45..0000000000
--- a/tests/e2e/mocha-devworkspace-happy-path.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-factory.opts b/tests/e2e/mocha-factory.opts
deleted file mode 100644
index 6465217452..0000000000
--- a/tests/e2e/mocha-factory.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/e2e/FactoryUrl.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-git-publish-branch.opts b/tests/e2e/mocha-git-publish-branch.opts
deleted file mode 100644
index 4ed9771cb6..0000000000
--- a/tests/e2e/mocha-git-publish-branch.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e/GitPublishBranch.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-git-ssh.opts b/tests/e2e/mocha-git-ssh.opts
deleted file mode 100644
index 2a730d1db1..0000000000
--- a/tests/e2e/mocha-git-ssh.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e/GitSsh.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-happy-path.opts b/tests/e2e/mocha-happy-path.opts
deleted file mode 100644
index da9f60600f..0000000000
--- a/tests/e2e/mocha-happy-path.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e_happy_path/HappyPath.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-java-vertx.opts b/tests/e2e/mocha-java-vertx.opts
deleted file mode 100644
index ffdc454ac2..0000000000
--- a/tests/e2e/mocha-java-vertx.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---spec dist/tests/login/Login.spec.js
---spec dist/tests/devfiles/JavaVertx.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha-load.opts b/tests/e2e/mocha-load.opts
deleted file mode 100644
index 3d33ec3270..0000000000
--- a/tests/e2e/mocha-load.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/load_test/LoadTest.spec
---require source-map-support/register
diff --git a/tests/e2e/mocha-single-devfile.opts b/tests/e2e/mocha-single-devfile.opts
deleted file mode 100644
index 0a2258df91..0000000000
--- a/tests/e2e/mocha-single-devfile.opts
+++ /dev/null
@@ -1,6 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---full-trace
---bail
---require source-map-support/register
diff --git a/tests/e2e/mocha-wkspc-creation-and-ls.opts b/tests/e2e/mocha-wkspc-creation-and-ls.opts
deleted file mode 100644
index 20b84fc69c..0000000000
--- a/tests/e2e/mocha-wkspc-creation-and-ls.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 2200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e/WorkspaceCreationAndLsInitialization.spec.js
---require source-map-support/register
diff --git a/tests/e2e/mocha.intelij.opts b/tests/e2e/mocha.intelij.opts
deleted file mode 100644
index ca564193c5..0000000000
--- a/tests/e2e/mocha.intelij.opts
+++ /dev/null
@@ -1,7 +0,0 @@
---timeout 1200000
--u tdd
---bail
---full-trace
---reporter './dist/driver/CheReporter.js'
---spec './dist/tests/login/Login.spec.js'
---spec './dist/tests/intelij/IntelijOpenWorkspace.spec.js'
diff --git a/tests/e2e/mocha.ocp.link.opts b/tests/e2e/mocha.ocp.link.opts
deleted file mode 100644
index e6b58c2ec1..0000000000
--- a/tests/e2e/mocha.ocp.link.opts
+++ /dev/null
@@ -1,6 +0,0 @@
---timeout 1200000
--u tdd
---bail
---full-trace
---reporter './dist/driver/CheReporter.js'
---spec './dist/tests/login/LinkCheAndOcpUsers.spec.js'
diff --git a/tests/e2e/mocha.opts b/tests/e2e/mocha.opts
deleted file mode 100644
index 5b3156646c..0000000000
--- a/tests/e2e/mocha.opts
+++ /dev/null
@@ -1,6 +0,0 @@
---timeout 1200000
---reporter 'dist/driver/CheReporter.js'
--u tdd
---bail
---full-trace
---spec dist/tests/e2e/*.spec.js
diff --git a/tests/e2e/mocha.single.plugin.opts b/tests/e2e/mocha.single.plugin.opts
deleted file mode 100644
index aa3f710d2b..0000000000
--- a/tests/e2e/mocha.single.plugin.opts
+++ /dev/null
@@ -1,5 +0,0 @@
---timeout 1200000
--u tdd
---bail
---full-trace
---reporter './dist/driver/CheReporter.js'
diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json
deleted file mode 100644
index 026df9e58f..0000000000
--- a/tests/e2e/package-lock.json
+++ /dev/null
@@ -1,1852 +0,0 @@
-{
- "name": "e2e",
- "version": "1.0.0",
- "lockfileVersion": 1,
- "requires": true,
- "dependencies": {
- "@eclipse-che/api": {
- "version": "7.5.0-SNAPSHOT",
- "resolved": "https://registry.npmjs.org/@eclipse-che/api/-/api-7.5.0-SNAPSHOT.tgz",
- "integrity": "sha1-vwxb5gNU40xzvFKy4YvoaAzo2QA="
- },
- "@nodelib/fs.scandir": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
- "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==",
- "dev": true,
- "requires": {
- "@nodelib/fs.stat": "2.0.4",
- "run-parallel": "^1.1.9"
- }
- },
- "@nodelib/fs.stat": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
- "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
- "dev": true
- },
- "@nodelib/fs.walk": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz",
- "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==",
- "dev": true,
- "requires": {
- "@nodelib/fs.scandir": "2.1.4",
- "fastq": "^1.6.0"
- }
- },
- "@testim/chrome-version": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.0.7.tgz",
- "integrity": "sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw==",
- "dev": true
- },
- "@types/chai": {
- "version": "4.1.7",
- "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.1.7.tgz",
- "integrity": "sha512-2Y8uPt0/jwjhQ6EiluT0XCri1Dbplr0ZxfFXUz+ye13gaqE8u5gL5ppao1JrUYr9cIip5S6MvQzBS7Kke7U9VA==",
- "dev": true
- },
- "@types/events": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
- "integrity": "sha1-KGLz9Yqaf3w+eNefEw3U1xwlwqc=",
- "dev": true
- },
- "@types/glob": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
- "integrity": "sha1-qlmhxuP7xCHgfM0xqUTDDrpSFXU=",
- "dev": true,
- "requires": {
- "@types/events": "*",
- "@types/minimatch": "*",
- "@types/node": "*"
- }
- },
- "@types/minimatch": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
- "integrity": "sha1-PcoOPzOyAPx9ETnAzZbBJoyt/Z0=",
- "dev": true
- },
- "@types/mocha": {
- "version": "5.2.6",
- "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz",
- "integrity": "sha512-1axi39YdtBI7z957vdqXI4Ac25e7YihYQtJa+Clnxg1zTJEaIRbndt71O3sP4GAMgiAm0pY26/b9BrY4MR/PMw==",
- "dev": true
- },
- "@types/node": {
- "version": "11.13.4",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.4.tgz",
- "integrity": "sha1-+D7Dw+BbF0tyQfretmiCZ/5bIso=",
- "dev": true
- },
- "@types/rimraf": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.2.tgz",
- "integrity": "sha512-Hm/bnWq0TCy7jmjeN5bKYij9vw5GrDFWME4IuxV08278NtU/VdGbzsBohcCUJ7+QMqmUq5hpRKB39HeQWJjztQ==",
- "dev": true,
- "requires": {
- "@types/glob": "*",
- "@types/node": "*"
- }
- },
- "@types/selenium-webdriver": {
- "version": "3.0.16",
- "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz",
- "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==",
- "dev": true
- },
- "@types/yauzl": {
- "version": "2.9.1",
- "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz",
- "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==",
- "dev": true,
- "optional": true,
- "requires": {
- "@types/node": "*"
- }
- },
- "agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dev": true,
- "requires": {
- "debug": "4"
- }
- },
- "aggregate-error": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
- "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
- "dev": true,
- "requires": {
- "clean-stack": "^2.0.0",
- "indent-string": "^4.0.0"
- }
- },
- "ansi-colors": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
- "integrity": "sha1-V9NbhoboUeLMBMQD8cACA5dqGBM=",
- "dev": true
- },
- "ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
- "dev": true
- },
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
- "dev": true,
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha1-xV7PAhheJGklk5kxDBc84xIzsUI=",
- "dev": true,
- "requires": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- }
- },
- "arg": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
- "integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
- "dev": true
- },
- "argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=",
- "dev": true,
- "requires": {
- "sprintf-js": "~1.0.2"
- }
- },
- "array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
- "dev": true
- },
- "assertion-error": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
- "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=",
- "dev": true
- },
- "axios": {
- "version": "0.21.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
- "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
- "dev": true,
- "requires": {
- "follow-redirects": "^1.10.0"
- },
- "dependencies": {
- "follow-redirects": {
- "version": "1.13.1",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
- "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
- "dev": true
- }
- }
- },
- "babel-code-frame": {
- "version": "6.26.0",
- "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
- "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
- "dev": true,
- "requires": {
- "chalk": "^1.1.3",
- "esutils": "^2.0.2",
- "js-tokens": "^3.0.2"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "dev": true
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dev": true,
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "dev": true
- }
- }
- },
- "balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
- "dev": true
- },
- "binary-extensions": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
- "integrity": "sha1-I8DfFPaogHf1+YbA0WfsA8PVU3w=",
- "dev": true
- },
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
- "dev": true,
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha1-NFThpGLujVmeI23zNs2epPiv4Qc=",
- "dev": true,
- "requires": {
- "fill-range": "^7.0.1"
- }
- },
- "browser-stdout": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
- "integrity": "sha1-uqVZ7hTO1zRSIputcyZGfGH6vWA=",
- "dev": true
- },
- "buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
- "dev": true
- },
- "buffer-from": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=",
- "dev": true
- },
- "builtin-modules": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
- "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
- "dev": true
- },
- "camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=",
- "dev": true
- },
- "chai": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
- "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
- "dev": true,
- "requires": {
- "assertion-error": "^1.1.0",
- "check-error": "^1.0.2",
- "deep-eql": "^3.0.1",
- "get-func-name": "^2.0.0",
- "pathval": "^1.1.0",
- "type-detect": "^4.0.5"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- },
- "dependencies": {
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
- }
- },
- "check-error": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
- "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
- "dev": true
- },
- "chokidar": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
- "integrity": "sha1-EsBxRmjFWAD2WeJi1JYql/r1VKY=",
- "dev": true,
- "requires": {
- "anymatch": "~3.1.1",
- "braces": "~3.0.2",
- "fsevents": "~2.1.1",
- "glob-parent": "~5.1.0",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.2.0"
- }
- },
- "chromedriver": {
- "version": "89.0.0",
- "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-89.0.0.tgz",
- "integrity": "sha512-+DVYp3+m6tZUYTMl9fEgCZIDk9YBTcHws82nIV1JYwusu51zRITA0oeNzuPyFhuK7ageFnnKCDviH2BL5I4M0w==",
- "dev": true,
- "requires": {
- "@testim/chrome-version": "^1.0.7",
- "axios": "^0.21.1",
- "del": "^6.0.0",
- "extract-zip": "^2.0.1",
- "https-proxy-agent": "^5.0.0",
- "mkdirp": "^1.0.4",
- "proxy-from-env": "^1.1.0",
- "tcp-port-used": "^1.0.1"
- }
- },
- "clean-stack": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
- "dev": true
- },
- "cliui": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
- "integrity": "sha1-3u/P2y6AB4SqNPRvoI4GhRx7u8U=",
- "dev": true,
- "requires": {
- "string-width": "^3.1.0",
- "strip-ansi": "^5.2.0",
- "wrap-ansi": "^5.1.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=",
- "dev": true,
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
- },
- "commander": {
- "version": "2.20.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
- "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
- "dev": true
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "dev": true
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
- "dev": true
- },
- "debug": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
- "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
- "requires": {
- "ms": "2.1.2"
- }
- },
- "decamelize": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
- "dev": true
- },
- "deep-eql": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
- "integrity": "sha1-38lARACtHI/gI+faHfHBR8S0RN8=",
- "dev": true,
- "requires": {
- "type-detect": "^4.0.0"
- }
- },
- "deep-is": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
- "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
- "dev": true
- },
- "define-properties": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
- "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=",
- "dev": true,
- "requires": {
- "object-keys": "^1.0.12"
- }
- },
- "del": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
- "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
- "dev": true,
- "requires": {
- "globby": "^11.0.1",
- "graceful-fs": "^4.2.4",
- "is-glob": "^4.0.1",
- "is-path-cwd": "^2.2.0",
- "is-path-inside": "^3.0.2",
- "p-map": "^4.0.0",
- "rimraf": "^3.0.2",
- "slash": "^3.0.0"
- },
- "dependencies": {
- "rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- }
- }
- },
- "diff": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
- "integrity": "sha1-gAwN0eCov7yVg1wgKtIg/jF+WhI=",
- "dev": true
- },
- "dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dev": true,
- "requires": {
- "path-type": "^4.0.0"
- }
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=",
- "dev": true
- },
- "end-of-stream": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "dev": true,
- "requires": {
- "once": "^1.4.0"
- }
- },
- "es-abstract": {
- "version": "1.17.5",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
- "integrity": "sha1-2MnR1myJgfuSAOIlHXme7pJ3Suk=",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.1.5",
- "is-regex": "^1.0.5",
- "object-inspect": "^1.7.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.0",
- "string.prototype.trimleft": "^2.1.1",
- "string.prototype.trimright": "^2.1.1"
- }
- },
- "es-to-primitive": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
- "integrity": "sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo=",
- "dev": true,
- "requires": {
- "is-callable": "^1.1.4",
- "is-date-object": "^1.0.1",
- "is-symbol": "^1.0.2"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
- },
- "esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=",
- "dev": true
- },
- "esutils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
- "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
- "dev": true
- },
- "extract-zip": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
- "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
- "dev": true,
- "requires": {
- "@types/yauzl": "^2.9.1",
- "debug": "^4.1.1",
- "get-stream": "^5.1.0",
- "yauzl": "^2.10.0"
- }
- },
- "fast-glob": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
- "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
- "dev": true,
- "requires": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.0",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.2",
- "picomatch": "^2.2.1"
- }
- },
- "fastq": {
- "version": "1.11.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",
- "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==",
- "dev": true,
- "requires": {
- "reusify": "^1.0.4"
- }
- },
- "fd-slicer": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
- "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
- "dev": true,
- "requires": {
- "pend": "~1.2.0"
- }
- },
- "fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha1-GRmmp8df44ssfHflGYU12prN2kA=",
- "dev": true,
- "requires": {
- "to-regex-range": "^5.0.1"
- }
- },
- "find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha1-SRafHXmTQwZG2mHsxa41XCHJe3M=",
- "dev": true,
- "requires": {
- "locate-path": "^3.0.0"
- }
- },
- "flat": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
- "integrity": "sha1-CQvsiwXjnLowl0fx1YjwTbr5jbI=",
- "dev": true,
- "requires": {
- "is-buffer": "~2.0.3"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
- },
- "fsevents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
- "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
- "dev": true,
- "optional": true
- },
- "function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=",
- "dev": true
- },
- "get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha1-T5RBKoLbMvNuOwuXQfipf+sDH34=",
- "dev": true
- },
- "get-func-name": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
- "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
- "dev": true
- },
- "get-stream": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
- "glob": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "glob-parent": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
- "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
- "dev": true,
- "requires": {
- "is-glob": "^4.0.1"
- }
- },
- "globby": {
- "version": "11.0.3",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz",
- "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==",
- "dev": true,
- "requires": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.1.1",
- "ignore": "^5.1.4",
- "merge2": "^1.3.0",
- "slash": "^3.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.2.6",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
- "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
- "dev": true
- },
- "growl": {
- "version": "1.10.5",
- "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
- "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=",
- "dev": true
- },
- "has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=",
- "dev": true,
- "requires": {
- "function-bind": "^1.1.1"
- }
- },
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "dev": true,
- "requires": {
- "ansi-regex": "^2.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "dev": true
- }
- }
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
- },
- "has-symbols": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
- "integrity": "sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg=",
- "dev": true
- },
- "he": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
- "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
- "dev": true
- },
- "https-proxy-agent": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
- "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
- "dev": true,
- "requires": {
- "agent-base": "6",
- "debug": "4"
- }
- },
- "ignore": {
- "version": "5.1.8",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
- "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
- "dev": true
- },
- "immediate": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
- "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=",
- "dev": true
- },
- "indent-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
- "dev": true
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dev": true,
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
- "inversify": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.1.tgz",
- "integrity": "sha1-UA1wmxQ0iWzloNWJFcSkIQ40+24="
- },
- "ip-regex": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz",
- "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==",
- "dev": true
- },
- "is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=",
- "dev": true,
- "requires": {
- "binary-extensions": "^2.0.0"
- }
- },
- "is-buffer": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
- "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
- "dev": true
- },
- "is-callable": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
- "integrity": "sha1-9+RrWWiQRW23Tn9ul2yzJz0G+qs=",
- "dev": true
- },
- "is-date-object": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
- "integrity": "sha1-vac28s2P0G0yhE53Q7+nSUw7/X4=",
- "dev": true
- },
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- },
- "is-glob": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
- "integrity": "sha1-dWfb6fL14kZ7x3q4PEopSCQHpdw=",
- "dev": true,
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
- "is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=",
- "dev": true
- },
- "is-path-cwd": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
- "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
- "dev": true
- },
- "is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "dev": true
- },
- "is-regex": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
- "integrity": "sha1-OdWJo1i/GJZ/cmlnEguPwa7XTq4=",
- "dev": true,
- "requires": {
- "has": "^1.0.3"
- }
- },
- "is-symbol": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
- "integrity": "sha1-OOEBS55jKb4N6dJKQU/XRB7GGTc=",
- "dev": true,
- "requires": {
- "has-symbols": "^1.0.1"
- }
- },
- "is-url": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
- "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==",
- "dev": true
- },
- "is2": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/is2/-/is2-2.0.6.tgz",
- "integrity": "sha512-+Z62OHOjA6k2sUDOKXoZI3EXv7Fb1K52jpTBLbkfx62bcUeSsrTBLhEquCRDKTx0XE5XbHcG/S2vrtE3lnEDsQ==",
- "dev": true,
- "requires": {
- "deep-is": "^0.1.3",
- "ip-regex": "^4.1.0",
- "is-url": "^1.2.4"
- }
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
- "dev": true
- },
- "isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
- "dev": true
- },
- "js-tokens": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
- "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
- "dev": true
- },
- "js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha1-r/FRswv9+o5J4F2iLnQV6d+jeEc=",
- "dev": true,
- "requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- }
- },
- "jszip": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.2.2.tgz",
- "integrity": "sha512-NmKajvAFQpbg3taXQXr/ccS2wcucR1AZ+NtyWp2Nq7HHVsXhcJFR8p0Baf32C2yVvBylFWVeKf+WI2AnvlPhpA==",
- "dev": true,
- "requires": {
- "lie": "~3.3.0",
- "pako": "~1.0.2",
- "readable-stream": "~2.3.6",
- "set-immediate-shim": "~1.0.1"
- }
- },
- "lie": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
- "integrity": "sha1-3Pgt7lRfRgdNryAMfBxaCOD0D2o=",
- "dev": true,
- "requires": {
- "immediate": "~3.0.5"
- }
- },
- "locate-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha1-2+w7OrdZdYBxtY/ln8QYca8hQA4=",
- "dev": true,
- "requires": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
- }
- },
- "lodash": {
- "version": "4.17.19",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
- "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
- "dev": true
- },
- "log-symbols": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
- "integrity": "sha1-86CFFqXeqJMzan3uFNGKHP2rd8Q=",
- "dev": true,
- "requires": {
- "chalk": "^2.4.2"
- }
- },
- "make-error": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
- "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
- "dev": true
- },
- "merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "dev": true
- },
- "micromatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
- "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
- "dev": true,
- "requires": {
- "braces": "^3.0.1",
- "picomatch": "^2.0.5"
- }
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
- "dev": true,
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "dev": true
- },
- "mocha": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
- "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==",
- "dev": true,
- "requires": {
- "ansi-colors": "3.2.3",
- "browser-stdout": "1.3.1",
- "chokidar": "3.3.0",
- "debug": "3.2.6",
- "diff": "3.5.0",
- "escape-string-regexp": "1.0.5",
- "find-up": "3.0.0",
- "glob": "7.1.3",
- "growl": "1.10.5",
- "he": "1.2.0",
- "js-yaml": "3.13.1",
- "log-symbols": "3.0.0",
- "minimatch": "3.0.4",
- "mkdirp": "0.5.3",
- "ms": "2.1.1",
- "node-environment-flags": "1.0.6",
- "object.assign": "4.1.0",
- "strip-json-comments": "2.0.1",
- "supports-color": "6.0.0",
- "which": "1.3.1",
- "wide-align": "1.1.3",
- "yargs": "13.3.2",
- "yargs-parser": "13.1.2",
- "yargs-unparser": "1.6.0"
- },
- "dependencies": {
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha1-6D0X3hbYp++3cX7b5fsQE17uYps=",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "mkdirp": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
- "integrity": "sha1-WlFLcXklkoeVKIHpRBDsVGVln4w=",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5"
- },
- "dependencies": {
- "minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
- }
- }
- },
- "ms": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=",
- "dev": true
- }
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- },
- "node-environment-flags": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
- "integrity": "sha1-owrBNiH299Z0JgpU3t4EjDmCwIg=",
- "dev": true,
- "requires": {
- "object.getownpropertydescriptors": "^2.0.3",
- "semver": "^5.7.0"
- }
- },
- "normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=",
- "dev": true
- },
- "object-inspect": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
- "integrity": "sha1-9Pa9GBrXfwBrXs5gvQtvOY/3Smc=",
- "dev": true
- },
- "object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=",
- "dev": true
- },
- "object.assign": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
- "integrity": "sha1-lovxEA15Vrs8oIbwBvhGs7xACNo=",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.2",
- "function-bind": "^1.1.1",
- "has-symbols": "^1.0.0",
- "object-keys": "^1.0.11"
- }
- },
- "object.getownpropertydescriptors": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
- "integrity": "sha1-Npvx+VktiridcS3O1cuBx8U1Jkk=",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- }
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
- "requires": {
- "wrappy": "1"
- }
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
- "dev": true
- },
- "p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE=",
- "dev": true,
- "requires": {
- "p-try": "^2.0.0"
- }
- },
- "p-locate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha1-Mi1poFwCZLJZl9n0DNiokasAZKQ=",
- "dev": true,
- "requires": {
- "p-limit": "^2.0.0"
- }
- },
- "p-map": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
- "dev": true,
- "requires": {
- "aggregate-error": "^3.0.0"
- }
- },
- "p-try": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=",
- "dev": true
- },
- "pako": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz",
- "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==",
- "dev": true
- },
- "path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "dev": true
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "dev": true
- },
- "path-parse": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=",
- "dev": true
- },
- "path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "dev": true
- },
- "pathval": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
- "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
- "dev": true
- },
- "pend": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
- "dev": true
- },
- "picomatch": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz",
- "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==",
- "dev": true
- },
- "process-nextick-args": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
- "dev": true
- },
- "proxy-from-env": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "dev": true
- },
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
- "requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "dev": true
- },
- "readable-stream": {
- "version": "2.3.6",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
- "dev": true,
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "readdirp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
- "integrity": "sha1-wwwzNSsSyW37S4lUIaSf1alZODk=",
- "dev": true,
- "requires": {
- "picomatch": "^2.0.4"
- }
- },
- "reflect-metadata": {
- "version": "0.1.13",
- "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
- "integrity": "sha1-Z648pXyXKiqhZCsQ/jY/4y1J3Ag="
- },
- "require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "dev": true
- },
- "require-main-filename": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
- "integrity": "sha1-0LMp7MfMD2Fkn2IhW+aa9UqomJs=",
- "dev": true
- },
- "resolve": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
- "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
- "dev": true,
- "requires": {
- "path-parse": "^1.0.6"
- }
- },
- "reusify": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
- "dev": true
- },
- "rimraf": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=",
- "dev": true,
- "requires": {
- "glob": "^7.0.5"
- }
- },
- "run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "dev": true,
- "requires": {
- "queue-microtask": "^1.2.2"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=",
- "dev": true
- },
- "sax": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=",
- "dev": true
- },
- "selenium-webdriver": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz",
- "integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==",
- "dev": true,
- "requires": {
- "jszip": "^3.1.3",
- "rimraf": "^2.5.4",
- "tmp": "0.0.30",
- "xml2js": "^0.4.17"
- }
- },
- "semver": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
- "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
- "dev": true
- },
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
- "dev": true
- },
- "set-immediate-shim": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
- "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
- "dev": true
- },
- "slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "dev": true
- },
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
- "dev": true
- },
- "source-map-support": {
- "version": "0.5.12",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
- "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
- "dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
- "sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
- "dev": true
- },
- "string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=",
- "dev": true,
- "requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- }
- },
- "string.prototype.trimend": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz",
- "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5"
- }
- },
- "string.prototype.trimleft": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
- "integrity": "sha1-RAiqLl1t3QyagHObCH+8BnwDs8w=",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5",
- "string.prototype.trimstart": "^1.0.0"
- }
- },
- "string.prototype.trimright": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
- "integrity": "sha1-x28c7zDyG7rYr+uNsVEUls+w8qM=",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5",
- "string.prototype.trimend": "^1.0.0"
- }
- },
- "string.prototype.trimstart": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz",
- "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
- "dev": true,
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- },
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
- "dev": true
- },
- "supports-color": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
- "integrity": "sha1-ds/nQs8fQbubHCmtAwaMBbTA5Ao=",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
- "tcp-port-used": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tcp-port-used/-/tcp-port-used-1.0.2.tgz",
- "integrity": "sha512-l7ar8lLUD3XS1V2lfoJlCBaeoaWo/2xfYt81hM7VlvR4RrMVFqfmzfhLVk40hAb368uitje5gPtBRL1m/DGvLA==",
- "dev": true,
- "requires": {
- "debug": "4.3.1",
- "is2": "^2.0.6"
- }
- },
- "tmp": {
- "version": "0.0.30",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz",
- "integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=",
- "dev": true,
- "requires": {
- "os-tmpdir": "~1.0.1"
- }
- },
- "to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=",
- "dev": true,
- "requires": {
- "is-number": "^7.0.0"
- }
- },
- "ts-node": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.3.tgz",
- "integrity": "sha512-2qayBA4vdtVRuDo11DEFSsD/SFsBXQBRZZhbRGSIkmYmVkWjULn/GGMdG10KVqkaGndljfaTD8dKjWgcejO8YA==",
- "dev": true,
- "requires": {
- "arg": "^4.1.0",
- "diff": "^3.1.0",
- "make-error": "^1.1.1",
- "source-map-support": "^0.5.6",
- "yn": "^3.0.0"
- }
- },
- "tslib": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
- "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
- "dev": true
- },
- "tslint": {
- "version": "5.10.0",
- "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.10.0.tgz",
- "integrity": "sha1-EeJrzLiK+gLdDZlWyuPUVAtfVMM=",
- "dev": true,
- "requires": {
- "babel-code-frame": "^6.22.0",
- "builtin-modules": "^1.1.1",
- "chalk": "^2.3.0",
- "commander": "^2.12.1",
- "diff": "^3.2.0",
- "glob": "^7.1.1",
- "js-yaml": "^3.7.0",
- "minimatch": "^3.0.4",
- "resolve": "^1.3.2",
- "semver": "^5.3.0",
- "tslib": "^1.8.0",
- "tsutils": "^2.12.1"
- }
- },
- "tsutils": {
- "version": "2.29.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
- "integrity": "sha1-MrSIUBRnrL7dS4VJhnOggSrKC5k=",
- "dev": true,
- "requires": {
- "tslib": "^1.8.1"
- }
- },
- "tunnel": {
- "version": "0.0.4",
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz",
- "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=",
- "dev": true
- },
- "type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=",
- "dev": true
- },
- "typed-rest-client": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.2.0.tgz",
- "integrity": "sha512-FrUshzZ1yxH8YwGR29PWWnfksLEILbWJydU7zfIRkyH7kAEzB62uMAl2WY6EyolWpLpVHeJGgQm45/MaruaHpw==",
- "dev": true,
- "requires": {
- "tunnel": "0.0.4",
- "underscore": "1.8.3"
- }
- },
- "typescript": {
- "version": "3.9.9",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
- "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
- "dev": true
- },
- "underscore": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
- "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
- "dev": true
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
- "dev": true
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=",
- "dev": true,
- "requires": {
- "isexe": "^2.0.0"
- }
- },
- "which-module": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
- "dev": true
- },
- "wide-align": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
- "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=",
- "dev": true,
- "requires": {
- "string-width": "^1.0.2 || 2"
- }
- },
- "wrap-ansi": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
- "integrity": "sha1-H9H2cjXVttD+54EFYAG/tpTAOwk=",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.0",
- "string-width": "^3.0.0",
- "strip-ansi": "^5.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
- },
- "xml2js": {
- "version": "0.4.21",
- "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.21.tgz",
- "integrity": "sha512-gHRSAYBSA1JNVbLV2l8mTpQ/zTLcNtyG4YZmNlA3pjMWTgv9swW9muK55cr3fUmSOezLTR24iPQ+FqxilTvppw==",
- "dev": true,
- "requires": {
- "sax": ">=0.6.0",
- "xmlbuilder": "~13.0.0"
- }
- },
- "xmlbuilder": {
- "version": "13.0.2",
- "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz",
- "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==",
- "dev": true
- },
- "y18n": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.2.tgz",
- "integrity": "sha512-DnBDwcL54b5xWMM/7RfFg4xs5amYxq2ot49aUfLjQSAracXkGvlZq0txzqr3Pa6Q0ayuCxBcwTzrPUScKY0O8w==",
- "dev": true
- },
- "yargs": {
- "version": "13.3.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
- "integrity": "sha1-rX/+/sGqWVZayRX4Lcyzipwxot0=",
- "dev": true,
- "requires": {
- "cliui": "^5.0.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^2.0.1",
- "require-directory": "^2.1.1",
- "require-main-filename": "^2.0.0",
- "set-blocking": "^2.0.0",
- "string-width": "^3.0.0",
- "which-module": "^2.0.0",
- "y18n": "^4.0.0",
- "yargs-parser": "^13.1.2"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha1-InZ74htirxCBV0MG9prFG2IgOWE=",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "yargs-parser": {
- "version": "13.1.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
- "integrity": "sha1-Ew8JcC667vJlDVTObj5XBvek+zg=",
- "dev": true,
- "requires": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- }
- },
- "yargs-unparser": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
- "integrity": "sha1-7yXCx2n/a9CeSw+dfGBfsnhG6p8=",
- "dev": true,
- "requires": {
- "flat": "^4.1.0",
- "lodash": "^4.17.15",
- "yargs": "^13.3.0"
- }
- },
- "yauzl": {
- "version": "2.10.0",
- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
- "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
- "dev": true,
- "requires": {
- "buffer-crc32": "~0.2.3",
- "fd-slicer": "~1.1.0"
- }
- },
- "yn": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
- "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
- "dev": true
- }
- }
-}
diff --git a/tests/e2e/package.json b/tests/e2e/package.json
deleted file mode 100644
index c0d6031d40..0000000000
--- a/tests/e2e/package.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "name": "e2e",
- "version": "1.0.0",
- "description": "",
- "main": "dist/index.js",
- "scripts": {
- "cleanup-docker": "if [ $(docker ps -a | grep -c selenium-e2e) -gt 0 ]; then docker rm -f $(docker ps --filter \"name=selenium-e2e\" -aq); fi;",
- "test-docker": "npm run cleanup-docker && docker run -it --shm-size=2g -p 5920:5920 --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL eclipse/che-e2e:nightly",
- "test-docker-mount-e2e": "npm run cleanup-docker && docker run -it --shm-size=2g -p 5920:5920 --name selenium-e2e -e TS_SELENIUM_BASE_URL=$TS_SELENIUM_BASE_URL -v $(pwd):/tmp/e2e:Z eclipse/che-e2e:nightly",
- "test": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha.opts",
- "load-test": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-load.opts",
- "test-happy-path": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-happy-path.opts",
- "test-devworkspace-happy-path": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-devworkspace-happy-path.opts",
- "test-wkspc-creation-and-ls": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-wkspc-creation-and-ls.opts",
- "test-java-vertx": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-java-vertx.opts",
- "test-git-ssh": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-git-ssh.opts",
- "test-git-publish-branch": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-git-publish-branch.opts",
- "test-openshift-connector": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-connector.opts",
- "test-all-devfiles": "./generateIndex.sh && ./initDevfileTests.sh",
- "test-factory": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-factory.opts",
- "test-all-factories": "./generateIndex.sh && npm run lint && npm run tsc && mocha --opts mocha-all-factories.opts",
- "test-intelij": "tsc && mocha --opts mocha.intelij.opts",
- "test-oauth": "tsc && mocha --opts mocha.ocp.link.opts",
- "lint": "tslint --fix -p .",
- "tsc": "tsc -p .",
- "init-mocha-opts": "tsc && mocha --opts mocha-single-devfile.opts --spec dist/tests/login/Login.spec.js",
- "test-plugin": "npm run init-mocha-opts -- --spec dist/tests/plugins/${USERSTORY}.spec.js",
- "test-plugin-ci": "export TS_DELETE_PLUGINS_TEST_WORKSPACE=false && npm run init-mocha-opts -- --spec dist/tests/plugins/${USERSTORY}.spec.js",
- "test-all-plugins": "tsc && mocha --opts mocha-all-plugins.opts"
- },
- "author": "Ihor Okhrimenko (iokhrime@redhat.com)",
- "license": "ISC",
- "devDependencies": {
- "@types/chai": "4.1.7",
- "@types/mocha": "5.2.6",
- "@types/node": "11.13.4",
- "@types/rimraf": "2.0.2",
- "@types/selenium-webdriver": "3.0.16",
- "axios": "0.21.1",
- "chai": "4.2.0",
- "chromedriver": "89.0.0",
- "mocha": "7.1.1",
- "rimraf": "2.6.2",
- "selenium-webdriver": "3.6.0",
- "ts-node": "8.0.3",
- "tslint": "5.10.0",
- "typed-rest-client": "1.2.0",
- "typescript": "3.9.9"
- },
- "dependencies": {
- "@eclipse-che/api": "7.5.0-SNAPSHOT",
- "inversify": "5.0.1",
- "reflect-metadata": "0.1.13"
- },
- "resolutions": {
- "minimist": "^1.2.5"
- }
-}
diff --git a/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts b/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts
deleted file mode 100644
index 0ddd2a84dd..0000000000
--- a/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class CreateWorkspace {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitTitleContains(expectedText: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`CreateWorkspace.waitTitleContains text: "${expectedText}"`);
-
- const pageTitleLocator: By = By.xpath(`//h1[contains(text(), '${expectedText}')]`);
-
- await this.driverHelper.waitVisibility(pageTitleLocator, timeout);
- }
-
- async waitPage(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug('CreateWorkspace.waitPage');
-
- await this.waitTitleContains('Create Workspace', timeout);
- }
-
- async waitSample(sampleName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`CreateWorkspace.waitSample sampleName: "${sampleName}"`);
-
- const sampleLocator: By = this.getSampleLocator(sampleName);
-
- await this.driverHelper.waitVisibility(sampleLocator, timeout);
- }
-
- async clickOnSample(sampleName: string, timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug(`CreateWorkspace.clickOnSample sampleName: "${sampleName}"`);
-
- const sampleLocator: By = this.getSampleLocator(sampleName);
-
- await this.driverHelper.waitAndClick(sampleLocator, timeout);
- }
-
- private getSampleLocator(sampleName: string): By {
- Logger.trace(`CreateWorkspace.getSampleLocator sampleName: ${sampleName}`);
-
- return By.xpath(`//article[contains(@class, 'sample-card')]//div[text()='${sampleName}']`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/dashboard/Dashboard.ts b/tests/e2e/pageobjects/dashboard/Dashboard.ts
deleted file mode 100644
index 705ba11e58..0000000000
--- a/tests/e2e/pageobjects/dashboard/Dashboard.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { inject, injectable } from 'inversify';
-import 'reflect-metadata';
-import { CLASSES } from '../../inversify.types';
-import { By } from 'selenium-webdriver';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestConstants } from '../../TestConstants';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { Workspaces } from './Workspaces';
-import { Logger } from '../../utils/Logger';
-
-@injectable()
-export class Dashboard {
- private static readonly WORKSPACES_BUTTON_XPATH: string = `//div[@id='page-sidebar']//a[contains(text(), 'Workspaces (')]`;
- private static readonly CREATE_WORKSPACE_BUTTON_XPATH: string = `//div[@id='page-sidebar']//a[text()='Create Workspace']`;
- private static readonly LOADER_PAGE_CSS: string = '.main-page-loader';
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Workspaces) private readonly workspaces: Workspaces) { }
-
- async stopWorkspaceByUI(workspaceName: string) {
- Logger.debug(`Dashboard.stopWorkspaceByUI "${workspaceName}"`);
-
- await this.openDashboard();
- await this.clickWorkspacesButton();
- await this.workspaces.waitPage();
- await this.workspaces.waitWorkspaceListItem(workspaceName);
- await this.workspaces.waitWorkspaceWithRunningStatus(workspaceName);
-
- await this.workspaces.stopWorkspaceByActionsButton(workspaceName);
- await this.workspaces.waitWorkspaceWithStoppedStatus(workspaceName);
- }
-
- async deleteWorkspaceByUI(workspaceName: string) {
- Logger.debug(`Dashboard.deleteWorkspaceByUI "${workspaceName}"`);
-
- await this.openDashboard();
- await this.clickWorkspacesButton();
- await this.workspaces.waitPage();
- await this.workspaces.waitWorkspaceListItem(workspaceName);
- await this.workspaces.deleteWorkspaceByActionsButton(workspaceName);
- await this.workspaces.waitPage();
- await this.workspaces.waitWorkspaceListItemAbcence(workspaceName);
- }
-
- async stopAndRemoveWorkspaceByUI(workspaceName: string) {
- Logger.debug(`Dashboard.stopAndRemoveWorkspaceByUI "${workspaceName}"`);
-
- await this.openDashboard();
- await this.clickWorkspacesButton();
- await this.workspaces.waitPage();
- await this.workspaces.waitWorkspaceListItem(workspaceName);
- await this.workspaces.waitWorkspaceWithRunningStatus(workspaceName);
-
- await this.workspaces.stopWorkspaceByActionsButton(workspaceName);
- await this.workspaces.waitWorkspaceWithStoppedStatus(workspaceName);
- await this.workspaces.deleteWorkspaceByActionsButton(workspaceName);
- await this.workspaces.waitWorkspaceListItemAbcence(workspaceName);
- }
-
- async openDashboard() {
- Logger.debug('Dashboard.openDashboard');
-
- await this.driverHelper.getDriver().navigate().to(TestConstants.TS_SELENIUM_BASE_URL);
- await this.waitPage();
-
- }
-
- async waitPage(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug('Dashboard.waitPage');
-
- await this.driverHelper.waitVisibility(By.xpath(Dashboard.WORKSPACES_BUTTON_XPATH), timeout);
- await this.driverHelper.waitVisibility(By.xpath(Dashboard.CREATE_WORKSPACE_BUTTON_XPATH), timeout);
- }
-
- async clickWorkspacesButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug('Dashboard.clickWorkspacesButton');
-
- await this.driverHelper.waitAndClick(By.xpath(Dashboard.WORKSPACES_BUTTON_XPATH), timeout);
- }
-
- async clickCreateWorkspaceButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug('Dashboard.clickCreateWorkspaceButton');
-
- await this.driverHelper.waitAndClick(By.xpath(Dashboard.CREATE_WORKSPACE_BUTTON_XPATH), timeout);
- }
-
- async waitLoader(timeout: number = TimeoutConstants.TS_WAIT_LOADER_PRESENCE_TIMEOUT) {
- Logger.debug('Dashboard.waitLoader');
-
- await this.driverHelper.waitVisibility(By.css(Dashboard.LOADER_PAGE_CSS), timeout);
- }
-
- async waitLoaderDisappearance(timeout: number = TimeoutConstants.TS_WAIT_LOADER_ABSENCE_TIMEOUT) {
- Logger.debug('Dashboard.waitLoaderDisappearance');
-
- await this.driverHelper.waitDisappearance(By.css(Dashboard.LOADER_PAGE_CSS), timeout);
- }
-
- async waitDisappearanceNavigationMenu(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug('Dashboard.waitDisappearanceNavigationMenu');
-
- await this.driverHelper.waitDisappearance(By.id('chenavmenu'), timeout);
- }
-
-}
diff --git a/tests/e2e/pageobjects/dashboard/Workspaces.ts b/tests/e2e/pageobjects/dashboard/Workspaces.ts
deleted file mode 100644
index eba42bc0a9..0000000000
--- a/tests/e2e/pageobjects/dashboard/Workspaces.ts
+++ /dev/null
@@ -1,189 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-export enum WorkspaceStatusUI {
- Running = 'green',
- Stopped = 'grey'
-}
-
-@injectable()
-export class Workspaces {
- private static readonly ADD_WORKSPACE_BUTTON_XPATH: string = `//button[text()='Add Workspace']`;
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitPage(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug('Workspaces.waitPage');
-
- await this.driverHelper.waitVisibility(By.xpath(Workspaces.ADD_WORKSPACE_BUTTON_XPATH), timeout);
- }
-
- async clickAddWorkspaceButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug('Workspaces.clickAddWorkspaceButton');
-
- await this.driverHelper.waitAndClick(By.xpath(Workspaces.ADD_WORKSPACE_BUTTON_XPATH), timeout);
- }
-
- async clickOpenButton(workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug('Workspaces.clickOpenButton');
-
- await this.driverHelper.waitAndClick(this.getOpenButtonLocator(workspaceName), timeout);
- }
-
- async waitWorkspaceListItem(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`Workspaces.waitWorkspaceListItem "${workspaceName}"`);
-
- const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
-
- await this.driverHelper.waitVisibility(workspaceListItemLocator, timeout);
- }
-
- async waitWorkspaceWithRunningStatus(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`Workspaces.waitWorkspaceWithRunningStatus "${workspaceName}"`);
-
- const runningStatusLocator: By = this.getWorkspaceStatusLocator(workspaceName, WorkspaceStatusUI.Running);
-
- await this.driverHelper.waitVisibility(runningStatusLocator, timeout);
- }
-
- async waitWorkspaceWithStoppedStatus(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug(`Workspaces.waitWorkspaceWithStoppedStatus "${workspaceName}"`);
-
- const stoppedStatusLocator: By = this.getWorkspaceStatusLocator(workspaceName, WorkspaceStatusUI.Stopped);
-
- await this.driverHelper.waitVisibility(stoppedStatusLocator, timeout);
- }
-
- async clickWorkspaceListItem(workspaceName: string, timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug(`Workspaces.clickWorkspaceListItem "${workspaceName}"`);
-
- const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
-
- await this.driverHelper.waitAndClick(workspaceListItemLocator, timeout);
- }
-
- async clickActionsButton(workspaceName: string) {
- Logger.debug(`Workspaces.clickActionsButton of the '${workspaceName}' list item`);
-
- await this.driverHelper.waitAndClick(this.getActionsLocator(workspaceName));
- }
-
- async waitActionsPopup(workspaceName: string, timeout: number = TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT) {
- Logger.debug(`Workspaces.waitActionsPopup of the '${workspaceName}' list item`);
-
- await this.driverHelper.waitVisibility(this.getExpandedActionsLocator(workspaceName), timeout);
- await this.driverHelper.wait(5000);
- }
-
- async openActionsPopup(workspaceName: string, timeout: number = TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT) {
- Logger.debug(`Workspaces.openActionsPopup for the '${workspaceName}' list item`);
-
- await this.clickActionsButton(workspaceName);
- await this.waitActionsPopup(workspaceName, timeout);
- }
-
- async clickActionsDeleteButton(workspaceName: string) {
- Logger.debug(`Workspaces.clickActionsDeleteButton for the '${workspaceName}' list item`);
-
- await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Delete Workspace'));
- }
-
- async clickActionsStopWorkspaceButton(workspaceName: string) {
- Logger.debug(`Workspaces.clickActionsStopWorkspaceButton for the '${workspaceName}' list item`);
-
- await this.driverHelper.waitAndClick(this.getActionsPopupButtonLocator(workspaceName, 'Stop Workspace'));
- }
-
- async waitDeleteWorkspaceConfirmationWindow(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug(`Workspaces.waitDeleteWorkspaceConfirmationWindow`);
-
- const confirmationWindowLocator: By = By.xpath(`//div[@aria-label='Delete workspaces confirmation window']`);
-
- await this.driverHelper.waitVisibility(confirmationWindowLocator, timeout);
- await this.driverHelper.wait(5000);
- }
-
-
- async clickToDeleteConfirmationCheckbox(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug(`Workspaces.clickToDeleteConfirmationCheckbox`);
-
- const deleteConfirmationCheckboxLocator: By = By.xpath(`//input[@data-testid='confirmation-checkbox']`);
-
- await this.driverHelper.waitAndClick(deleteConfirmationCheckboxLocator, timeout);
- }
-
- async waitAndClickEnabledConfirmationWindowDeleteButton(timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug(`Workspaces.waitEnabledConfirmationWindowDeleteButton`);
-
- const enabledConfirmationWindowDeleteButton: By = By.xpath(`//button[@data-testid='delete-workspace-button' and not(@disabled)]`);
-
- await this.driverHelper.waitAndClick(enabledConfirmationWindowDeleteButton, timeout);
- }
-
-
- async deleteWorkspaceByActionsButton(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug('Workspaces.deleteWorkspaceByActionsButton');
-
- await this.waitWorkspaceListItem(workspaceName, timeout);
- await this.openActionsPopup(workspaceName, timeout);
- await this.clickActionsDeleteButton(workspaceName);
- await this.waitDeleteWorkspaceConfirmationWindow(timeout);
- await this.clickToDeleteConfirmationCheckbox(timeout);
- await this.waitAndClickEnabledConfirmationWindowDeleteButton(timeout);
- }
-
- async stopWorkspaceByActionsButton(workspaceName: string, timeout: number = TimeoutConstants.TS_DASHBOARD_WORKSPACE_STOP_TIMEOUT) {
- Logger.debug('Workspaces.stopWorkspaceByActionsButton');
-
- await this.waitWorkspaceListItem(workspaceName, timeout);
- await this.openActionsPopup(workspaceName, timeout);
- await this.clickActionsStopWorkspaceButton(workspaceName);
- }
-
- async waitWorkspaceListItemAbcence(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`Workspaces.waitWorkspaceListItemAbcence "${workspaceName}"`);
-
- const workspaceListItemLocator: By = By.xpath(this.getWorkspaceListItemLocator(workspaceName));
-
- await this.driverHelper.waitDisappearance(workspaceListItemLocator, timeout);
- }
-
- private getWorkspaceListItemLocator(workspaceName: string): string {
- return `//tr[td/span/a[text()='${workspaceName}']]`;
- }
-
- private getWorkspaceStatusLocator(workspaceName: string, workspaceStatus: WorkspaceStatusUI): By {
- return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//span[@data-testid='workspace-status-indicator']//*[local-name()='svg' and @fill='${workspaceStatus}']`);
- }
-
- private getActionsLocator(workspaceName: string): By {
- return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}/td/div/button[@aria-label='Actions']`);
- }
-
- private getExpandedActionsLocator(workspaceName: string): By {
- return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//button[@aria-label='Actions' and @aria-expanded='true']`);
- }
-
- private getActionsPopupButtonLocator(workspaceName: string, buttonText: string): By {
- return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//li[@role='menuitem']//button[text()='${buttonText}']`);
- }
-
- private getOpenButtonLocator(workspaceName: string) {
- return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName)}//td[@data-key=5]//a[text()='Open']`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts b/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts
deleted file mode 100644
index 03e2951b82..0000000000
--- a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { DriverHelper } from '../../../utils/DriverHelper';
-import { injectable, inject } from 'inversify';
-import { CLASSES, TYPES } from '../../../inversify.types';
-import 'reflect-metadata';
-import { TestConstants } from '../../../TestConstants';
-import { By } from 'selenium-webdriver';
-import { Ide } from '../../ide/Ide';
-import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
-import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
-import { Logger } from '../../../utils/Logger';
-import { TimeoutConstants } from '../../../TimeoutConstants';
-
-
-@injectable()
-export class WorkspaceDetails {
- private static readonly RUN_BUTTON_CSS: string = '#run-workspace-button[che-button-title=\'Run\']';
- private static readonly OPEN_BUTTON_CSS: string = '#open-in-ide-button[che-button-title=\'Open\']';
- private static readonly SAVE_BUTTON_CSS: string = 'button[name=\'save-button\']';
- private static readonly ENABLED_SAVE_BUTTON_CSS: string = 'button[name=\'save-button\'][aria-disabled=\'false\']';
- private static readonly WORKSPACE_DETAILS_LOADER_CSS: string = 'workspace-details-overview md-progress-linear';
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
-
- async waitLoaderDisappearance(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
- Logger.debug('WorkspaceDetails.waitLoaderDisappearance');
-
- await this.driverHelper.waitDisappearance(By.css(WorkspaceDetails.WORKSPACE_DETAILS_LOADER_CSS), attempts, polling);
- }
-
- async saveChanges() {
- Logger.debug('WorkspaceDetails.saveChanges');
-
- await this.waitSaveButton();
- await this.clickOnSaveButton();
- await this.waitSaveButtonDisappearance();
- }
-
- async waitPage(workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug(`WorkspaceDetails.saveChanges workspace: "${workspaceName}"`);
-
- await this.waitWorkspaceTitle(workspaceName, timeout);
- await this.waitOpenButton(timeout);
- await this.waitRunButton(timeout);
- await this.waitTabsPresence(timeout);
- await this.waitLoaderDisappearance(timeout);
- }
-
- async waitWorkspaceTitle(workspaceName: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`WorkspaceDetails.waitWorkspaceTitle title: "${workspaceName}"`);
-
- const workspaceTitleLocator: By = By.css(this.getWorkspaceTitleCssLocator(workspaceName));
-
- await this.driverHelper.waitVisibility(workspaceTitleLocator, timeout);
- }
-
- async waitRunButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug('WorkspaceDetails.waitRunButton');
-
- await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.RUN_BUTTON_CSS), timeout);
- }
-
- async clickOnRunButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- Logger.debug('WorkspaceDetails.clickOnRunButton');
-
- await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.RUN_BUTTON_CSS), timeout);
- }
-
- async waitOpenButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug('WorkspaceDetails.waitOpenButton');
-
- await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.OPEN_BUTTON_CSS), timeout);
- }
-
- async openWorkspace(namespace: string, workspaceName: string, timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- Logger.debug(`WorkspaceDetails.openWorkspace "${namespace}/${workspaceName}"`);
-
- await this.clickOnOpenButton(timeout);
- await this.driverHelper.waitVisibility(By.css(Ide.ACTIVATED_IDE_IFRAME_CSS), TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT);
- await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.STARTING);
- }
-
- async waitTabsPresence(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug('WorkspaceDetails.waitTabsPresence');
-
- const workspaceDetailsTabs: Array = ['Overview', 'Projects', 'Containers', 'Servers',
- 'Env Variables', 'Volumes', 'Config', 'SSH', 'Plugins', 'Editors'];
-
- for (const tabTitle of workspaceDetailsTabs) {
- const workspaceDetailsTabLocator: By = By.xpath(this.getTabXpathLocator(tabTitle));
-
- await this.driverHelper.waitVisibility(workspaceDetailsTabLocator, timeout);
- }
- }
-
- async selectTab(tabTitle: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- Logger.debug(`WorkspaceDetails.selectTab ${tabTitle}`);
-
- await this.clickOnTab(tabTitle, timeout);
- await this.waitTabSelected(tabTitle, timeout);
- }
-
- private getWorkspaceTitleCssLocator(workspaceName: string): string {
- return `che-row-toolbar[che-title='${workspaceName}']`;
- }
-
- private getTabXpathLocator(tabTitle: string): string {
- return `//md-tabs-canvas//md-tab-item//span[text()='${tabTitle}']`;
- }
-
- private getSelectedTabXpathLocator(tabTitle: string): string {
- return `//md-tabs-canvas[@role='tablist']//md-tab-item[@aria-selected='true']//span[text()='${tabTitle}']`;
- }
-
- private async waitSaveButton(timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- await this.driverHelper.waitVisibility(By.css(WorkspaceDetails.ENABLED_SAVE_BUTTON_CSS), timeout);
- }
-
- private async waitSaveButtonDisappearance(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS, polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
- await this.driverHelper.waitDisappearance(By.css(WorkspaceDetails.SAVE_BUTTON_CSS), attempts, polling);
- }
-
- private async clickOnSaveButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.ENABLED_SAVE_BUTTON_CSS), timeout);
- }
-
- private async clickOnOpenButton(timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- await this.driverHelper.waitAndClick(By.css(WorkspaceDetails.OPEN_BUTTON_CSS), timeout);
- }
-
- private async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
- const workspaceDetailsTabLocator: By = By.xpath(this.getTabXpathLocator(tabTitle));
-
-
- await this.driverHelper.waitAndClick(workspaceDetailsTabLocator, timeout);
- }
-
- private async waitTabSelected(tabTitle: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- const selectedTabLocator: By = By.xpath(this.getSelectedTabXpathLocator(tabTitle));
-
- await this.driverHelper.waitVisibility(selectedTabLocator, timeout);
- }
-
-}
diff --git a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts b/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts
deleted file mode 100644
index 5b05316e63..0000000000
--- a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetailsPlugins.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { DriverHelper } from '../../../utils/DriverHelper';
-import { injectable, inject } from 'inversify';
-import 'reflect-metadata';
-import { CLASSES, TYPES } from '../../../inversify.types';
-import { By } from 'selenium-webdriver';
-import { WorkspaceDetails } from './WorkspaceDetails';
-import { ITestWorkspaceUtil } from '../../../utils/workspace/ITestWorkspaceUtil';
-import { WorkspaceStatus } from '../../../utils/workspace/WorkspaceStatus';
-import { Logger } from '../../../utils/Logger';
-import { TimeoutConstants } from '../../../TimeoutConstants';
-
-
-@injectable()
-export class WorkspaceDetailsPlugins {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.WorkspaceDetails) private readonly workspaceDetails: WorkspaceDetails,
- @inject(TYPES.WorkspaceUtil) private readonly testWorkspaceUtil: ITestWorkspaceUtil) { }
-
- async waitPluginListItem(pluginName: string) {
- Logger.debug(`WorkspaceDetailsPlugins.waitPluginListItem ${pluginName}`);
-
- const pluginListItemLocator: By = By.css(this.getPluginListItemCssLocator(pluginName));
-
- await this.driverHelper.waitVisibility(pluginListItemLocator, TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT);
- }
-
- async enablePlugin(pluginName: string, pluginVersion?: string) {
- Logger.debug(`WorkspaceDetailsPlugins.enablePlugin ${pluginName}:${pluginVersion}`);
-
- await this.waitPluginDisabling(pluginName, pluginVersion);
- await this.clickOnPluginListItemSwitcher(pluginName, pluginVersion);
- await this.waitPluginEnabling(pluginName, pluginVersion);
- }
-
- async disablePlugin(pluginName: string, pluginVersion?: string) {
- Logger.debug(`WorkspaceDetailsPlugins.disablePlugin ${pluginName}:${pluginVersion}`);
-
- await this.waitPluginEnabling(pluginName, pluginVersion);
- await this.clickOnPluginListItemSwitcher(pluginName, pluginVersion);
- await this.waitPluginDisabling(pluginName, pluginVersion);
- }
-
- async addPluginAndOpenWorkspace(namespace: string, workspaceName: string, pluginName: string, pluginId: string, pluginVersion?: string) {
- Logger.debug(`WorkspaceDetailsPlugins.addPluginAndOpenWorkspace ${namespace}/${workspaceName} plugin: ${pluginName}:${pluginVersion}`);
-
- await this.workspaceDetails.selectTab('Plugins');
- await this.enablePlugin(pluginName, pluginVersion);
- await this.workspaceDetails.saveChanges();
- await this.workspaceDetails.openWorkspace(namespace, workspaceName);
- await this.testWorkspaceUtil.waitWorkspaceStatus(namespace, workspaceName, WorkspaceStatus.RUNNING);
- await this.testWorkspaceUtil.waitPluginAdding(namespace, workspaceName, pluginId);
- }
-
- private getPluginListItemCssLocator(pluginName: string, pluginVersion?: string): string {
- if (pluginVersion) {
- return `.plugin-item div[plugin-item-name*='${pluginName}'][plugin-item-version='${pluginVersion}']`;
- }
-
- return `.plugin-item div[plugin-item-name*='${pluginName}']`;
- }
-
- private getPluginListItemSwitcherCssLocator(pluginName: string, pluginVersion?: string): string {
- return `${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch`;
- }
-
- private async clickOnPluginListItemSwitcher(pluginName: string,
- pluginVersion?: string,
- timeout: number = TimeoutConstants.TS_CLICK_DASHBOARD_ITEM_TIMEOUT) {
-
- const pluginListItemSwitcherLocator = By.css(this.getPluginListItemSwitcherCssLocator(pluginName, pluginVersion));
-
- await this.driverHelper.waitAndClick(pluginListItemSwitcherLocator, timeout);
- }
-
- private async waitPluginEnabling(pluginName: string, pluginVersion?: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- const enabledPluginSwitcherLocator: By = By.css(`${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch[aria-checked='true']`);
-
- await this.driverHelper.waitVisibility(enabledPluginSwitcherLocator, timeout);
- }
-
- private async waitPluginDisabling(pluginName: string, pluginVersion?: string, timeout: number = TimeoutConstants.TS_COMMON_DASHBOARD_WAIT_TIMEOUT) {
- const disabledPluginSwitcherLocator: By = By.css(`${this.getPluginListItemCssLocator(pluginName, pluginVersion)} md-switch[aria-checked='false']`);
-
- await this.driverHelper.waitVisibility(disabledPluginSwitcherLocator, timeout);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/ContextMenu.ts b/tests/e2e/pageobjects/ide/ContextMenu.ts
deleted file mode 100644
index 73fcf607fe..0000000000
--- a/tests/e2e/pageobjects/ide/ContextMenu.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { WebElement, Button, By, Key } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-
-
-@injectable()
-export class ContextMenu {
- private static readonly SUGGESTION_WIDGET_BODY_CSS: string = 'ul.p-Menu-content';
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
-
- async invokeContextMenuOnTheElementWithMouse(elementLocator: By) {
- Logger.debug(`ContextMenu.invokeContextMenuOnTheElementWithMouse ${elementLocator}`);
-
- const webElement: WebElement = await this.driverHelper.waitVisibility(elementLocator, TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
- await this.driverHelper.getAction().click(webElement, Button.RIGHT).perform();
- this.waitContextMenu();
- }
-
- async invokeContextMenuOnActiveElementWithKeys() {
- Logger.debug('ContextMenu.invokeContextMenuOnActiveElementWithKeys');
-
- this.driverHelper.getDriver().switchTo().activeElement().sendKeys(Key.SHIFT + Key.F10);
- this.waitContextMenu();
- }
-
- async waitContextMenuAndClickOnItem(nameOfItem: string) {
- Logger.debug(`ContextMenu.waitContextMenuAndClickOnItem "${nameOfItem}"`);
-
- const itemLocator: string = `//div[@class='p-Menu-itemLabel' and text()='${nameOfItem}']`;
- await this.waitContextMenu();
- await this.driverHelper.waitAndClick(By.xpath(itemLocator), TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
- }
-
- async waitContextMenu() {
- Logger.debug(`ContextMenu.waitContextMenu`);
-
- await this.driverHelper.waitVisibility(By.css(ContextMenu.SUGGESTION_WIDGET_BODY_CSS), TimeoutConstants.TS_CONTEXT_MENU_TIMEOUT);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/DebugView.ts b/tests/e2e/pageobjects/ide/DebugView.ts
deleted file mode 100644
index 45991e0e0d..0000000000
--- a/tests/e2e/pageobjects/ide/DebugView.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { inject, injectable } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By, Key, WebElement, error } from 'selenium-webdriver';
-import { Ide } from './Ide';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-
-@injectable()
-export class DebugView {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Ide) private readonly ide: Ide) { }
-
- async clickOnDebugConfigurationDropDown() {
- Logger.debug('DebugView.clickOnDebugConfigurationDropDown');
-
- await this.driverHelper.waitAndClick(By.css('select.debug-configuration'));
- }
-
- async clickOnDebugConfigurationItem(itemText: string) {
- Logger.debug(`DebugView.clickOnDebugConfigurationItem "${itemText}"`);
-
- const configurationItemLocator: By = By.xpath(`//select[contains(@class,'debug-configuration')]//option[text()=\'${itemText}\']`);
-
- await this.driverHelper.waitAndClick(configurationItemLocator);
- await this.ide.performKeyCombination(Key.ESCAPE);
- }
-
- async clickOnRunDebugButton() {
- Logger.debug('DebugView.clickOnRunDebugButton');
-
- const runDebugButtonLocator: By = By.xpath('//span[@title=\'Start Debugging\']');
-
- await this.driverHelper.waitAndClick(runDebugButtonLocator, TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
- }
-
- /**
- * Waits for number of threads in "Threads" view to be more than 1 - this should mean that the debugger is connected.
- *
- * @param timeout
- */
- async waitForDebuggerToConnect(timeout: number = TimeoutConstants.TS_DEBUGGER_CONNECTION_TIMEOUT) {
- await this.driverHelper.getDriver().wait(async () => {
- Logger.debug(`Waiting for debugger to connect (threads to appear in "Threads" view)`);
-
- const threadsTreeLocator = `//div[contains(@class, 'theia-debug-thread')]`;
-
- try {
- const threadElements: WebElement[] = await this.driverHelper.waitAllPresence(By.xpath(threadsTreeLocator));
- if (threadElements.length > 1) {
- return true;
- }
-
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- return await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- }
- }, timeout);
- }
-
- /**
- * Click on "Threads" view title.
- */
- async clickOnThreadsViewTitle() {
- Logger.debug(`Click on "Threads" view title`);
-
- const threadsViewTitleLocator: By = By.xpath('//div[@id="debug:view-container:-1--debug:threads:-1"]/*/span[@title="Threads"]');
- await this.driverHelper.waitAndClick(threadsViewTitleLocator);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/DialogWindow.ts b/tests/e2e/pageobjects/ide/DialogWindow.ts
deleted file mode 100644
index 3e3da08633..0000000000
--- a/tests/e2e/pageobjects/ide/DialogWindow.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { Ide } from './Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class DialogWindow {
- private static readonly DIALOG_BODY_XPATH_LOCATOR: string = '//div[@id=\'theia-dialog-shell\']//div[@class=\'dialogBlock\']';
- private static readonly CLOSE_BUTTON_XPATH_LOCATOR: string = `${DialogWindow.DIALOG_BODY_XPATH_LOCATOR}//button[text()='close']`;
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Ide) private readonly ide: Ide) { }
-
- async dialogDisplayes(): Promise {
- Logger.debug('DialogWindow.dialogDisplayes');
- return await this.driverHelper.isVisible(By.xpath(DialogWindow.DIALOG_BODY_XPATH_LOCATOR));
- }
-
- async waitAndCloseIfAppear() {
- Logger.debug('DialogWindow.waitAndCloseIfAppear');
-
- const dialogDisplayes: boolean = await this.driverHelper.waitVisibilityBoolean(By.xpath(DialogWindow.DIALOG_BODY_XPATH_LOCATOR));
-
- if (dialogDisplayes) {
- await this.closeDialog();
- await this.waitDialogDissappearance();
- }
-
- }
-
- async clickToButton(buttonText: string) {
- Logger.debug('DialogWindow.clickToButton');
- const buttonLocator: By = By.xpath(`${DialogWindow.DIALOG_BODY_XPATH_LOCATOR}//button[text()='${buttonText}']`);
- await this.driverHelper.waitAndClick(buttonLocator, TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
- }
-
- async closeDialog() {
- Logger.debug('DialogWindow.closeDialog');
-
- await this.clickToButton('close');
- }
-
- async clickToOpenLinkButton() {
- Logger.debug('DialogWindow.clickToOpenLinkButton');
-
- await this.clickToButton('Open Link');
- }
-
- async waitDialog(dialogText: string = '', timeout: number = TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT) {
- Logger.debug('DialogWindow.waitDialog');
-
- // if dialog text is provided uses xpath with this text
- // if not uses window body xpath
- const dialogWithTextXpathLocator: string = `${DialogWindow.DIALOG_BODY_XPATH_LOCATOR}//*[contains(text(), '${dialogText}')]`;
- const dialogXpathLocator: string = (dialogText ? dialogWithTextXpathLocator : DialogWindow.DIALOG_BODY_XPATH_LOCATOR);
-
- await this.driverHelper.waitVisibility(By.xpath(dialogXpathLocator), timeout);
- }
-
- async waitDialogAndOpenLink(dialogText: string = '', applicationReaddyTimeout: number) {
- Logger.debug('DialogWindow.waitDialogAndOpenLink');
-
- await this.waitDialog(dialogText, applicationReaddyTimeout);
- await this.ide.waitApllicationIsReady(await this.getApplicationUrlFromDialog(dialogText), applicationReaddyTimeout);
- await this.clickToOpenLinkButton();
- await this.waitDialogDissappearance();
- }
-
- async waitDialogDissappearance() {
- Logger.debug('DialogWindow.waitDialogDissappearance');
-
- await this.driverHelper.waitDisappearanceWithTimeout(By.xpath(DialogWindow.CLOSE_BUTTON_XPATH_LOCATOR), TimeoutConstants.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT);
- }
-
- async getApplicationUrlFromDialog(dialogWindowText: string) {
- const notificationTextLocator: By = By.xpath(`${DialogWindow.DIALOG_BODY_XPATH_LOCATOR}//*[contains(text(), '${dialogWindowText}')]`);
-
- let dialogWindow = await this.driverHelper.waitAndGetText(notificationTextLocator);
- let regexp: RegExp = new RegExp('^.*(https?://.*)$');
-
- if (!regexp.test(dialogWindow)) {
- throw new Error('Cannot obtaine url from notification message');
- }
-
- return dialogWindow.split(regexp)[1];
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/Editor.ts b/tests/e2e/pageobjects/ide/Editor.ts
deleted file mode 100644
index 73e10fce98..0000000000
--- a/tests/e2e/pageobjects/ide/Editor.ts
+++ /dev/null
@@ -1,581 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { By, Key, error, ActionSequence, Button } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-
-@injectable()
-export class Editor {
- private static readonly SUGGESTION_WIDGET_BODY_CSS: string = 'div.visible[widgetId=\'editor.widget.suggestWidget\']';
- private static readonly SUGGESTION_LOADING_XPATH: string = '//div[@widgetid=\'editor.widget.suggestWidget\']//div[@class=\'message\' and contains(.,\'Loading...\')]';
- private static readonly ADDITIONAL_SHIFTING_TO_Y: number = 19;
- private static readonly ADDITIONAL_SHIFTING_TO_X: number = 1;
-
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- public async waitSuggestionContainer(timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
- Logger.debug('Editor.waitSuggestionContainer');
-
- await this.driverHelper.waitVisibility(By.css(Editor.SUGGESTION_WIDGET_BODY_CSS), timeout);
- }
-
- public async waitSuggestionContainerClosed(timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
- Logger.debug('Editor.waitSuggestionContainerClosed');
-
- await this.driverHelper.waitDisappearanceWithTimeout(By.css(Editor.SUGGESTION_WIDGET_BODY_CSS), timeout);
- }
-
- public async waitSuggestion(editorTabTitle: string,
- suggestionText: string,
- timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT,
- lineNumber?: number,
- charNumber?: number) {
-
- const charInLineNumber: number = (charNumber ? charNumber : 1);
-
- // if line defined the method sets cursor to line and char
- // before invoking suggestion container and repeat this
- // cycle if suggestion didn't display
- if (lineNumber) {
- await this.waitSuggestionWithResettingCursor(editorTabTitle, suggestionText, timeout, lineNumber, charInLineNumber);
- return;
- }
-
- // if line not defined the method just invoke suggestion container
- // without setting cursor to line and char and repeat this
- // cycle if suggestion didn't display
- await this.waitSuggestionWithoutResettingCursor(editorTabTitle, suggestionText, timeout);
-
- }
-
- public async closeSuggestionContainer(editorTabTitle: string, timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
- Logger.debug(`Editor.closeSuggestionContainer tabTitle: "${editorTabTitle}"`);
-
- await this.driverHelper.getDriver().wait(async () => {
- // if container already closed stop the method execution
- try {
- // for avoiding problem when the inner timeout
- // bigger than timeout of the method
- const suggestionContainerTimeout: number = timeout / 2;
-
- await this.waitSuggestionContainer(suggestionContainerTimeout);
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- return true;
- }
-
- throw err;
- }
-
- // try to close container
- try {
- await this.pressEscapeButton(editorTabTitle);
- await this.waitSuggestionContainerClosed(2000);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
- }
-
- }, timeout);
- }
-
- public async waitSuggestionWithScrolling(editorTabTitle: string,
- suggestionText: string,
- timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
-
- Logger.debug(`Editor.waitSuggestion tabTitle: "${editorTabTitle}" suggestion: "${suggestionText}"`);
-
- const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
-
- await this.driverHelper.getDriver().wait(async () => {
- try {
- await this.scrollAndSearchSuggestion(editorTabTitle, suggestionLocator, timeout / 3);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- await this.closeSuggestionContainer(editorTabTitle, TimeoutConstants.TS_CLOSE_SUGGESTION_CONTAINER_TIMEOUT);
- await this.pressControlSpaceCombination(editorTabTitle);
- }
- }, timeout);
- }
-
- public async pressControlSpaceCombination(editorTabTitle: string) {
- Logger.debug(`Editor.pressControlSpaceCombination "${editorTabTitle}"`);
-
- await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.SPACE));
- }
-
- public async pressEscapeButton(editorTabTitle: string) {
- Logger.debug(`Editor.pressEscapeButton "${editorTabTitle}"`);
-
- await this.performKeyCombination(editorTabTitle, Key.ESCAPE);
- }
-
- public async clickOnSuggestion(suggestionText: string, timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
- Logger.debug(`Editor.clickOnSuggestion "${suggestionText}"`);
-
- await this.driverHelper.waitAndClick(this.getSuggestionLineXpathLocator(suggestionText), timeout);
- }
-
- public async waitTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitTab "${tabTitle}"`);
-
- await this.driverHelper.waitVisibility(By.xpath(this.getTabXpathLocator(tabTitle)), timeout);
- }
-
- public async waitTabDisappearance(tabTitle: string,
- attempt: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug(`Editor.waitTabDisappearance "${tabTitle}"`);
-
- await this.driverHelper.waitDisappearance(By.xpath(this.getTabXpathLocator(tabTitle)), attempt, polling);
- }
-
- public async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.clickOnTab "${tabTitle}"`);
-
- await this.driverHelper.waitAndClick(By.xpath(this.getTabXpathLocator(tabTitle)), timeout);
- }
-
- public async waitTabFocused(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitTabFocused "${tabTitle}"`);
-
- const focusedTabLocator: By = By.xpath(`//li[contains(@class, 'p-TabBar-tab') and contains(@class, 'theia-mod-active')]//div[text()='${tabTitle}']`);
-
- await this.driverHelper.waitVisibility(focusedTabLocator, timeout);
- }
-
- public async selectTab(tabTitle: string) {
- Logger.debug(`Editor.selectTab "${tabTitle}"`);
-
- await this.waitTab(tabTitle);
- await this.clickOnTab(tabTitle);
- await this.waitTabFocused(tabTitle);
- }
-
- async closeTab(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.closeTab "${tabTitle}"`);
-
- const tabCloseButtonLocator: By = By.xpath(`//div[text()='${tabTitle}']/parent::li//div[contains(@class, 'p-TabBar-tabCloseIcon')]`);
-
- await this.driverHelper.waitAndClick(tabCloseButtonLocator, timeout);
- }
-
- async waitTabWithUnsavedStatus(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitTabWithUnsavedStatus "${tabTitle}"`);
-
- const unsavedTabLocator: By = this.getTabWithUnsavedStatus(tabTitle);
-
- await this.driverHelper.waitVisibility(unsavedTabLocator, timeout);
- }
-
- async waitTabWithSavedStatus(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitTabWithSavedStatus "${tabTitle}"`);
-
- const unsavedTabLocator: By = this.getTabWithUnsavedStatus(tabTitle);
-
- await this.driverHelper.getDriver().wait(async () => {
- try {
- await this.driverHelper.waitDisappearanceWithTimeout(unsavedTabLocator, TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- await this.waitTab(tabTitle, timeout);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- console.log(`The editor tab with title "${tabTitle}" has unsaved status, wait once again`);
- }
- }, timeout);
-
- }
-
- async waitEditorOpened(editorTabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitEditorOpened "${editorTabTitle}"`);
-
- const firstEditorLineLocator: By = By.xpath(this.getEditorLineXpathLocator(1));
-
- await this.driverHelper.waitPresence(this.getEditorBodyLocator(editorTabTitle), timeout);
- await this.driverHelper.waitPresence(firstEditorLineLocator, timeout);
- }
-
- async waitEditorAvailable(tabTitle: string, timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- Logger.debug(`Editor.waitEditorAvailable "${tabTitle}"`);
-
- await this.waitTab(tabTitle, timeout);
- await this.waitEditorOpened(tabTitle, timeout);
- }
-
- async getLineText(tabTitle: string, lineNumber: number): Promise {
- Logger.debug(`Editor.getLineText "${tabTitle}"`);
-
- const lineIndex: number = lineNumber - 1;
- const editorText: string = await this.getEditorVisibleText(tabTitle);
- const editorLines: string[] = editorText.split('\n');
- const editorLine = editorLines[lineIndex] + '\n';
-
- return editorLine;
- }
-
- async getEditorVisibleText(tabTitle: string): Promise {
- Logger.debug(`Editor.getEditorVisibleText "${tabTitle}"`);
-
- const editorBodyLocator: By = By.xpath(`//div[contains(@data-uri, \'${tabTitle}')]//div[@class=\'view-lines\']`);
- // const editorBodyLocator: By = By.xpath('//div[@class=\'view-lines\']');
- const editorText: string = await this.driverHelper.waitAndGetText(editorBodyLocator);
- return editorText;
- }
-
- async waitText(tabTitle: string, expectedText: string,
- timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug(`Editor.waitText "${tabTitle}"`);
-
- await this.driverHelper.getDriver().wait(async () => {
- const editorText: string = await this.getEditorVisibleText(tabTitle);
- const isEditorContainText: boolean = editorText.includes(expectedText);
-
- if (isEditorContainText) {
- return true;
- }
-
- await this.driverHelper.wait(polling);
- }, timeout);
- }
-
- async followAndWaitForText(editorTabTitle: string,
- expectedText: string,
- timeout: number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug(`Editor.followAndWaitForText title: "${editorTabTitle}" text: "${expectedText}"`);
-
- await this.selectTab(editorTabTitle);
- await this.driverHelper.getDriver().wait(async () => {
- await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.END));
- const editorText: string = await this.getEditorVisibleText(editorTabTitle);
-
- const isEditorContainText: boolean = editorText.includes(expectedText);
-
- if (isEditorContainText) {
- return true;
- }
-
- await this.driverHelper.wait(polling);
- }, timeout);
- }
-
- async moveCursorToLineAndChar(editorTabTitle: string, line: number, char: number) {
- Logger.debug(`Editor.moveCursorToLineAndChar title: "${editorTabTitle}" line: "${line}" char: "${char}"`);
-
- // set cursor to the 1:1 position
- await this.performKeyCombination(editorTabTitle, Key.chord(Key.CONTROL, Key.HOME));
-
- // move cursor to line
- for (let i = 1; i < line; i++) {
- await this.performKeyCombination(editorTabTitle, Key.ARROW_DOWN);
- }
-
- // move cursor to char
- for (let i = 1; i < char; i++) {
- await this.performKeyCombination(editorTabTitle, Key.ARROW_RIGHT);
- }
- }
-
- async performKeyCombination(editorTabTitle: string, text: string) {
- Logger.debug(`Editor.performKeyCombination title: "${editorTabTitle}" text: "${text}"`);
-
- const interactionContainerLocator: By = this.getEditorActionArreaLocator(editorTabTitle);
- await this.driverHelper.type(interactionContainerLocator, text);
- }
-
- async type(editorTabTitle: string, text: string, line: number) {
- Logger.debug(`Editor.type title: "${editorTabTitle}" text: "${text}"`);
-
- await this.selectTab(editorTabTitle);
- await this.moveCursorToLineAndChar(editorTabTitle, line, 1);
- await this.performKeyCombination(editorTabTitle, text);
- }
-
- async waitErrorInLine(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
- Logger.debug(`Editor.waitErrorInLine line: "${lineNumber}"`);
-
- const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber);
- await this.driverHelper.waitVisibility(errorInLineLocator, timeout);
- }
-
- async waitErrorInLineDisappearance(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
- Logger.debug(`Editor.waitErrorInLineDisappearance line: "${lineNumber}"`);
-
- const errorInLineLocator: By = await this.getErrorInLineLocator(lineNumber);
- await this.driverHelper.waitDisappearanceWithTimeout(errorInLineLocator, timeout);
- }
-
- async waitWarningInLine(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
- Logger.debug(`Editor.waitWarningInLine line: "${lineNumber}"`);
-
- const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber);
- await this.driverHelper.waitVisibility(warningInLineLocator, timeout);
- }
-
- async waitWarningInLineDisappearance(lineNumber: number, timeout: number = TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT) {
- Logger.debug(`Editor.waitWarningInLineDisappearance line: "${lineNumber}"`);
-
- const warningInLineLocator: By = await this.getWarningInLineLocator(lineNumber);
- await this.driverHelper.waitDisappearanceWithTimeout(warningInLineLocator, timeout);
- }
-
- async waitStoppedDebugBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
- Logger.debug(`Editor.waitStoppedDebugBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
-
- await this.driverHelper.waitUntilTrue(() => this.isBreakpointPresent(tabTitle, lineNumber, true), timeout);
- }
-
- async waitBreakpoint(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
- Logger.debug(`Editor.waitBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
-
- await this.driverHelper.waitUntilTrue(() => this.isBreakpointPresent(tabTitle, lineNumber), timeout);
- }
-
- async waitBreakpointAbsence(tabTitle: string, lineNumber: number, timeout: number = TimeoutConstants.TS_BREAKPOINT_DEFAULT_TIMEOUT) {
- Logger.debug(`Editor.waitBreakpointAbsence title: "${tabTitle}" line: "${lineNumber}"`);
- await this.driverHelper.waitUntilTrue(() => !this.isBreakpointPresent(tabTitle, lineNumber), timeout);
- }
-
- async activateBreakpoint(tabTitle: string, lineNumber: number) {
- Logger.debug(`Editor.activateBreakpoint title: "${tabTitle}" line: "${lineNumber}"`);
-
- const attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS;
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
-
- for (let i = 0; i < attempts; i++) {
- try {
- await this.selectTab(tabTitle);
- await this.moveCursorToLineAndChar(tabTitle, lineNumber, 1);
- await this.performKeyCombination(tabTitle, Key.F9);
- await this.waitBreakpoint(tabTitle, lineNumber);
- return;
- } catch (err) {
- if (i === attempts - 1) {
- throw new error.TimeoutError(`Exceeded maximum breakpoint activation attempts`);
- }
-
- // ignore errors and wait
- Logger.debug(`Editor.activateBreakpoint - Error: ${err}`);
- await this.driverHelper.wait(polling);
- }
- }
- }
-
-
- async getLineYCoordinates(lineNumber: number): Promise {
- Logger.debug(`Editor.getLineYCoordinates line: "${lineNumber}"`);
-
- const lineNumberLocator: By = By.xpath(`//div[contains(@class, 'line-numbers') and text()='${lineNumber}']` +
- `//parent::div[contains(@style, 'position')]`);
- let elementStyleValue: string = await this.driverHelper.waitAndGetElementAttribute(lineNumberLocator, 'style', TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
-
- elementStyleValue = elementStyleValue.replace('position: absolute; top: ', '');
- elementStyleValue = elementStyleValue.replace('px; width: 100%; height: 19px;', '');
-
- const lineYCoordinate: number = Number.parseInt(elementStyleValue, 10);
-
- if (Number.isNaN(lineYCoordinate)) {
- throw new error.UnsupportedOperationError(`Failed to parse the ${elementStyleValue} row to number format`);
- }
-
- return lineYCoordinate;
- }
-
- async clickOnLineAndChar(line: number, char: number) {
- Logger.debug(`Editor.clickOnLineAndChar line: "${line}" char: "${char}"`);
-
- const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
- const xPosition: number = char + Editor.ADDITIONAL_SHIFTING_TO_X;
-
- new ActionSequence(this.driverHelper.getDriver()).
- mouseMove({ x: xPosition, y: yPosition }).
- click().
- perform();
- }
-
- async goToDefinitionWithMouseClicking(line: number, char: number) {
- Logger.debug(`Editor.goToDefinitionWithMouseClicking line: "${line}" char: "${char}"`);
-
- const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
-
- new ActionSequence(this.driverHelper.getDriver()).
- keyDown(Key.CONTROL).
- mouseMove({ x: char + Editor.ADDITIONAL_SHIFTING_TO_X, y: yPosition }).
- click().
- keyDown(Key.CONTROL).
- perform();
- }
-
- async mouseRightButtonClick(line: number, char: number) {
- Logger.debug(`Editor.mouseRightButtonClick line: "${line}" char: "${char}"`);
-
- const yPosition: number = await this.getLineYCoordinates(line) + Editor.ADDITIONAL_SHIFTING_TO_Y;
-
- new ActionSequence(this.driverHelper.getDriver()).
- mouseMove({ x: char + Editor.ADDITIONAL_SHIFTING_TO_X, y: yPosition }).
- click(Button.RIGHT).
- perform();
- }
-
- private async scrollAndSearchSuggestion(editorTabTitle: string, suggestionLocator: By, timeout: number = 10000) {
- await this.driverHelper.getDriver().wait(async () => {
- const loadingLocator: By = By.xpath(Editor.SUGGESTION_LOADING_XPATH);
- await this.waitSuggestionContainer();
- await this.driverHelper.waitDisappearance(loadingLocator);
- await this.driverHelper.wait(1000);
-
- if (await this.driverHelper.isVisible(suggestionLocator)) {
- return true;
- }
-
- await this.performKeyCombination(editorTabTitle, Key.ARROW_DOWN);
- }, timeout);
- }
-
- private getTabWithUnsavedStatus(tabTitle: string): By {
- return By.xpath(`//div[text()='${tabTitle}']/parent::li[contains(@class, 'theia-mod-dirty')]`);
- }
-
- private getEditorBodyLocator(editorTabTitle: string): By {
- const editorXpathLocator: string = `//div[@id='theia-main-content-panel']//div[contains(@class, 'monaco-editor')` +
- ` and contains(@data-uri, '${editorTabTitle}')]//*[contains(@class, 'lines-content')]`;
-
- return By.xpath(editorXpathLocator);
- }
-
- private getEditorActionArreaLocator(editorTabTitle: string): By {
- const editorActionArreaXpathLocator: string = `//div[@id='theia-main-content-panel']//div[contains(@class, 'monaco-editor')` +
- ` and contains(@data-uri, '${editorTabTitle}')]//textarea`;
-
- return By.xpath(editorActionArreaXpathLocator);
- }
-
- private getEditorLineXpathLocator(lineNumber: number): string {
- return `(//div[contains(@class,'lines-content')]//div[@class='view-lines']/div[@class='view-line'])[${lineNumber}]`;
- }
-
- private getSuggestionLineXpathLocator(suggestionText: string): By {
- return By.xpath(`//div[@widgetid='editor.widget.suggestWidget']//span[@class='monaco-highlighted-label' and contains(.,'${suggestionText}')]`);
- }
-
- private getTabXpathLocator(tabTitle: string): string {
- return `//li[contains(@class, 'p-TabBar-tab')]//div[text()='${tabTitle}']`;
- }
-
- private async getErrorInLineLocator(lineNumber: number): Promise {
- const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber);
-
- return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-error')]`);
- }
-
- private async getWarningInLineLocator(lineNumber: number): Promise {
- const lineYCoordinates: number = await this.getLineYCoordinates(lineNumber);
-
- return By.xpath(`//div[contains(@style, 'top:${lineYCoordinates}px')]//div[contains(@class, 'squiggly-warning')]`);
- }
-
- private async waitSuggestionWithResettingCursor(editorTabTitle: string,
- suggestionText: string,
- timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT,
- lineNumber: number,
- charNumber: number) {
-
- const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
-
- const methodLogText: string = `Editor.waitSuggestion tabTitle: "${editorTabTitle}" ` +
- `suggestion: "${suggestionText}" ` +
- `line: "${lineNumber}" ` +
- `char: "${charNumber}"`;
-
- Logger.debug(methodLogText);
-
- await this.driverHelper.getDriver().wait(async () => {
- await this.selectTab(editorTabTitle);
- await this.moveCursorToLineAndChar(editorTabTitle, lineNumber, charNumber);
- await this.pressControlSpaceCombination(editorTabTitle);
-
- try {
- await this.driverHelper.waitVisibility(suggestionLocator, 5000);
- await this.closeSuggestionContainer(editorTabTitle);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
- }
- }, timeout);
- }
-
- private async waitSuggestionWithoutResettingCursor(editorTabTitle: string,
- suggestionText: string,
- timeout: number = TimeoutConstants.TS_SUGGESTION_TIMEOUT) {
-
- Logger.debug(`Editor.waitSuggestion tabTitle: "${editorTabTitle}" suggestion: "${suggestionText}"`);
-
- const suggestionLocator: By = this.getSuggestionLineXpathLocator(suggestionText);
-
- await this.driverHelper.getDriver().wait(async () => {
- try {
- await this.driverHelper.waitVisibility(suggestionLocator, 5000);
- await this.closeSuggestionContainer(editorTabTitle);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- await this.closeSuggestionContainer(editorTabTitle, timeout);
- await this.pressControlSpaceCombination(editorTabTitle);
- }
- }, timeout);
- }
-
- /**
- * Checks for breakpoint presence in currently opened editor on given line.
- *
- * @param lineNumber Line number to check the breakpoint presence on.
- * @param triggered Whether this breakpoint is triggered or not. Default false.
- */
-
- private async isBreakpointPresent(tabTitle: string, lineNumber: number, triggered: boolean = false): Promise {
- Logger.debug('Editor.isBreakpointPresent');
-
- const linesBarXpathLocator: string = `//div[contains(@id, '${tabTitle}')]//div[@class='margin']`;
- const triggeredBreakpointXpathLocator: string = `//div[contains(@class, 'theia-debug-breakpoint') and contains(@class, 'theia-debug-top-stack-frame')]`;
- const regularBreakpointXpathLocator: string = `//div[contains(@class, 'theia-debug-breakpoint')]`;
- const lineNumberRelativeXpathLocator: string = `/parent::div/div[contains(@class, 'line-numbers') and text()=${lineNumber}]`;
-
- const breakpointLocator: string = (triggered ? triggeredBreakpointXpathLocator : regularBreakpointXpathLocator);
- const breakpointLineNumberXpathLocator = linesBarXpathLocator + breakpointLocator + lineNumberRelativeXpathLocator;
-
- return await this.driverHelper.isVisible(By.xpath(breakpointLineNumberXpathLocator));
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/GitPlugin.ts b/tests/e2e/pageobjects/ide/GitPlugin.ts
deleted file mode 100644
index 402896fde2..0000000000
--- a/tests/e2e/pageobjects/ide/GitPlugin.ts
+++ /dev/null
@@ -1,119 +0,0 @@
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { DialogWindow } from './DialogWindow';
-import { TopMenu } from './TopMenu';
-import { QuickOpenContainer } from './QuickOpenContainer';
-
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-@injectable()
-export class GitPlugin {
- private static readonly COMMIT_MESSAGE_TEXTAREA_CSS: string = 'textarea#theia-scm-input-message';
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.DialogWindow) private readonly dialogWindow: DialogWindow,
- @inject(CLASSES.TopMenu) private readonly topMenu: TopMenu,
- @inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer
- ) { }
-
- async openGitPluginContainer(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.openGitPluginContainer');
-
- const sourceControlGitBtnXpathLocator: string = '//li[@id=\'shell-tab-scm-view-container\' and contains(@style, \'height\')]';
- await this.driverHelper.waitAndClick(By.xpath(sourceControlGitBtnXpathLocator), timeout);
- await this.waitViewOfContainer(timeout);
- }
-
- async waitViewOfContainer(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.waitViewOfContainer');
-
- const gitHubContainerIdLocator: By = By.id('scm-view-container--scm-view');
- await this.driverHelper.waitVisibility(gitHubContainerIdLocator, timeout);
- }
-
- async waitCommitMessageTextArea(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.waitCommitMessageTextArea');
-
- const textAreaCssLocator: By = By.css(GitPlugin.COMMIT_MESSAGE_TEXTAREA_CSS);
- await this.driverHelper.waitVisibility(textAreaCssLocator, timeout);
- }
-
- async typeCommitMessage(commitMessage: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.typeCommitMessage');
-
- await this.waitCommitMessageTextArea(timeout);
- await this.driverHelper.type(By.css(GitPlugin.COMMIT_MESSAGE_TEXTAREA_CSS), commitMessage, timeout);
- }
-
- async selectCommandInMoreActionsMenu(commandName: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.selectCommandInMoreActionsMenu');
-
- await this.clickOnMoreActions(timeout);
- await this.driverHelper.waitAndClick(By.xpath(`//li[@data-command]/div[text()=\'${commandName}\']`), timeout);
- }
-
- async clickOnMoreActions(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.clickOnMoreActions');
-
- await this.driverHelper.waitAndClick(By.id('__more__'), timeout);
- }
-
- async waitChangedFileInChagesList(expectedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.waitChangedFileInChagesList');
-
- await this.driverHelper.waitPresence(By.xpath(`//span[@class='name' and text()=\'${expectedItem}\']`), timeout);
- }
-
- async waitStagedFileInStagedChanges(expectedStagedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.waitStagedFileInStagedChanges');
-
- await this.driverHelper.waitPresence(By.xpath(`//div[text()='Staged Changes']/parent::div/parent::div/parent::div/following-sibling::div//span[text()=\'${expectedStagedItem}\']`), timeout);
- }
-
- async commitFromCommandMenu() {
- Logger.debug('GitPlugin.commitFromScmView');
- await this.topMenu.selectOption('View', 'Find Command...');
- await this.quickOpenContainer.typeAndSelectSuggestion('Commit', 'Git: Commit');
- }
-
- async pushChangesFromCommandMenu() {
- Logger.debug('GitPlugin.commitFromScmView');
- await this.topMenu.selectOption('View', 'Find Command...');
- await this.quickOpenContainer.typeAndSelectSuggestion('Push', 'Git: Push');
- }
-
-
- async stageAllChanges(expectedStagedItem: string, timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.stageAllChanges');
-
- await this.driverHelper.waitVisibility(By.xpath('//div[@class=\'noWrapInfo theia-TreeNodeSegmentGrow\' and text()=\'Changes\']'), timeout);
- await this.driverHelper.scrollTo(By.xpath('//div[@class=\'noWrapInfo theia-TreeNodeSegmentGrow\' and text()=\'Changes\']'));
- await this.driverHelper.waitAndClick(By.xpath('//a[@title=\'Stage All Changes\']'), timeout);
- await this.waitStagedFileInStagedChanges(expectedStagedItem);
- }
-
- async waitDataIsSynchronized(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.waitDataIsSynchronized');
- await this.driverHelper.waitDisappearance(By.xpath(`//div[contains(@title,'Synchronize Changes')]//span[contains(.,' 0↓')]`), timeout);
- }
-
- async clickOnSelectRepositoryButton(timeout: number = TimeoutConstants.TS_GIT_CONAINER_INTERACTION_TIMEOUT) {
- Logger.debug('GitPlugin.clickOnSelectRepositoryButton');
- await this.driverHelper.waitAndClick(By.xpath(`//button[@class='theia-button main' and text()='Select Repository Location']`), timeout);
- await this.dialogWindow.waitDialogDissappearance();
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/Ide.ts b/tests/e2e/pageobjects/ide/Ide.ts
deleted file mode 100644
index bbafdc4c16..0000000000
--- a/tests/e2e/pageobjects/ide/Ide.ts
+++ /dev/null
@@ -1,356 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import axios from 'axios';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { By, error } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { NotificationCenter } from './NotificationCenter';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-export enum LeftToolbarButton {
- Explorer = 'Explorer',
- Git = 'Git',
- Debug = 'Debug',
- Openshift = 'OpenShift'
-}
-
-@injectable()
-export class Ide {
- public static readonly EXPLORER_BUTTON_ID: string = 'shell-tab-explorer-view-container';
- public static readonly SELECTED_EXPLORER_BUTTON_CSS: string = 'li#shell-tab-explorer-view-container.theia-mod-active';
- public static readonly ACTIVATED_IDE_IFRAME_CSS: string = '#ide-iframe-window[aria-hidden=\'false\']';
- public static readonly SELECTED_GIT_BUTTON_XPATH: string = '(//ul[@class=\'p-TabBar-content\']//li[@title=\'Git\' and contains(@class, \'p-mod-current\')])[1]';
- private static readonly TOP_MENU_PANEL_CSS: string = '#theia-app-shell #theia-top-panel .p-MenuBar-content';
- private static readonly LEFT_CONTENT_PANEL_CSS: string = '#theia-left-content-panel';
- private static readonly PRELOADER_CSS: string = '.theia-preload';
- private static readonly IDE_IFRAME_CSS: string = 'iframe#ide-iframe';
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.NotificationCenter) private readonly notificationCenter: NotificationCenter
- ) { }
-
- async waitAndSwitchToIdeFrame(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
- Logger.debug('Ide.waitAndSwitchToIdeFrame');
- try {
- await this.driverHelper.waitAndSwitchToFrame(By.css(Ide.IDE_IFRAME_CSS), timeout);
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- Logger.warn('StaleElementException occured during waiting for IDE. Sleeping for 2 secs and retrying.');
- this.driverHelper.wait(2000);
- await this.driverHelper.waitAndSwitchToFrame(By.css(Ide.IDE_IFRAME_CSS), timeout);
- return;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.error(`Switching to IDE frame failed after ${timeout} timeout.`);
- throw err;
- }
-
- Logger.error(`Switching to IDE frame failed.`);
- throw err;
- }
- }
-
- async waitNotification(notificationText: string, timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`Ide.waitNotification "${notificationText}"`);
-
- const notificationLocator: By = By.xpath(this.getNotificationXpathLocator(notificationText));
- await this.driverHelper.waitVisibility(notificationLocator, timeout);
- }
-
- async waitTaskExitCodeNotificationBoolean(exitCode: string, timeout: number = TimeoutConstants.TS_SELENIUM_WAIT_TASK_EXIT_CODE_TIMEOUT): Promise {
- Logger.debug(`Ide.waitTaskExitCodeNotification "has exited with code ${exitCode}."`);
-
- const exitCodeNotificationLocator: By = By.xpath(this.getNotificationXpathLocator(`has exited with code`));
- const notificationLocator: By = By.xpath(this.getNotificationXpathLocator(`has exited with code ${exitCode}.`));
-
- Logger.info(`Ide.waitTaskExitCodeNotification waiting for any exit code notification.`);
- try {
- await this.driverHelper.waitVisibility(exitCodeNotificationLocator, timeout);
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- Logger.error(`Ide.waitTaskExitCodeNotificationBoolean wait for notification timed out after ${timeout}.`);
- throw err;
- }
- Logger.error(`Waiting for task notification failed.`);
- throw err;
- }
- Logger.info(`Ide.waitTaskExitCodeNotification checking for correct exit core:${exitCode}`);
- return await this.driverHelper.waitVisibilityBoolean(notificationLocator, 1, 1000);
- }
-
- async waitNotificationAndClickOnButton(notificationText: string,
- buttonText: string,
- timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
-
- Logger.debug(`Ide.waitNotificationAndClickOnButton "${notificationText}" buttonText: "${buttonText}"`);
-
- await this.driverHelper.getDriver().wait(async () => {
- await this.waitNotification(notificationText, timeout);
- await this.clickOnNotificationButton(notificationText, buttonText);
-
- try {
- await this.waitNotificationDisappearance(notificationText);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- console.log(`After clicking on "${buttonText}" button of the notification with text "${notificationText}" \n` +
- 'it is still visible (issue #14121), try again.');
-
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- }
- }, timeout);
- }
-
- async waitNotificationAndConfirm(notificationText: string, timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`Ide.waitNotificationAndConfirm "${notificationText}"`);
-
- await this.waitNotificationAndClickOnButton(notificationText, 'yes', timeout);
- }
-
- async waitNotificationAndOpenLink(notificationText: string, timeout: number) {
- Logger.debug(`Ide.waitNotificationAndOpenLink "${notificationText}"`);
- await this.waitNotification(notificationText, timeout);
- await this.waitNotificationAndClickOnButton(notificationText, 'Open Link', timeout);
- }
-
- async isNotificationPresent(notificationText: string): Promise {
- Logger.debug(`Ide.isNotificationPresent "${notificationText}"`);
-
- const notificationLocator: By = By.xpath(this.getNotificationXpathLocator(notificationText));
- return await this.driverHelper.waitVisibilityBoolean(notificationLocator);
- }
-
- async waitNotificationDisappearance(notificationText: string,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug(`Ide.waitNotificationDisappearance "${notificationText}"`);
-
- const notificationLocator: By = By.xpath(this.getNotificationXpathLocator(notificationText));
- await this.driverHelper.waitDisappearance(notificationLocator, attempts, polling);
- }
-
- async clickOnNotificationButton(notificationText: string, buttonText: string) {
- Logger.debug(`Ide.clickOnNotificationButton "${notificationText}" buttonText: "${buttonText}"`);
-
- const yesButtonLocator: string = `//div[@class='theia-notification-list']//span[contains(.,'${notificationText}')]/parent::div/parent::div/parent::div/div[@class='theia-notification-list-item-content-bottom']//div[@class='theia-notification-buttons']//button[text()='${buttonText}'] `;
- await this.driverHelper.waitAndClick(By.xpath(yesButtonLocator));
- }
-
- async waitWorkspaceAndIde(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
-
- Logger.debug('Ide.waitWorkspaceAndIde');
-
- await this.waitAndSwitchToIdeFrame(timeout);
- await this.waitIde(timeout);
- }
-
- async waitIde(timeout: number = TimeoutConstants.TS_IDE_LOAD_TIMEOUT) {
- Logger.debug('Ide.waitIde');
-
- const mainIdeParts: Array = [By.css(Ide.TOP_MENU_PANEL_CSS), By.css(Ide.LEFT_CONTENT_PANEL_CSS), By.id(Ide.EXPLORER_BUTTON_ID)];
-
- for (const idePartLocator of mainIdeParts) {
- try {
- await this.driverHelper.waitVisibility(idePartLocator, timeout);
- } catch (err) {
- if (err instanceof error.NoSuchWindowError) {
- await this.driverHelper.waitVisibility(idePartLocator, timeout);
- return;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.error(`Waiting for ${idePartLocator} timeouted after ${timeout} timeout.`);
- throw err;
- }
-
- Logger.error(`Waiting for ${idePartLocator} failed.`);
- throw err;
- }
- }
- }
-
- async waitLeftToolbarButton(buttonTitle: LeftToolbarButton, timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('Ide.waitLeftToolbarButton');
-
- const buttonLocator: By = this.getLeftToolbarButtonLocator(buttonTitle);
- await this.driverHelper.waitVisibility(buttonLocator, timeout);
- }
-
- async waitAndClickLeftToolbarButton(buttonTitle: LeftToolbarButton, timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('Ide.waitAndClickLeftToolbarButton');
-
- const buttonLocator: By = this.getLeftToolbarButtonLocator(buttonTitle);
- await this.driverHelper.waitAndClick(buttonLocator, timeout);
- }
-
- async waitTopMenuPanel(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('Ide.waitTopMenuPanel');
-
- await this.driverHelper.waitVisibility(By.css(Ide.TOP_MENU_PANEL_CSS), timeout);
- }
-
- async waitLeftContentPanel(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('Ide.waitLeftContentPanel');
-
- await this.driverHelper.waitVisibility(By.css(Ide.LEFT_CONTENT_PANEL_CSS), timeout);
- }
-
- async waitPreloaderAbsent(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = timeout / polling;
- Logger.debug('Ide.waitPreloaderAbsent');
-
- await this.driverHelper.waitDisappearance(By.css(Ide.PRELOADER_CSS), attempts, polling);
- }
-
- async waitPreloaderVisible(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
- Logger.debug('Ide.waitPreloaderVisible');
-
- await this.driverHelper.waitVisibility(By.css(Ide.PRELOADER_CSS), timeout);
- }
-
- async waitStatusBarContains(expectedText: string, timeout: number = TimeoutConstants.TS_SELENIUM_LANGUAGE_SERVER_START_TIMEOUT) {
- const statusBarLocator: By = By.css('div[id=\'theia-statusBar\']');
-
- Logger.debug(`Ide.waitStatusBarContains "${expectedText}"`);
-
- await this.driverHelper.getDriver().wait(async () => {
- const elementText: string = await this.driverHelper.waitAndGetText(statusBarLocator, timeout);
- const isTextPresent: boolean = elementText.search(expectedText) > 0;
-
- if (isTextPresent) {
- return true;
- }
-
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING * 2);
-
- }, timeout);
- }
-
- async waitStatusBarTextAbsence(expectedText: string, timeout: number = TimeoutConstants.TS_SELENIUM_LANGUAGE_SERVER_START_TIMEOUT) {
- const statusBarLocator: By = By.css('div[id=\'theia-statusBar\']');
-
- Logger.debug(`Ide.waitStatusBarTextAbsence "${expectedText}"`);
-
- // for ensuring that check is not invoked in the gap of status displaying
- for (let i: number = 0; i < 3; i++) {
- await this.driverHelper.getDriver().wait(async () => {
- const elementText: string = await this.driverHelper.waitAndGetText(statusBarLocator, timeout);
-
- const isTextAbsent: boolean = elementText.search(expectedText) === -1;
-
- if (isTextAbsent) {
- return true;
- }
-
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING * 2);
-
- }, timeout);
- }
- }
-
- async checkLsInitializationStart(expectedTextInStatusBar: string) {
- Logger.debug('Ide.checkLsInitializationStart');
-
- await this.waitStatusBarContains(expectedTextInStatusBar, 20000);
- }
-
- async performKeyCombination(keyCombination: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`Ide.performKeyCombination "${keyCombination}"`);
-
- const bodyLocator: By = By.tagName('body');
- await this.driverHelper.type(bodyLocator, keyCombination, timeout);
- }
-
- async waitRightToolbarButtonSelection(buttonTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('Ide.waitRightToolbarButtonSelection');
-
- const selectedRightToolbarButtonLocator: By = this.getSelectedRightToolbarButtonLocator(buttonTitle);
- await this.driverHelper.waitVisibility(selectedRightToolbarButtonLocator, timeout);
- }
-
- async getApplicationUrlFromNotification(notificationText: string, timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`Ide.getApplicationUrlFromNotification ${notificationText}`);
-
- const notificationTextLocator: By = By.xpath(`//div[@class='theia-notification-message']/span[contains(.,'${notificationText}')]`);
- let notification = await this.driverHelper.waitAndGetText(notificationTextLocator, timeout);
- let regexp: RegExp = new RegExp('^.*(https?://.*)$');
-
- if (!regexp.test(notification)) {
- throw new Error('Cannot obtaine url from notification message');
- }
-
- return notification.split(regexp)[1];
- }
-
- async closeAllNotifications(timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`Ide.closeAllNotifications`);
-
- for (let i: number = 0; i < 5; i++) {
- await this.notificationCenter.open();
- try {
- await this.notificationCenter.closeAll(timeout);
- break;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- if (i === 4) {
- Logger.debug('The last try to clear of the notification center was unsuccessful');
-
- throw err;
- }
- }
- }
- }
-
- async waitApllicationIsReady(url: string,
- timeout: number) {
-
- Logger.debug(`Ide.waitApllicationIsReady ${url}`);
-
- await this.driverHelper.getDriver().wait(async () => {
- try {
- const res = await axios.get(url);
- if (res.status === 200) {
- return true;
- }
- } catch (error) {
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- }
-
- }, timeout);
- }
-
- private getSelectedRightToolbarButtonLocator(buttonTitle: string): By {
- return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
- `//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab')] and contains(@class, 'p-mod-current')`);
- }
-
- private getLeftToolbarButtonLocator(buttonTitle: String): By {
- return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
- `//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab')]`);
- }
-
- private getNotificationXpathLocator(notificationText: string): string {
- return `//div[@class='theia-notification-message']/span[contains(.,'${notificationText}')]`;
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/LeftToolBar.ts b/tests/e2e/pageobjects/ide/LeftToolBar.ts
deleted file mode 100644
index 546ecc9133..0000000000
--- a/tests/e2e/pageobjects/ide/LeftToolBar.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class LeftToolBar {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitToolbar(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('LeftToolBar.waitToolbar');
-
- await this.driverHelper.waitVisibility(By.css('div.theia-app-left'), timeout);
- }
-
- async clickOnToolIcon(iconTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`LeftToolBar.clickOnToolIcon "${iconTitle}"`);
-
- const toolIconLocator: By = this.getViewLocator(iconTitle);
-
- await this.driverHelper.waitAndClick(toolIconLocator, timeout);
- }
-
- async waitToolIcon(iconTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`LeftToolBar.waitToolIcon "${iconTitle}"`);
-
- const toolIconLocator: By = this.getViewLocator(iconTitle);
-
- await this.driverHelper.waitVisibility(toolIconLocator, timeout);
- }
-
- async isViewSelected(toolIconTitle: string): Promise {
- Logger.debug(`LeftToolBar.isViewEnabled "${toolIconTitle}"`);
-
- const selectedViewLocator: By = this.getSelectedViewLocator(toolIconTitle);
-
- return await this.driverHelper.isVisible(selectedViewLocator);
- }
-
- async waitViewSelected(toolIconTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`LeftToolBar.waitViewSelected "${toolIconTitle}"`);
-
- const selectedViewLocator: By = this.getSelectedViewLocator(toolIconTitle);
-
- return await this.driverHelper.waitVisibility(selectedViewLocator);
- }
-
- async selectView(toolIconTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`LeftToolBar.selectView "${toolIconTitle}"`);
-
- await this.waitToolIcon(toolIconTitle, timeout);
-
- if ( await this.isViewSelected(toolIconTitle)) {
- return;
- }
-
- await this.clickOnToolIcon(toolIconTitle, timeout);
- await this.waitViewSelected(toolIconTitle, timeout);
- }
-
- private getSelectedViewLocator(viewTitle: string): By {
- return By.css(`div.theia-app-left .p-TabBar-content li.p-mod-current[title='${viewTitle}']`);
- }
-
- private getViewLocator(viewTitle: string): By {
- return By.css(`div.theia-app-left .p-TabBar-content li[title='${viewTitle}']`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/NotificationCenter.ts b/tests/e2e/pageobjects/ide/NotificationCenter.ts
deleted file mode 100644
index f60ce3ab8e..0000000000
--- a/tests/e2e/pageobjects/ide/NotificationCenter.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { Logger } from '../../utils/Logger';
-import { By } from 'selenium-webdriver';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-
-
-@injectable()
-export class NotificationCenter {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitOpening(timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug('NotificationCenter.waitOpening');
-
- await this.driverHelper.waitVisibility(By.css('div.theia-notification-center-header'), timeout);
- }
-
- async clickIconOnStatusBar(timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug('NotificationCenter.clickIconOnStatusBar');
-
- const statusBarNotificationsLocator: By =
- By.xpath('(//div[@id=\'theia-statusBar\']//div[@class=\'area right\']//div[@title=\'Toggle Bottom Panel\']/preceding-sibling::div)[last()]');
-
- await this.driverHelper.waitAndClick(statusBarNotificationsLocator, timeout);
- }
-
- async open() {
- Logger.debug(`NotificationCenter.open`);
-
- await this.clickIconOnStatusBar(TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
- await this.waitOpening(TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT);
- }
-
- async clickCloseAllNotificationsButton(timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`NotificationCenter.clickCloseAllNotificationsButton`);
-
- const closeAllButtonLocator: By = By.css('.theia-notification-center-header-actions .clear-all');
-
- await this.driverHelper.waitAndClick(closeAllButtonLocator, timeout);
- }
-
- async waitClosing(timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`NotificationCenter.waitClosing`);
-
- const notificationCenterClosedLocator: By = By.css('.theia-notification-center.closed');
-
- await this.driverHelper.waitPresence(notificationCenterClosedLocator, timeout);
- }
-
- async waitClearNotificationsList(timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug(`NotificationCenter.waitClearNotificationsList`);
-
- const notificationLocator: By = By.css('.theia-notification-center .theia-notification-list > *');
-
- await this.driverHelper.waitDisappearance(notificationLocator, timeout);
- }
-
- async closeAll(timeout: number = TimeoutConstants.TS_NOTIFICATION_CENTER_TIMEOUT) {
- Logger.debug('NotificationCenter.closeAll');
-
- await this.clickCloseAllNotificationsButton(timeout);
- await this.waitClearNotificationsList(timeout);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/OpenDialogWidget.ts b/tests/e2e/pageobjects/ide/OpenDialogWidget.ts
deleted file mode 100644
index 485180a5d1..0000000000
--- a/tests/e2e/pageobjects/ide/OpenDialogWidget.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { Logger } from '../../utils/Logger';
-import { DialogWindow } from '../ide/DialogWindow';
-import { OpenWorkspaceWidget } from '../ide/OpenWorkspaceWidget';
-import { By } from 'selenium-webdriver';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-export enum Locations {
- Theia = 'theia',
- Home = 'home',
- Root = '/'
-}
-
-export enum Buttons {
- Cancel = 'Cancel',
- AddContext = 'Add context folder for component in workspace.',
-}
-
-@injectable()
-export class OpenDialogWidget {
-
- constructor(
- @inject(CLASSES.DialogWindow) private readonly dialogWindow: DialogWindow,
- @inject(CLASSES.OpenWorkspaceWidget) private readonly openWorkspaceWidget: OpenWorkspaceWidget,
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper
- ) { }
-
- async selectLocation(location: Locations, timeout: number = TimeoutConstants.TS_SELENIUM_DIALOG_WIDGET_TIMEOUT) {
- Logger.debug(`OpenDialogWidget.selectLocation`);
- await this.driverHelper.type(By.css('div.theia-NavigationPanel select'), location, timeout);
- }
-
- async selectItemInTree(pathToItem: string) {
- Logger.debug(`OpenDialogWidget.selectItemInTree "${pathToItem}"`);
- await this.openWorkspaceWidget.selectItemInTree(pathToItem);
- }
-
-
- async expandItemInTreeToPath(pathToItem: string, timeout: number = TimeoutConstants.TS_SELENIUM_DIALOG_WIDGET_TIMEOUT) {
- Logger.debug(`OpenDialogWidget.expandItemInTreeToPath "${pathToItem}"`);
- await this.openWorkspaceWidget.expandTreeToPath(pathToItem, timeout);
- }
-
- async clickOnButton(button: Buttons) {
- Logger.debug(`OpenDialogWidget.clickOnButton ${button}`);
- await this.dialogWindow.clickToButton(button);
- }
-
- async selectLocationAndAddContextFolder(location: Locations, path: string, button: Buttons) {
- await this.selectLocation(location);
- await this.expandItemInTreeToPath(path);
- await this.clickOnButton(button);
- await this.dialogWindow.waitDialogDissappearance();
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/OpenWorkspaceWidget.ts b/tests/e2e/pageobjects/ide/OpenWorkspaceWidget.ts
deleted file mode 100644
index f1a438965f..0000000000
--- a/tests/e2e/pageobjects/ide/OpenWorkspaceWidget.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class OpenWorkspaceWidget {
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {
- }
-
- async selectItemInTree(pathToItem: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`OpenWorkspaceWidget.selectItemInTree "${pathToItem}"`);
-
- await this.driverHelper.waitAndClick(By.id(pathToItem), timeout);
- }
-
- async expandTreeToPath(path: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- Logger.debug(`OpenWorkspaceWidget.expandTreeToPath "${path}"`);
- const pathNodes: string[] = path.split('/');
- let buildPath: string = '';
-
- const promises = pathNodes.map(async (currentPath, index) => {
- buildPath += `/${currentPath}`;
-
- // the first item (index=0 -> /) has locator which can be found 'By.id', but next (index=1 -> //) requires another - 'By.xpath'.
- if (index === 0) {
- await this.driverHelper.waitAndClick(By.id(buildPath), timeout);
- } else {
- await this.driverHelper.waitAndClick(By.xpath(`(//div[@id='${buildPath}'])[position()=2]`), timeout);
- }
- });
-
- return Promise.all(promises);
- }
-}
diff --git a/tests/e2e/pageobjects/ide/OpenshiftPlugin.ts b/tests/e2e/pageobjects/ide/OpenshiftPlugin.ts
deleted file mode 100644
index f4c5d75486..0000000000
--- a/tests/e2e/pageobjects/ide/OpenshiftPlugin.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { Ide, LeftToolbarButton } from './Ide';
-import { Logger } from '../../utils/Logger';
-import { By } from 'selenium-webdriver';
-import { ContextMenu } from './ContextMenu';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-export enum OpenshiftAppExplorerToolbar {
- ReportExtensionIssueOnGitHub = 'Report Extension Issue on GitHub',
- RefreshView = 'Refresh View',
- SwitchContexts = 'Switch Contexts',
- LogIntoCluster = 'Login into Cluster'
-}
-
-export enum OpenshiftContextMenuItems {
- NewComponent = 'New Component',
- Push = 'Push'
-}
-
-@injectable()
-export class OpenshiftPlugin {
-
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Ide) private readonly ide: Ide,
- @inject(CLASSES.ContextMenu) private readonly contextMenu: ContextMenu
- ) {
- }
-
-
- async clickOnOpenshiftToollBarIcon(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
- Logger.debug(`OpenshiftPlugin.clickOnOpenshiftTollBar`);
- await this.ide.waitAndClickLeftToolbarButton(LeftToolbarButton.Openshift, timeout);
- }
-
- async waitOpenshiftConnectorTree(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
- Logger.debug(`OpenshiftPlugin.waitOpenshiftConnectorTree`);
- await this.driverHelper.waitPresence(By.id('openshiftProjectExplorer'), timeout);
- }
-
- async clickOnOpenshiftConnectorTree(timeout: number = TimeoutConstants.TS_WAIT_OPENSHIFT_CONNECTOR_TREE_TIMEOUT) {
- Logger.debug(`OpenshiftPlugin.clickOnOpenshiftConnectorTree`);
- await this.driverHelper.waitAndClick(By.id('plugin-view:openshiftProjectExplorer'), timeout);
- }
-
- async clickOnApplicationToolbarItem(item: OpenshiftAppExplorerToolbar, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`OpenshiftPlugin.clickOnApplicationToolbarItem`);
- await this.driverHelper.waitAndClick(By.css(`div [title='${item}']`), timeout);
- }
-
- async getClusterIP(timeout: number = TimeoutConstants.TS_GET_CLUSTER_IP_TIMEOUT): Promise {
- Logger.debug(`OpenshiftPlugin.getClusterIP`);
- return await this.driverHelper.waitAndGetText(By.xpath('//div[@id=\'openshiftProjectExplorer\']//div[@title [contains(text(), https)]]'), timeout);
- }
- async waitItemInTree(item: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`OpenshiftPlugin.waitItemInTree`);
- await this.driverHelper.waitPresence(By.xpath(`//div[contains(@id, ':${item}')]`), timeout);
- }
-
- async clickOnItemInTree(item: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`OpenshiftPlugin.clickOnItemInTree`);
- await this.driverHelper.waitAndClick(By.xpath(`//div[contains(@id, ':${item}')]`), timeout);
- }
-
- async invokeContextMenuOnItem(treeItem: string) {
- Logger.debug(`OpenshiftPlugin.invokeContextMenuOnItem`);
- await this.contextMenu.invokeContextMenuOnTheElementWithMouse(By.xpath(`//div[contains(@id, ':${treeItem}')]`));
- }
-
- async invokeContextMenuCommandOnItem(treeItem: string, menuItem: OpenshiftContextMenuItems) {
- Logger.debug(`OpenshiftPlugin.clickOnItemInTree`);
- await this.contextMenu.invokeContextMenuOnTheElementWithMouse(By.xpath(`//div[contains(@id, ':${treeItem}')]`));
- await this.contextMenu.waitContextMenuAndClickOnItem(menuItem);
- }
-}
-
diff --git a/tests/e2e/pageobjects/ide/PreviewWidget.ts b/tests/e2e/pageobjects/ide/PreviewWidget.ts
deleted file mode 100644
index f7ad0a4b11..0000000000
--- a/tests/e2e/pageobjects/ide/PreviewWidget.ts
+++ /dev/null
@@ -1,131 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By, error, Key } from 'selenium-webdriver';
-import { TestConstants } from '../../TestConstants';
-import { Ide } from './Ide';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class PreviewWidget {
- private static readonly WIDGET_URL_LOCATOR: By = By.css('div.theia-mini-browser input');
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Ide) private readonly ide: Ide) { }
-
- async waitUrl(expectedUrl: string, timeout: number = TimeoutConstants.TS_WAIT_URL_TIMEOUT) {
- Logger.debug(`PreviewWidget.waitUrl ${expectedUrl}`);
-
- await this.driverHelper.waitAttributeValue(PreviewWidget.WIDGET_URL_LOCATOR, 'value', expectedUrl, timeout);
- }
-
- async typeUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`PreviewWidget.typeUrl ${url}`);
-
- await this.driverHelper.type(PreviewWidget.WIDGET_URL_LOCATOR, url, timeout);
- }
-
- async clearUrl() {
- Logger.debug('PreviewWidget.clearUrl');
-
- await this.typeUrl(Key.chord(Key.CONTROL, 'a', Key.DELETE));
- await this.waitUrl('');
- }
-
- async typeAndApplyUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`PreviewWidget.typeAndApplyUrl ${url}`);
-
- await this.clearUrl();
- await this.typeUrl(Key.chord(url, Key.ENTER), timeout);
- }
-
- async waitApplicationOpened(expectedUrl: string, timeout: number) {
- Logger.debug(`PreviewWidget.waitApplicationOpened ${expectedUrl}`);
-
- await this.driverHelper.getDriver().wait(async () => {
- try {
- await this.waitUrl(expectedUrl, timeout / 5);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- await this.typeAndApplyUrl(expectedUrl, timeout);
- }
- }, timeout);
- }
-
- async waitAndSwitchToWidgetFrame() {
- Logger.debug('PreviewWidget.waitAndSwitchToWidgetFrame');
-
- const iframeLocator: By = By.css('div.theia-mini-browser iframe');
- await this.driverHelper.waitAndSwitchToFrame(iframeLocator, TimeoutConstants.TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT);
-
- }
-
- async waitPreviewWidgetAbsence() {
- Logger.debug('PreviewWidget.waitPreviewWidgetAbsence');
-
- await this.driverHelper.waitDisappearance(By.css('div.theia-mini-browser'));
- }
-
- async waitContentAvailable(contentLocator: By,
- timeout: number,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5) {
-
- Logger.debug(`PreviewWidget.waitContentAvailable ${contentLocator}`);
-
- await this.waitAndSwitchToWidgetFrame();
- await this.driverHelper.getDriver().wait(async () => {
- const isApplicationTitleVisible: boolean = await this.driverHelper.isVisible(contentLocator);
- if (isApplicationTitleVisible) {
- await this.driverHelper.getDriver().switchTo().defaultContent();
- await this.ide.waitAndSwitchToIdeFrame();
- return true;
- }
-
- await this.switchBackToIdeFrame();
- await this.refreshPage();
- await this.waitAndSwitchToWidgetFrame();
- await this.driverHelper.wait(polling);
- }, timeout);
- }
-
- async waitVisibility(element: By, timeout: number) {
- Logger.debug(`PreviewWidget.waitVisibility ${element}`);
-
- await this.driverHelper.waitVisibility(element, timeout);
- }
-
- async waitAndClick(element: By, timeout: number = TimeoutConstants.TS_SELENIUM_PREVIEW_WIDGET_DEFAULT_TIMEOUT) {
- Logger.debug(`PreviewWidget.waitAndClick ${element}`);
-
- await this.driverHelper.waitAndClick(element, timeout);
- }
-
- async refreshPage() {
- Logger.debug('PreviewWidget.refreshPage');
-
- const refreshButtonLocator: By = By.css('.theia-mini-browser .theia-mini-browser-refresh');
- await this.driverHelper.waitAndClick(refreshButtonLocator);
- }
-
- async switchBackToIdeFrame() {
- Logger.debug('PreviewWidget.switchBackToIdeFrame');
-
- await this.driverHelper.getDriver().switchTo().defaultContent();
- await this.ide.waitAndSwitchToIdeFrame();
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/ProjectTree.ts b/tests/e2e/pageobjects/ide/ProjectTree.ts
deleted file mode 100644
index f57ebb01b0..0000000000
--- a/tests/e2e/pageobjects/ide/ProjectTree.ts
+++ /dev/null
@@ -1,335 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { Ide, LeftToolbarButton } from './Ide';
-import { TestConstants } from '../../TestConstants';
-import { By, error } from 'selenium-webdriver';
-import { Editor } from './Editor';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class ProjectTree {
- private static readonly PROJECT_TREE_CONTAINER_CSS: string = '#theia-left-side-panel .theia-TreeContainer';
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.Ide) private readonly ide: Ide,
- @inject(CLASSES.Editor) private readonly editor: Editor) { }
-
- async clickCollapseAllButton() {
- Logger.debug('ProjectTree.clickCollapseAllButton');
-
- const collapseAllButtonLocator: By = By.id('navigator.collapse.all');
- await this.driverHelper.waitAndClick(collapseAllButtonLocator);
- }
-
- async waitTreeCollapsed(projectName: string, rootSubItem: string) {
- Logger.debug(`ProjectTree.waitTreeCollapsed project: "${projectName}", subitem: "${rootSubItem}"`);
-
- const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${rootSubItem}`));
- await this.driverHelper.waitDisappearanceWithTimeout(rootSubitemLocator, TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
- }
-
- async collapseProjectTree(projectName: string, rootSubItem: string) {
- Logger.debug(`ProjectTree.collapseProjectTree project: "${projectName}", subitem: "${rootSubItem}"`);
-
- await this.clickCollapseAllButton();
- await this.waitTreeCollapsed(projectName, rootSubItem);
- }
-
- async waitAssociatedWorkspaceProjectTreeCollapsed(projectName: string, expandedRootItem: string) {
- Logger.debug(`ProjectTree.waitTreeCollapsed project name: "${projectName}", expanded root item: "${expandedRootItem}"`);
-
- // const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${expandedRootItem}`));
- await this.waitItemCollapsed(`${projectName}/${expandedRootItem}`);
- }
-
- async openProjectTreeContainer(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug('ProjectTree.openProjectTreeContainer');
-
- const explorerButtonActiveLocator: By = this.getLeftToolbarButtonActiveLocator(LeftToolbarButton.Explorer);
- Logger.trace(`ProjectTree.openProjectTreeContainer waitLeftToolbarButtonPresence`);
- await this.ide.waitLeftToolbarButton(LeftToolbarButton.Explorer, timeout);
-
- const isButtonActive: boolean = await this.driverHelper.waitVisibilityBoolean(explorerButtonActiveLocator);
- Logger.trace(`ProjectTree.openProjectTreeContainer leftToolbarButtonActive:${isButtonActive}`);
- if (!isButtonActive) {
- await this.ide.waitAndClickLeftToolbarButton(LeftToolbarButton.Explorer, timeout);
- }
-
- await this.waitProjectTreeContainer();
- }
-
- async waitItemExpanded(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`ProjectTree.waitItemExpanded "${itemPath}"`);
-
- const locator: string = await this.getExpandedItemCssLocator(itemPath);
- const expandedItemLocator: By = By.css(locator);
- await this.driverHelper.waitVisibility(expandedItemLocator, timeout);
- }
-
- async waitItemCollapsed(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`ProjectTree.waitItemCollapsed "${itemPath}"`);
-
- const locator: string = await this.getCollapsedItemCssLocator(itemPath);
- const collapsedItemLocator: By = By.css(locator);
-
- await this.driverHelper.waitVisibility(collapsedItemLocator, timeout);
- }
-
- async waitProjectTreeContainer(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug('ProjectTree.waitProjectTreeContainer');
-
- await this.driverHelper.waitPresence(By.css(ProjectTree.PROJECT_TREE_CONTAINER_CSS), timeout);
- }
-
- async waitProjectTreeContainerClosed(attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug('ProjectTree.waitProjectTreeContainerClosed');
-
- await this.driverHelper.waitDisappearance(By.css(ProjectTree.PROJECT_TREE_CONTAINER_CSS), attempts, polling);
- }
-
- async waitItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`ProjectTree.waitItem "${itemPath}"`);
-
- const locator: string = await this.getItemCss(itemPath);
- await this.driverHelper.waitVisibility(By.css(locator), timeout);
- }
-
- async waitItemDisappearance(itemPath: string,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.debug(`ProjectTree.waitItemDisappearance "${itemPath}"`);
-
- const locator: string = await this.getItemCss(itemPath);
- await this.driverHelper.waitDisappearance(By.css(locator), attempts, polling);
- }
-
- async clickOnItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
- Logger.debug(`ProjectTree.clickOnItem "${itemPath}"`);
-
- const locator: string = await this.getItemCss(itemPath);
- await this.driverHelper.waitAndClick(By.css(locator), timeout);
- await this.waitItemSelected(itemPath, timeout);
- }
-
- async waitItemSelected(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`ProjectTree.waitItemSelected "${itemPath}"`);
-
- const selectedItemLocator: By = By.css(`div[title='/projects/${itemPath}'].theia-mod-selected.theia-mod-focus`);
- await this.driverHelper.waitVisibility(selectedItemLocator, timeout);
- }
-
- async expandItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
- Logger.debug(`ProjectTree.expandItem "${itemPath}"`);
-
- const locator: string = await this.getExpandIconCssLocator(itemPath);
- const expandIconLocator: By = By.css(locator);
- const treeItemLocator: By = By.css(this.getTreeItemCssLocator(itemPath));
-
-
-
-
- await this.driverHelper.getDriver().wait(async () => {
- const classAttributeValue: string = await this.driverHelper.waitAndGetElementAttribute(expandIconLocator, 'class', timeout);
- const isItemCollapsed: boolean = classAttributeValue.search('theia-mod-collapsed') > 0;
- if (isItemCollapsed) {
- await this.driverHelper.waitAndClick(treeItemLocator, timeout);
- }
-
- try {
- await this.waitItemExpanded(itemPath, TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- return true;
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err('Unexpected error during project tree expanding');
- }
-
- console.log(`The '${itemPath}' item has not been expanded, try again`);
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- }
- }, timeout);
- }
-
- async collapseItem(itemPath: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_CLICK_ON_ITEM_TIMEOUT) {
- Logger.debug(`ProjectTree.collapseItem "${itemPath}"`);
-
- const locator: string = await this.getExpandIconCssLocator(itemPath);
- const expandIconLocator: By = By.css(locator);
- const treeItemLocator: By = By.css(this.getTreeItemCssLocator(itemPath));
-
- const classAttributeValue: string = await this.driverHelper.waitAndGetElementAttribute(expandIconLocator, 'class', timeout);
- const isItemCollapsed: boolean = classAttributeValue.search('theia-mod-collapsed') > 0;
-
- if (!isItemCollapsed) {
- await this.driverHelper.waitAndClick(treeItemLocator, timeout);
- }
-
- await this.waitItemCollapsed(itemPath, timeout);
- }
-
- async expandPath(path: string, timeout: number = TimeoutConstants.TS_EXPAND_PROJECT_TREE_ITEM_TIMEOUT) {
- Logger.debug(`ProjectTree.expandPath "${path}"`);
-
- let items: Array = path.split('/');
- let projectName: string = items[0];
- let paths: Array = new Array();
- paths.push(projectName);
-
- // make direct path for each project tree item
- for (let i = 1; i < items.length; i++) {
- let item = items[i];
- projectName = `${projectName}/${item}`;
- paths.push(projectName);
- }
-
- // expand each project tree item
- for (const path of paths) {
- await this.expandItem(path, timeout);
- }
- }
-
- /**
- *
- * @param pathToItem path to the file that should be opened
- * @param fileName file that should be opened
- * @param timeoutForSigleItem timeout applied for every item in path to be opened
- */
- async expandPathAndOpenFile(pathToItem: string, fileName: string, timeoutForSigleItem: number = TimeoutConstants.TS_OPEN_EDITOR_TIMEOUT) {
- Logger.debug(`ProjectTree.expandPathAndOpenFile "${pathToItem}" filename: ${fileName}`);
-
- await this.expandPath(pathToItem, timeoutForSigleItem);
- await this.clickOnItem(`${pathToItem}/${fileName}`, timeoutForSigleItem);
-
- await this.editor.waitEditorOpened(fileName);
- await this.editor.waitTab(fileName);
- }
-
- async waitProjectImported(projectName: string,
- rootSubItem: string,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- visibilityItemPolling: number = TimeoutConstants.TS_IMPORT_PROJECT_DEFAULT_POLLING,
- triesPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 30) {
-
- Logger.debug(`ProjectTree.waitProjectImported "${projectName}" rootSubItem: "${rootSubItem}"`);
-
- const rootItem: string = `${projectName}`;
- const rootItemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}`));
- const rootSubitemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}/${rootSubItem}`));
-
- for (let i = 0; i < attempts; i++) {
- // do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
- const isProjectFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 5, visibilityItemPolling / 5);
-
- if (!isProjectFolderVisible) {
- Logger.trace(`ProjectTree.waitProjectImported project not located, reloading page.`);
- await this.driverHelper.reloadPage();
- await this.ide.waitAndSwitchToIdeFrame();
- await this.ide.waitIde();
- await this.openProjectTreeContainer();
- continue;
- }
-
- Logger.trace(`ProjectTree.waitProjectImported project found, waiting for sub-items`);
- await this.expandItem(rootItem);
- await this.waitItemExpanded(rootItem);
-
- // do five checks of the item in one fifth of the time given for root folder item (was causing frequent reloads of the workspace)
- const isRootSubItemVisible = await this.driverHelper.waitVisibilityBoolean(rootSubitemLocator, 5, visibilityItemPolling / 5);
-
- if (!isRootSubItemVisible) {
- Logger.trace(`ProjectTree.waitProjectImported sub-items not found, reloading page.`);
- await this.driverHelper.reloadPage();
- await this.ide.waitAndSwitchToIdeFrame();
- await this.ide.waitIde();
- await this.openProjectTreeContainer();
- continue;
- }
-
- return;
- }
-
- throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported');
-
- }
-
- async waitProjectImportedNoSubfolder(projectName: string,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- visibilityItemPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 5,
- triesPolling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING * 90) {
-
- Logger.debug(`ProjectTree.waitProjectImportedNoSubfolder "${projectName}"`);
-
- const rootItemLocator: By = By.css(this.getTreeItemCssLocator(`${projectName}`));
-
- for (let i = 0; i < attempts; i++) {
- const isProjectFolderVisible = await this.driverHelper.waitVisibilityBoolean(rootItemLocator, 1, visibilityItemPolling);
-
- if (!isProjectFolderVisible) {
- Logger.trace(`ProjectTree.waitProjectImportedNoSubfolder project not located, reloading page.`);
- await this.driverHelper.reloadPage();
- await this.driverHelper.wait(triesPolling);
- await this.ide.waitAndSwitchToIdeFrame();
- await this.ide.waitIde();
- await this.openProjectTreeContainer();
- continue;
- }
-
- return;
- }
-
- throw new error.TimeoutError('Exceeded the maximum number of checking attempts, project has not been imported');
- }
-
- private async getWorkspacePathEntry(): Promise {
- const nodeAttribute: string = 'data-node-id';
- const splitDelimeter = ':';
- const attribute: string = await this.driverHelper.waitAndGetElementAttribute(By.css(`div[${nodeAttribute}]`), nodeAttribute, TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
- return attribute.split(splitDelimeter)[0] + splitDelimeter;
- }
-
- private getLeftToolbarButtonActiveLocator(buttonTitle: String): By {
- return By.xpath(`//div[@id='theia-left-content-panel']//ul[@class='p-TabBar-content']` +
- `//li[@title[contains(.,'${buttonTitle}')] and contains(@id, 'shell-tab') and contains(@class, 'p-mod-current')]`);
- }
-
- private async getItemCss(itemPath: string): Promise {
- const entry: string = await this.getWorkspacePathEntry();
- return `div[id='${entry}/projects/${itemPath}']`;
- }
-
- private async getCollapsedItemCssLocator(itemPath: string): Promise {
- const item: string = await this.getExpandIconCssLocator(itemPath);
- return item + '.theia-mod-collapsed';
- }
-
- private async getExpandedItemCssLocator(itemPath: string): Promise {
- const item: string = await this.getExpandIconCssLocator(itemPath);
- return item + ':not(.theia-mod-collapsed)';
- }
-
- private async getExpandIconCssLocator(itemPath: string): Promise {
- const items: Array = itemPath.split('/');
- const entry: string = items.length > 1 ? await this.getWorkspacePathEntry() : '';
- return `div[data-node-id='${entry}/projects/${itemPath}']`;
- }
-
- private getTreeItemCssLocator(itemPath: string): string {
- return `.theia-TreeNode[title='/projects/${itemPath}']`;
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/QuickOpenContainer.ts b/tests/e2e/pageobjects/ide/QuickOpenContainer.ts
deleted file mode 100644
index 553493dba1..0000000000
--- a/tests/e2e/pageobjects/ide/QuickOpenContainer.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-@injectable()
-export class QuickOpenContainer {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- public async waitContainer(timeout: number = TimeoutConstants.TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT) {
- Logger.debug('QuickOpenContainer.waitContainer');
-
- const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'monaco-quick-open-widget\']');
- await this.driverHelper.waitVisibility(monacoQuickOpenContainerLocator, timeout);
- }
-
- public async waitContainerDisappearance() {
- Logger.debug('QuickOpenContainer.waitContainerDisappearance');
-
- const monacoQuickOpenContainerLocator: By = By.xpath('//div[@class=\'monaco-quick-open-widget\' and @aria-hidden=\'true\']');
- await this.driverHelper.waitDisappearance(monacoQuickOpenContainerLocator);
- }
-
- public async clickOnContainerItem(itemText: string, timeout: number = TimeoutConstants.TS_SELENIUM_TOP_MENU_QUICK_CONTAINER_TIMEOUT) {
- Logger.debug(`QuickOpenContainer.clickOnContainerItem "${itemText}"`);
-
- const quickContainerItemLocator: By = By.css(`div[aria-label="${itemText}, picker"]`);
- await this.waitContainer(timeout);
- await this.driverHelper.waitAndClick(quickContainerItemLocator, timeout);
- await this.waitContainerDisappearance();
- }
-
- public async type(text: string) {
- Logger.debug(`QuickOpenContainer.type "${text}"`);
- await this.driverHelper.enterValue(By.css('.quick-open-input input'), text);
- }
-
- public async typeAndSelectSuggestion(text: string, suggestedText: string) {
- Logger.debug('QuickOpenContainer.typeAndSelectSuggestion');
-
- await this.driverHelper.type(By.css('div.monaco-inputbox input.input'), text);
- // sometimes the UI dropdawn may closed unexpectedly for more stability add 500ms delay.
- await this.driverHelper.wait(2000);
- await this.clickOnContainerItem(suggestedText);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/RightToolBar.ts b/tests/e2e/pageobjects/ide/RightToolBar.ts
deleted file mode 100644
index ae1f0e835c..0000000000
--- a/tests/e2e/pageobjects/ide/RightToolBar.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class RightToolBar {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitToolbar(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('RightToolbar.waitToolbar');
-
- await this.driverHelper.waitVisibility(By.css('div.theia-app-right'), timeout);
- }
-
- async clickOnToolIcon(iconTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`RightToolbar.clickOnToolIcon "${iconTitle}"`);
-
- const toolIconLocator: By = By.css(`div.theia-app-right .p-TabBar-content li[title='${iconTitle}']`);
-
- await this.driverHelper.waitAndClick(toolIconLocator, timeout);
- }
-}
diff --git a/tests/e2e/pageobjects/ide/Terminal.ts b/tests/e2e/pageobjects/ide/Terminal.ts
deleted file mode 100644
index 67ae0c355e..0000000000
--- a/tests/e2e/pageobjects/ide/Terminal.ts
+++ /dev/null
@@ -1,242 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By, Key, WebElement, error } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class Terminal {
- private static readonly TERMINAL_ROWS_XPATH_LOCATOR_PREFFIX = '(//div[contains(@class, \'terminal-container\')]//div[contains(@class, \'terminal\')]//div[contains(@class, \'xterm-rows\')])';
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.waitTab "${tabTitle}"`);
-
- const terminalTabLocator: By = By.css(this.getTerminalTabCssLocator(tabTitle));
-
- await this.driverHelper.waitVisibility(terminalTabLocator, timeout);
- }
-
- async waitTabAbsence(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.waitTabAbsence "${tabTitle}"`);
-
- const terminalTabLocator: By = By.css(this.getTerminalTabCssLocator(tabTitle));
-
- await this.driverHelper.waitDisappearanceWithTimeout(terminalTabLocator, timeout);
- }
-
- async clickOnTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.clickOnTab "${tabTitle}"`);
-
- const terminalTabLocator: By = By.css(`${this.getTerminalTabCssLocator(tabTitle)} div.theia-tab-icon-label`);
-
- await this, this.driverHelper.waitAndClick(terminalTabLocator, timeout);
- }
-
- async waitTabFocused(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.waitTabFocused "${tabTitle}"`);
-
- const focusedTerminalTabLocator: By = this.getFocusedTerminalTabLocator(tabTitle);
-
- await this.driverHelper.waitVisibility(focusedTerminalTabLocator, timeout);
- }
-
- async selectTerminalTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.selectTerminalTab "${tabTitle}"`);
-
- await this.clickOnTab(tabTitle, timeout);
- await this.waitTabFocused(tabTitle, timeout);
- }
-
- async clickOnTabCloseIcon(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.clickOnTabCloseIcon "${tabTitle}"`);
-
- const terminalTabCloseIconLocator: By =
- By.css(`${this.getTerminalTabCssLocator(tabTitle)} div.p-TabBar-tabCloseIcon`);
-
- await this.driverHelper.waitAndClick(terminalTabCloseIconLocator, timeout);
- }
-
- async closeTerminalTab(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.closeTerminalTab "${tabTitle}"`);
-
- await this.clickOnTabCloseIcon(tabTitle, timeout);
- await this.waitTabAbsence(tabTitle, timeout);
- }
-
- async type(terminalTabTitle: string, text: string) {
- Logger.debug(`Terminal.type "${terminalTabTitle}"`);
-
- const terminalIndex: number = await this.getTerminalIndex(terminalTabTitle);
- const terminalInteractionContainer: By = this.getTerminalEditorInteractionEditorLocator(terminalIndex);
-
- await this.driverHelper.typeToInvisible(terminalInteractionContainer, text);
- }
-
- async rejectTerminalProcess(tabTitle: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.rejectTerminalProcess "${tabTitle}"`);
-
- await this.selectTerminalTab(tabTitle, timeout);
- await this.type(tabTitle, Key.chord(Key.CONTROL, 'c'));
- }
-
- async getText(terminalTab: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT): Promise {
- Logger.debug(`Terminal.getText tab: ${terminalTab}`);
-
- const terminalIndex: number = await this.getTerminalIndex(terminalTab);
- await this.selectTerminalTab(terminalTab, timeout);
- return await this.driverHelper.waitAndGetText(By.xpath(Terminal.TERMINAL_ROWS_XPATH_LOCATOR_PREFFIX + `[${terminalIndex}]`), timeout);
- }
-
- async getTextFromProblemsTab(timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT): Promise {
- Logger.debug(`Terminal.getTextFromProblemsTab`);
-
- const problemsTabBodyLocator: By = By.xpath(`//div[@id='problems']`);
-
- return await this.driverHelper.waitAndGetText(problemsTabBodyLocator, timeout);
- }
-
- async selectTabByPrefixAndWaitText(terminalTab: string, expectedText: string, timeout: number = TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT) {
- Logger.debug(`Terminal.selectTabByPrefixAndWaitText tab: ${terminalTab} text: ${expectedText}`);
-
- const terminalTabLocatorWithPreffix: string = `//li[contains(@title, '${terminalTab}')]`;
- const terminalIndex: number = await this.getTerminalIndex(terminalTab);
-
- await this.driverHelper.waitAndClick(By.xpath(terminalTabLocatorWithPreffix), timeout);
- await this.driverHelper.waitUntilTrue(async () => {
- const terminalText: string = await this.driverHelper.waitAndGetText(By.xpath(Terminal.TERMINAL_ROWS_XPATH_LOCATOR_PREFFIX + `[${terminalIndex}]`), timeout);
- return terminalText.includes(expectedText);
-
- }, timeout);
- }
-
- async waitText(terminalTab: string, expectedText: string, timeout: number) {
- Logger.debug(`Terminal.waitText tab: ${terminalTab} text: ${expectedText}`);
-
- await this.selectTerminalTab(terminalTab, timeout);
- await this.driverHelper.waitUntilTrue(async () => {
- // separates each method iteration to the readable blocks in the terminal log
- Logger.debug('----------------------------------------------');
-
- const terminalText: string = await this.getText(terminalTab, timeout);
-
- if (terminalText.includes(expectedText)) {
- Logger.debug('Expected text is present in the terminal output');
- return true;
- }
-
- Logger.debug('Expected text is not present in the terminal output');
- await this.driverHelper.wait(1000);
- return false;
-
- }, timeout);
- }
-
- async waitTextInProblemsTab(expectedText: string, timeout: number) {
- Logger.debug(`Terminal.waitTextInProblemsTab`);
-
- await this.selectTerminalTab('Problems', timeout);
- await this.driverHelper.waitUntilTrue(async () => {
- // separates each method iteration to the readable blocks in the terminal log
- Logger.debug('----------------------------------------------');
-
- const terminalText: string = await this.getTextFromProblemsTab(timeout);
-
- if (terminalText.includes(expectedText)) {
- Logger.debug('Expected text is present in the terminal output');
- return true;
- }
-
- Logger.debug('Expected text is not present in the terminal output');
- await this.driverHelper.wait(1000);
- return false;
-
- }, timeout);
- }
-
- public async waitIconSuccess(taskName: string, timeout: number) {
- const terminalTabLocator: By = By.css(`${this.getTerminalTabCssLocator(taskName)} div.p-TabBar-tabIcon`);
- await this.driverHelper.waitVisibility(terminalTabLocator, TimeoutConstants.TS_SELENIUM_TERMINAL_DEFAULT_TIMEOUT);
- let terminalClass = await this.driverHelper.waitAndGetElementAttribute(terminalTabLocator, 'class');
-
- await this.driverHelper.getDriver().wait(async () => {
- terminalClass = await this.driverHelper.waitAndGetElementAttribute(terminalTabLocator, 'class');
- if (terminalClass.includes('fa-check')) { // css for tick icon
- return true;
- }
- if (terminalClass.includes('fa-times-circle')) { // css for failed icon
- Logger.error('Task "' + taskName + '" failed.');
- throw new Error('Task "' + taskName + '" failed.');
- }
- return false;
- }, timeout, 'Timed out waiting for task ' + taskName + ' to succeed.');
- }
-
- private getTerminalTabCssLocator(tabTitle: string): string {
- return `li[title='${tabTitle}']`;
- }
-
- private getFocusedTerminalTabLocator(tabTitle: string): By {
- return By.css(`li[title='${tabTitle}'].p-mod-current.theia-mod-active`);
- }
-
- private async getTerminalIndex(terminalTitle: string): Promise {
- for (let i: number = 0; i < 10; i++) {
- try {
- return await this.searchTerminalIndex(terminalTitle);
- } catch (err) {
- if (!(err instanceof error.NoSuchElementError)) {
- throw err;
- }
-
- if ((err instanceof error.NoSuchElementError) && (i === 9)) {
- throw err;
- }
-
- await this.driverHelper.wait(2000);
- }
- }
-
- throw new error.NoSuchElementError(`The terminal with title '${terminalTitle}' has not been found.`);
- }
-
- private async searchTerminalIndex(terminalTitle: string): Promise {
- const terminalTabTitleXpathLocator: string = `//div[@id='theia-bottom-content-panel']` +
- `//li[contains(@id, 'shell-tab-terminal') or contains(@id, 'shell-tab-plugin')]` +
- `//div[@class='p-TabBar-tabLabel']`;
-
- const terminalTabs: WebElement[] = await this.driverHelper.waitAllPresence(By.xpath(terminalTabTitleXpathLocator));
- let terminalTitles: string[] = [];
-
-
- for (let i: number = 1; i <= terminalTabs.length; i++) {
- const terminalTabLocator: By = By.xpath(`(${terminalTabTitleXpathLocator})[${i}]`);
- const currentTerminalTitle: string = await this.driverHelper.waitAndGetText(terminalTabLocator);
-
- if (currentTerminalTitle.search(terminalTitle) > -1) {
- return i;
- }
-
- terminalTitles.push(currentTerminalTitle);
- }
-
- throw new error.NoSuchElementError(`The terminal with title '${terminalTitle}' has not been found.\n` +
- ` > List of the tabs:\n > ${terminalTitles}`);
-
- }
-
- private getTerminalEditorInteractionEditorLocator(terminalIndex: number): By {
- return By.xpath(`(//textarea[@aria-label='Terminal input'])[${terminalIndex}]`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/TopMenu.ts b/tests/e2e/pageobjects/ide/TopMenu.ts
deleted file mode 100644
index 704b4d5497..0000000000
--- a/tests/e2e/pageobjects/ide/TopMenu.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { By, error } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { QuickOpenContainer } from './QuickOpenContainer';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-@injectable()
-export class TopMenu {
- private static readonly TOP_MENU_BUTTONS: string[] = ['File', 'Edit', 'Selection', 'View', 'Go', 'Run', 'Terminal', 'Help'];
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.QuickOpenContainer) private readonly quickOpenContainer: QuickOpenContainer) { }
-
- public async waitTopMenu(timeout: number = TimeoutConstants.TS_SELENIUM_TOOLBAR_TIMEOUT) {
- Logger.debug('TopMenu.waitTopMenu');
-
- for (const buttonText of TopMenu.TOP_MENU_BUTTONS) {
- const buttonLocator: By = this.getTopMenuButtonLocator(buttonText);
- await this.driverHelper.waitVisibility(buttonLocator, timeout);
- }
- }
-
- public async selectOption(topMenuButtonText: string, submenuItemtext: string) {
- Logger.debug(`TopMenu.selectOption "${topMenuButtonText}"`);
-
- await this.clickOnTopMenuButton(topMenuButtonText);
- await this.clickOnSubmenuItem(submenuItemtext);
- }
-
- public async clickOnTopMenuButton(buttonText: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`TopMenu.clickOnTopMenuButton "${buttonText}"`);
-
- const buttonLocator: By = this.getTopMenuButtonLocator(buttonText);
-
- await this.driverHelper.waitAndClick(buttonLocator, timeout);
- }
-
- public async clickOnSubmenuItem(itemText: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.debug(`TopMenu.clickOnSubmenuItem "${itemText}"`);
-
- const submenuItemLocator: By = this.getSubmenuItemLocator(itemText);
-
- // to ensure that drop-down animation is over
- await this.driverHelper.wait(3000);
-
- await this.driverHelper.waitAndClick(submenuItemLocator, timeout);
- }
-
- public async runTask(task: string) {
- await this.selectOption('Terminal', 'Run Task...');
-
- try {
- await this.quickOpenContainer.waitContainer();
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- console.log(`After clicking to the "Terminal" -> "Run Task ..." the "Quick Open Container" has not been displayed, one more try`);
-
- await this.selectOption('Terminal', 'Run Task...');
- await this.quickOpenContainer.waitContainer();
- }
- }
-
- await this.quickOpenContainer.clickOnContainerItem(task);
- }
-
- public async openTerminalForSpecificContainer(containerName: string) {
- await this.selectOption('Terminal', 'Open Terminal in specific container');
-
- try {
- await this.quickOpenContainer.waitContainer();
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- Logger.info(`After clicking to the "Terminal" -> "Open Terminal in specific container" the "Quick Open Container" has not been displayed, one more try`);
-
- await this.selectOption('Terminal', 'Open Terminal in specific container');
- await this.quickOpenContainer.waitContainer();
- }
- }
-
- await this.quickOpenContainer.clickOnContainerItem(containerName);
- }
-
- private getTopMenuButtonLocator(buttonText: string): By {
- return By.xpath(`//div[@id='theia:menubar']//div[@class='p-MenuBar-itemLabel' and text()='${buttonText}']`);
- }
-
- private getSubmenuItemLocator(submenuItemtext: string): By {
- return By.xpath(`//ul[@class='p-Menu-content']//li[@data-type='command']//div[text()='${submenuItemtext}']`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/plugins/KubernetesPlugin.ts b/tests/e2e/pageobjects/ide/plugins/KubernetesPlugin.ts
deleted file mode 100644
index 4643a9c230..0000000000
--- a/tests/e2e/pageobjects/ide/plugins/KubernetesPlugin.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../../inversify.types';
-import { DriverHelper } from '../../../utils/DriverHelper';
-import { Logger } from '../../../utils/Logger';
-import { By } from 'selenium-webdriver';
-import { TimeoutConstants } from '../../../TimeoutConstants';
-import { LeftToolBar } from '../LeftToolBar';
-
-
-
-@injectable()
-export class KubernetesPlugin {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.LeftToolBar) private readonly leftToolbar: LeftToolBar) { }
-
-
- async openView(timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.openView`);
-
- await this.leftToolbar.selectView('Kubernetes', timeout);
- }
-
- async clickToSection(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.clickToSection ${sectionTitle}`);
-
- const sectionLocator: By = By.xpath(this.getSectionLocator(sectionTitle));
-
- await this.driverHelper.waitAndClick(sectionLocator, timeout);
- }
-
- async isSectionExpanded(sectionTitle: string): Promise {
- Logger.debug(`KubernetesPlugin.isSectionExpanded ${sectionTitle}`);
-
- const expandedsectionLocator: By = this.getExpandedSectionLocator(sectionTitle);
-
- return await this.driverHelper.isVisible(expandedsectionLocator);
- }
-
- async waitSectionExpanded(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.waitSectionExpanded ${sectionTitle}`);
-
- await this.driverHelper.waitVisibility(this.getExpandedSectionLocator(sectionTitle), timeout);
- }
-
- async waitSectionCollapsed(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.waitSectionCollapsed ${sectionTitle}`);
-
- await this.driverHelper.waitVisibility(this.getCollapsedSectionLocator(sectionTitle), timeout);
- }
-
- async expandSection(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.expandSection ${sectionTitle}`);
-
- if (await this.isSectionExpanded(sectionTitle)) {
- return;
- }
-
- await this.clickToSection(sectionTitle, timeout);
- await this.waitSectionExpanded(sectionTitle, timeout);
- }
-
- async clickToRefreshButton(sectionTitle: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.clickToRefreshButton`);
-
- const refreshButtonLocator: By = By.xpath(`//div[contains(@class, 'theia-header')]//div[contains(@class, 'theia-view-container-part-title')]//div[@title='Refresh']`);
- const sectionTitleLocator: By = By.xpath(this.getSectionLocator(sectionTitle));
-
- await this.driverHelper.scrollTo(sectionTitleLocator, timeout);
- await this.driverHelper.waitAndClick(refreshButtonLocator, timeout);
- }
-
- async waitListItemContains(partialText: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.waitListItemContains ${partialText}`);
-
- await this.driverHelper.waitVisibility(this.getListItemPartialTextLocator(partialText), timeout);
- }
-
- async waitListItem(expectedText: string, timeout: number = TimeoutConstants.TS_PROJECT_TREE_TIMEOUT) {
- Logger.debug(`KubernetesPlugin.waitListItem ${expectedText}`);
-
- await this.driverHelper.waitVisibility(this.getListItemTextLocator(expectedText), timeout);
- }
-
- private getSectionLocator(sectionTitle: string): string {
- return `//div[contains(@class, 'theia-header')]//span[@title='${sectionTitle}']`;
- }
-
- private getExpandedSectionLocator(sectionTitle: string): By {
- return By.xpath(`${this.getSectionLocator(sectionTitle)}/parent::div/span[contains(@class, 'theia-ExpansionToggle') and not(contains(@class, 'theia-mod-collapsed'))]`);
- }
-
- private getCollapsedSectionLocator(sectionTitle: string): By {
- return By.xpath(`${this.getSectionLocator(sectionTitle)}/parent::div/span[contains(@class, 'theia-ExpansionToggle') and contains(@class, 'theia-mod-collapsed')]`);
- }
-
- private getListItemPartialTextLocator(partialText: string): By {
- return By.xpath(`//div[contains(@class, 'body')]//div[@class='theia-TreeContainer']//div[@class='theia-TreeNodeContent']//span[contains(text(), '${partialText}')]`);
- }
-
- private getListItemTextLocator(expectedText: string): By {
- return By.xpath(`//div[contains(@class, 'body')]//div[@class='theia-TreeContainer']//div[@class='theia-TreeNodeContent']//span[text()='${expectedText}']`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/ide/plugins/PluginsView.ts b/tests/e2e/pageobjects/ide/plugins/PluginsView.ts
deleted file mode 100644
index 84ad7e2e79..0000000000
--- a/tests/e2e/pageobjects/ide/plugins/PluginsView.ts
+++ /dev/null
@@ -1,183 +0,0 @@
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../../inversify.types';
-import { DriverHelper } from '../../../utils/DriverHelper';
-import { Logger } from '../../../utils/Logger';
-import { By, error } from 'selenium-webdriver';
-import { TimeoutConstants } from '../../../TimeoutConstants';
-import { LeftToolBar } from '../LeftToolBar';
-import { TopMenu } from '../TopMenu';
-
-
-
-@injectable()
-export class PluginsView {
- private static readonly SEARCH_FIELD_LOCATOR: By = By.xpath(`//div[@class='che-plugin-control-panel']//input`);
- private static readonly PLUGINS_LOADER: By = By.xpath(`//div[@id='theia-left-side-panel']//div[@class='spinnerContainer']`);
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.LeftToolBar) private readonly leftToolbar: LeftToolBar,
- @inject(CLASSES.TopMenu) private readonly topMenu: TopMenu) { }
-
- async waitTitle(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitTitle');
-
- await this.driverHelper.waitVisibility(By.xpath(`//div[@title='Plugins']`), timeout);
- }
-
- async waitPluginsLoader(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitPluginsLoader');
-
- await this.driverHelper.waitVisibility(PluginsView.PLUGINS_LOADER, timeout);
- }
-
- async waitPluginsLoaderDisappearance(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitPluginsLoaderDisappearance');
-
- await this.driverHelper.waitDisappearance(PluginsView.PLUGINS_LOADER, timeout);
- }
-
- async openView(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.openView');
-
- await this.openViewByTopMenu();
- await this.waitPluginsLoader(timeout);
- await this.waitPluginsLoaderDisappearance(timeout);
- await this.waitView(timeout);
- }
-
- async clickPluginsViewButton(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.clickPluginsViewButton');
-
- await this.leftToolbar.clickOnToolIcon('Plugins', timeout);
- }
-
- async selectPlugins(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.selectPlugins');
-
- await this.leftToolbar.selectView('Plugins', timeout);
- }
-
- async waitSearchField(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitSearchField');
-
- await this.driverHelper.waitVisibility(PluginsView.SEARCH_FIELD_LOCATOR, timeout);
- }
-
- async typeTextToSearchField(text: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.typeTextToSearchField');
-
- // search field performs searching during typing
- // if try to write whole word at once
- // it will cause to the random result
- for (let i: number = 0; i < text.length; i++) {
- await this.driverHelper.type(PluginsView.SEARCH_FIELD_LOCATOR, text.charAt(i), timeout);
- await this.driverHelper.wait(2000);
- }
- }
-
- async waitView(timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitView');
-
- await this.waitTitle(timeout);
- await this.waitSearchField(timeout);
- }
-
- async waitPlugin(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitPlugin');
-
- const pluginLocator: By = By.xpath(`${this.getPluginBaseLocator(pluginTitle)}`);
-
- await this.driverHelper.waitVisibility(pluginLocator, timeout);
- }
-
- async waitInstallButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitInstallButton');
-
- const installButtonLocator: By = this.getInstallButtonLocator(pluginTitle);
-
- await this.driverHelper.waitVisibility(installButtonLocator, timeout);
- }
-
- async clickInstallButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.clickInstallButton');
-
- const installButtonLocator: By = this.getInstallButtonLocator(pluginTitle);
-
- await this.driverHelper.waitAndClick(installButtonLocator, timeout);
- }
-
- async waitInstalledButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitInstalledButton');
-
- const installedButtonLocator: By = this.getInstalledButtonLocator(pluginTitle);
-
- await this.driverHelper.waitVisibility(installedButtonLocator, timeout);
- }
-
- async clickInstalledButton(pluginTitle: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.clickInstalledButton');
-
- const installedButtonLocator: By = this.getInstalledButtonLocator(pluginTitle);
-
- await this.driverHelper.waitAndClick(installedButtonLocator, timeout);
- }
-
- async waitPluginNotification(notificationText: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.waitPluginNotification');
-
- const pluginNotificationLocator: By = this.getPluginNotificationLocator(notificationText);
-
- await this.driverHelper.waitVisibility(pluginNotificationLocator);
- }
-
- async clickPluginNotification(notificationText: string, timeout: number = TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT) {
- Logger.debug('PluginsView.clickPluginNotification');
-
- const pluginNotificationLocator: By = this.getPluginNotificationLocator(notificationText);
-
- await this.driverHelper.waitAndClick(pluginNotificationLocator);
- }
-
- private async openViewByTopMenu() {
- await this.topMenu.clickOnTopMenuButton('View');
-
- try {
- await this.topMenu.clickOnSubmenuItem('Plugins');
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- Logger.debug('The "View" menu is not opened, try again');
-
- await this.topMenu.clickOnTopMenuButton('View');
- await this.topMenu.clickOnSubmenuItem('Plugins');
- }
- }
-
- private getPluginNotificationLocator(notificationText: string): By {
- const pluginNotificationXpath: string = `//div[@class='che-plugins-notification']//div[@class='notification-message-text' and text()='${notificationText}']`;
-
- return By.xpath(pluginNotificationXpath);
- }
-
- private getPluginBaseLocator(pluginTitle: string): string {
- return `//div[@class='che-plugin-content']//div[@class='che-plugin-name']/span[text()='${pluginTitle}']/parent::div/parent::div/parent::div/parent::div`;
- }
-
- private getInstallButtonLocator(pluginTitle: string): By {
- const basePluginXpath: string = this.getPluginBaseLocator(pluginTitle);
- const relativeInstallButtonXpath: string = `//div[@class='che-plugin-action-add' and text()='Install']`;
-
- return By.xpath(`${basePluginXpath}${relativeInstallButtonXpath}`);
- }
-
- private getInstalledButtonLocator(pluginTitle: string): By {
- const basePluginXpath: string = this.getPluginBaseLocator(pluginTitle);
- const relativeInstalledButtonXpath: string = `//div[@class='che-plugin-action-remove' and text()='Installed']`;
-
- return By.xpath(`${basePluginXpath}${relativeInstalledButtonXpath}`);
- }
-
-}
diff --git a/tests/e2e/pageobjects/login/ICheLoginPage.ts b/tests/e2e/pageobjects/login/ICheLoginPage.ts
deleted file mode 100644
index 2334fe61d6..0000000000
--- a/tests/e2e/pageobjects/login/ICheLoginPage.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-export interface ICheLoginPage {
- login(): void;
-}
diff --git a/tests/e2e/pageobjects/login/IOcpLoginPage.ts b/tests/e2e/pageobjects/login/IOcpLoginPage.ts
deleted file mode 100644
index a52bc1203c..0000000000
--- a/tests/e2e/pageobjects/login/IOcpLoginPage.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-export interface IOcpLoginPage {
- login(): void;
-}
diff --git a/tests/e2e/pageobjects/login/MultiUserLoginPage.ts b/tests/e2e/pageobjects/login/MultiUserLoginPage.ts
deleted file mode 100644
index 88454e57e9..0000000000
--- a/tests/e2e/pageobjects/login/MultiUserLoginPage.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { ICheLoginPage } from './ICheLoginPage';
-import { CheLoginPage } from '../openshift/CheLoginPage';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { Logger } from '../../utils/Logger';
-
-@injectable()
-export class MultiUserLoginPage implements ICheLoginPage {
-
- constructor(
- @inject(CLASSES.CheLoginPage) private readonly cheLogin: CheLoginPage) { }
-
- async login() {
- Logger.debug('MultiUserLoginPage.login');
-
- await this.cheLogin.waitEclipseCheLoginFormPage();
- await this.cheLogin.inputUserNameEclipseCheLoginPage(TestConstants.TS_SELENIUM_USERNAME);
- await this.cheLogin.inputPaswordEclipseCheLoginPage(TestConstants.TS_SELENIUM_PASSWORD);
- await this.cheLogin.clickEclipseCheLoginButton();
- }
-
-}
diff --git a/tests/e2e/pageobjects/login/OcpUserLoginPage.ts b/tests/e2e/pageobjects/login/OcpUserLoginPage.ts
deleted file mode 100644
index 4944dde44a..0000000000
--- a/tests/e2e/pageobjects/login/OcpUserLoginPage.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { IOcpLoginPage } from './IOcpLoginPage';
-import { injectable, inject } from 'inversify';
-import { OcpLoginPage } from '../openshift/OcpLoginPage';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { Logger } from '../../utils/Logger';
-
-@injectable()
-export class OcpUserLoginPage implements IOcpLoginPage {
-
- constructor(
- @inject(CLASSES.OcpLoginPage) private readonly ocpLogin: OcpLoginPage) { }
-
- async login() {
- Logger.debug('OcpUserLoginPage.login');
-
- if (TestConstants.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE !== '') {
- await this.ocpLogin.clickOnLoginProviderTitle();
- }
-
- await this.ocpLogin.waitOpenShiftLoginWelcomePage();
- await this.ocpLogin.enterUserNameOpenShift(TestConstants.TS_SELENIUM_OCP_USERNAME);
- await this.ocpLogin.enterPasswordOpenShift(TestConstants.TS_SELENIUM_OCP_PASSWORD);
- await this.ocpLogin.clickOnLoginButton();
- await this.ocpLogin.waitDisappearanceOpenShiftLoginWelcomePage();
- }
-
-}
diff --git a/tests/e2e/pageobjects/login/RegularUserOcpCheLoginPage.ts b/tests/e2e/pageobjects/login/RegularUserOcpCheLoginPage.ts
deleted file mode 100644
index 7c8af6eefe..0000000000
--- a/tests/e2e/pageobjects/login/RegularUserOcpCheLoginPage.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { ICheLoginPage } from './ICheLoginPage';
-import { OcpLoginPage } from '../openshift/OcpLoginPage';
-import { CheLoginPage } from '../openshift/CheLoginPage';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { Logger } from '../../utils/Logger';
-
-@injectable()
-export class RegularUserOcpCheLoginPage implements ICheLoginPage {
-
- constructor(
- @inject(CLASSES.OcpLoginPage) private readonly ocpLogin: OcpLoginPage,
- @inject(CLASSES.CheLoginPage) private readonly cheLogin: CheLoginPage) { }
-
- async login() {
- Logger.debug('RegularUserOcpCheLoginPage.login');
-
- if (await this.ocpLogin.isIdentityProviderLinkVisible()) {
- await this.ocpLogin.clickOnLoginProviderTitle();
- }
-
- await this.ocpLogin.waitOpenShiftLoginWelcomePage();
- await this.ocpLogin.enterUserNameOpenShift(TestConstants.TS_SELENIUM_OCP_USERNAME);
- await this.ocpLogin.enterPasswordOpenShift(TestConstants.TS_SELENIUM_OCP_PASSWORD);
- await this.ocpLogin.clickOnLoginButton();
- await this.ocpLogin.waitDisappearanceOpenShiftLoginWelcomePage();
-
- if (await this.ocpLogin.isAuthorizeOpenShiftIdentityProviderPageVisible()) {
- await this.ocpLogin.waitAuthorizeOpenShiftIdentityProviderPage();
- await this.ocpLogin.clickOnApproveAuthorizeAccessButton();
- }
-
- if (await this.cheLogin.isFirstBrokerLoginPageVisible()) {
- await this.cheLogin.waitFirstBrokerLoginPage();
- await this.cheLogin.enterEmailFirstBrokerLoginPage(TestConstants.TS_SELENIUM_EMAIL_USER);
- await this.cheLogin.enterFirstNameBrokerLoginPage(TestConstants.TS_SELENIUM_FIRST_NAME);
- await this.cheLogin.enterLastNameBrokerLoginPage(TestConstants.TS_SELENIUM_LAST_NAME);
- await this.cheLogin.clickOnSubmitButton();
- await this.cheLogin.waitDisappearanceBrokerLoginPage();
- }
-
- if (await this.ocpLogin.isLinkAccountPageVisible()) {
- await this.ocpLogin.clickOnLinkAccountButton();
- await this.cheLogin.waitEclipseCheLoginFormPage();
- await this.cheLogin.inputPaswordEclipseCheLoginPage(TestConstants.TS_SELENIUM_PASSWORD);
- await this.cheLogin.clickEclipseCheLoginButton();
- }
- }
-
-}
diff --git a/tests/e2e/pageobjects/login/UpdateAccountInformationPage.ts b/tests/e2e/pageobjects/login/UpdateAccountInformationPage.ts
deleted file mode 100644
index d72e0ce378..0000000000
--- a/tests/e2e/pageobjects/login/UpdateAccountInformationPage.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { Logger } from '../../utils/Logger';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { By } from 'selenium-webdriver';
-
-@injectable()
-export class UpdateAccountInformationPage {
-
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async enterEmail(email: string, timeout: number) {
- Logger.debug('UpdateAccountInformationPage.enterEmail');
-
- await this.driverHelper.enterValue(By.id('email'), email, timeout);
- }
-
- async enterFirstName(firstName: string, timeout: number) {
- Logger.debug('UpdateAccountInformationPage.enterFirstName');
-
- await this.driverHelper.enterValue(By.id('firstName'), firstName, timeout);
- }
-
- async enterLastName(lastName: string, timeout: number) {
- Logger.debug('UpdateAccountInformationPage.enterLastName');
-
- await this.driverHelper.enterValue(By.id('lastName'), lastName, timeout);
- }
-
- async clickConfirmButton(timeout: number) {
- Logger.debug('UpdateAccountInformationPage.clickConfirmButton');
-
- await this.driverHelper.waitAndClick(By.xpath('//input[@type=\'submit\']'), timeout);
- }
-
- async clickAddToExistingAccountButton(timeout: number) {
- Logger.debug('UpdateAccountInformationPage.clickAddToExistingAccountButton');
-
- await this.driverHelper.waitAndClick(By.id('linkAccount'), timeout);
- }
-
- async enterPassword(password: string, timeout: number) {
- Logger.debug('UpdateAccountInformationPage.enterPassword');
-
- await this.driverHelper.enterValue(By.id('password'), password, timeout);
- }
-
- async clickLogInButton(timeout: number) {
- Logger.debug('UpdateAccountInformationPage.clickLogInButton');
-
- await this.driverHelper.waitAndClick(By.id('kc-login'), timeout);
- }
-
- async clickToAllowSelectedPermissionsButton(timeout: number) {
- Logger.debug('UpdateAccountInformationPage.clickToAllowSelectedPermissionsButton');
-
- await this.driverHelper.waitAndClick(By.xpath('//input[@name=\'approve\']'), timeout);
- }
-
-}
diff --git a/tests/e2e/pageobjects/openshift/CheLoginPage.ts b/tests/e2e/pageobjects/openshift/CheLoginPage.ts
deleted file mode 100644
index 2f7e197fe7..0000000000
--- a/tests/e2e/pageobjects/openshift/CheLoginPage.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class CheLoginPage {
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async waitEclipseCheLoginFormPage() {
- Logger.debug('CheLoginPage.waitEclipseCheLoginFormPage');
-
- await this.driverHelper.waitVisibility(By.id('kc-form-login'), TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
- }
-
- async inputUserNameEclipseCheLoginPage(userName: string) {
- Logger.debug(`CheLoginPage.inputUserNameEclipseCheLoginPage username: "${userName}"`);
-
- await this.driverHelper.enterValue(By.id('username'), userName);
- }
-
- async inputPaswordEclipseCheLoginPage(passw: string) {
- Logger.debug(`CheLoginPage.inputPaswordEclipseCheLoginPage password: "${passw}"`);
-
- await this.driverHelper.enterValue(By.id('password'), passw);
- }
-
- async clickEclipseCheLoginButton() {
- Logger.debug('CheLoginPage.clickEclipseCheLoginButton');
-
- await this.driverHelper.waitAndClick(By.id('kc-login'));
- }
-
- async isFirstBrokerLoginPageVisible(): Promise {
- Logger.debug('CheLoginPage.waitFirstBrokerLoginPage');
-
- return await this.driverHelper.isVisible(By.id('kc-update-profile-form'));
- }
-
- async waitFirstBrokerLoginPage() {
- Logger.debug('CheLoginPage.waitFirstBrokerLoginPage');
-
- await this.driverHelper.waitVisibility(By.id('kc-update-profile-form'), TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
- }
-
- async enterEmailFirstBrokerLoginPage(email: string) {
- Logger.debug(`CheLoginPage.enterEmailFirstBrokerLoginPage "${email}"`);
-
- await this.driverHelper.enterValue(By.id('email'), email);
- }
-
- async enterFirstNameBrokerLoginPage(firstName: string) {
- Logger.debug(`CheLoginPage.enterFirstNameBrokerLoginPage "${firstName}"`);
-
- await this.driverHelper.enterValue(By.id('firstName'), firstName);
- }
-
- async enterLastNameBrokerLoginPage(lastName: string) {
- Logger.debug(`CheLoginPage.enterLastNameBrokerLoginPage "${lastName}"`);
-
- await this.driverHelper.enterValue(By.id('lastName'), lastName);
- }
-
- async clickOnSubmitButton() {
- Logger.debug('CheLoginPage.clickOnSubmitButton');
-
- const submitButtonlocator: By = By.css('input[type=submit]');
- await this.driverHelper.waitAndClick(submitButtonlocator);
- }
-
- async waitDisappearanceBrokerLoginPage() {
- Logger.debug('CheLoginPage.waitDisappearanceBrokerLoginPage');
-
- await this.driverHelper.waitDisappearance(By.id('kc-update-profile-form'));
- }
-
-}
diff --git a/tests/e2e/pageobjects/openshift/OcpLoginPage.ts b/tests/e2e/pageobjects/openshift/OcpLoginPage.ts
deleted file mode 100644
index fbc076db2d..0000000000
--- a/tests/e2e/pageobjects/openshift/OcpLoginPage.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { CLASSES } from '../../inversify.types';
-import { By } from 'selenium-webdriver';
-import { Logger } from '../../utils/Logger';
-import { TestConstants } from '../../TestConstants';
-import { TimeoutConstants } from '../../TimeoutConstants';
-
-@injectable()
-export class OcpLoginPage {
-
- private static readonly LOGIN_PAGE_OPENSHIFT_XPATH: string = '//*[contains(text(), \'Welcome\')]';
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async openLoginPageOpenShift(url: string) {
- Logger.debug('OcpLoginPage.openLoginPageOpenShift');
-
- await this.driverHelper.navigateToUrl(url);
- }
-
- async waitOpenShiftLoginWelcomePage() {
- Logger.debug('OcpLoginPage.waitOpenShiftLoginWelcomePage');
-
- await this.driverHelper.waitVisibility(By.xpath(OcpLoginPage.LOGIN_PAGE_OPENSHIFT_XPATH), TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
- }
-
- async clickOnLoginProviderTitle() {
- Logger.debug('OcpLoginPage.clickOnLoginProviderTitle');
-
- const loginProviderTitleLocator: By = By.xpath(`//a[text()=\'${TestConstants.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE}\']`);
- await this.driverHelper.waitAndClick(loginProviderTitleLocator);
- }
-
- async isIdentityProviderLinkVisible(): Promise {
- Logger.debug('OcpLoginPage.isIdentityProviderLinkVisible');
-
- const loginWithHtpaswdLocator: By = By.xpath(`//a[text()=\'${TestConstants.TS_OCP_LOGIN_PAGE_PROVIDER_TITLE}\']`);
- return await this.driverHelper.waitVisibilityBoolean(loginWithHtpaswdLocator, 3, 5000);
- }
-
- async isAuthorizeOpenShiftIdentityProviderPageVisible(): Promise {
- Logger.debug('OcpLoginPage.isAuthorizeOpenShiftIdentityProviderPageVisible');
-
- const authorizeOpenshiftIdentityProviderPageLocator: By = By.xpath('//h1[text()=\'Authorize Access\']');
- return await this.driverHelper.isVisible(authorizeOpenshiftIdentityProviderPageLocator);
- }
-
- async waitAuthorizeOpenShiftIdentityProviderPage() {
- Logger.debug('OcpLoginPage.waitAuthorizeOpenShiftIdentityProviderPage');
-
- const authorizeOpenshiftIdentityProviderPageLocator: By = By.xpath('//h1[text()=\'Authorize Access\']');
- await this.driverHelper.waitVisibility(authorizeOpenshiftIdentityProviderPageLocator, TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
- }
-
- async clickOnApproveAuthorizeAccessButton() {
- Logger.debug('OcpLoginPage.clickOnApproveAuthorizeAccessOpenshift');
-
- const approveAuthorizeAccessOcpLocator: By = By.css('input[name=\'approve\']');
- await this.driverHelper.waitAndClick(approveAuthorizeAccessOcpLocator);
- }
-
- async enterUserNameOpenShift(userName: string) {
- Logger.debug(`OcpLoginPage.enterUserNameOpenShift "${userName}"`);
-
- await this.driverHelper.enterValue(By.id('inputUsername'), userName);
- }
-
- async enterPasswordOpenShift(passw: string) {
- Logger.debug(`OcpLoginPage.enterPasswordOpenShift "${passw}"`);
-
- await this.driverHelper.enterValue(By.id('inputPassword'), passw);
- }
-
- async clickOnLoginButton() {
- Logger.debug('OcpLoginPage.clickOnLoginButton');
-
- const loginButtonlocator: By = By.css('button[type=submit]');
- await this.driverHelper.waitAndClick(loginButtonlocator);
- }
-
- async waitDisappearanceOpenShiftLoginWelcomePage() {
- Logger.debug('OcpLoginPage.waitDisappearanceOpenShiftLoginWelcomePage');
-
- await this.driverHelper.waitDisappearance(By.xpath(OcpLoginPage.LOGIN_PAGE_OPENSHIFT_XPATH));
- }
-
- async isLinkAccountPageVisible(): Promise {
- Logger.debug('OcpLoginPage.isLinkAccountPageVisible');
-
- const linkAccountLocator: By = By.id(`linkAccount`);
- return await this.driverHelper.waitVisibilityBoolean(linkAccountLocator, 3, 5000);
- }
-
- async clickOnLinkAccountButton() {
- Logger.debug('OcpLoginPage.clickOnLinkAccountButton');
-
- const linkAccountLocator: By = By.id(`linkAccount`);
- this.driverHelper.waitAndClick(linkAccountLocator);
- }
-
-}
diff --git a/tests/e2e/tests/devfiles/CSlashCPlusPlus.spec.ts b/tests/e2e/tests/devfiles/CSlashCPlusPlus.spec.ts
deleted file mode 100644
index cb13f59fc8..0000000000
--- a/tests/e2e/tests/devfiles/CSlashCPlusPlus.spec.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { e2eContainer } from '../../inversify.config';
-import { Editor, CLASSES } from '../..';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-
-const workspaceSampleName: string = 'cpp-hello-world';
-const fileFolderPath: string = `${workspaceSampleName}`;
-const tabTitle: string = 'hello.cpp';
-const buildTaskName: string = 'build';
-const runTaskName: string = 'run';
-const stack: string = 'C/C++';
-
-suite(`${stack} test`, async () => {
- suite(`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- prepareEditorForLanguageServerTests();
- });
-
- suite('Validation of project build', async () => {
- codeExecutionTests.runTask(buildTaskName, 30_000);
- codeExecutionTests.runTask(runTaskName, 30_000);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.errorHighlighting(tabTitle, `error_text;`, 12);
- commonLanguageServerTests.suggestionInvoking(tabTitle, 15, 22, 'test');
- commonLanguageServerTests.autocomplete(tabTitle, 15, 9, 'printf');
- // commonLanguageServerTests.codeNavigation(tabTitle, 15, 9, 'stdio.h'); currently not working because of LS not exposing Ctrl + F12 combination
- });
-
- suite('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-
-});
-
-export function prepareEditorForLanguageServerTests() {
- test(`Prepare file for LS tests`, async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 6, 1);
- await editor.performKeyCombination(tabTitle, '#include \n');
- await editor.moveCursorToLineAndChar(tabTitle, 10, 1);
- await editor.performKeyCombination(tabTitle, '\nchar const *test = "test";\n');
- await editor.moveCursorToLineAndChar(tabTitle, 15, 5);
- await editor.performKeyCombination(tabTitle, 'printf("%s\\n", test);\n');
- });
-}
diff --git a/tests/e2e/tests/devfiles/DevfileSmoke.spec.ts b/tests/e2e/tests/devfiles/DevfileSmoke.spec.ts
deleted file mode 100644
index 0fdc8d6732..0000000000
--- a/tests/e2e/tests/devfiles/DevfileSmoke.spec.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { e2eContainer } from '../../inversify.config';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const workspaceSampleName: string = 'console-java-simple';
-const workspaceRootFolderName: string = 'src';
-const stack : string = 'Java Maven';
-
-suite(`${stack} test`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/DotNetCore.spec.ts b/tests/e2e/tests/devfiles/DotNetCore.spec.ts
deleted file mode 100644
index 2804ff8387..0000000000
--- a/tests/e2e/tests/devfiles/DotNetCore.spec.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { WorkspaceNameHandler, Editor, CLASSES } from '../..';
-import { e2eContainer } from '../../inversify.config';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-
-const workspaceSampleName: string = 'dotnet-web-simple';
-const fileFolderPath: string = `${workspaceSampleName}`;
-const tabTitle: string = 'Program.cs';
-// const codeNavigationClassName: string = '[metadata] Console.cs';
-const stack : string = '.NET Core';
-const updateDependenciesTaskName: string = 'update dependencies';
-const buildTaskName: string = 'build';
-const runTaskName: string = 'run';
-const runTaskNameExpectedString: string = 'Process 5000-tcp is now listening on port 5000. Open it ?';
-
-suite(`Test ${stack}`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- prepareEditorForLanguageServerTests();
- });
-
- suite('Installing dependencies', async () => {
- codeExecutionTests.runTask(updateDependenciesTaskName, 120_000);
- codeExecutionTests.closeTerminal(updateDependenciesTaskName);
- });
-
- suite('Validation of workspace build', async () => {
- codeExecutionTests.runTask(buildTaskName, 30_000);
- codeExecutionTests.closeTerminal(buildTaskName);
- });
-
- suite('Run .NET Core example application', async () => {
- codeExecutionTests.runTaskWithNotification(runTaskName, runTaskNameExpectedString , 30_000);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.suggestionInvoking(tabTitle, 22, 33, 'test');
- commonLanguageServerTests.errorHighlighting(tabTitle, 'error_text;', 23);
- commonLanguageServerTests.autocomplete(tabTitle, 22, 27, 'WriteLine');
- // commonLanguageServerTests.codeNavigation(tabTitle, 22, 27, codeNavigationClassName); // codenavigation is inconsistent https://github.com/eclipse/che/issues/16929
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
-
-export function prepareEditorForLanguageServerTests() {
- test(`Prepare file for LS tests`, async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 18, 6);
- await editor.performKeyCombination(tabTitle, '\nprivate static String test = "test";');
- await editor.moveCursorToLineAndChar(tabTitle, 21, 10);
- await editor.performKeyCombination(tabTitle, '\nConsole.WriteLine(test);\n');
- });
-}
diff --git a/tests/e2e/tests/devfiles/Go.spec.ts b/tests/e2e/tests/devfiles/Go.spec.ts
deleted file mode 100644
index 0257626634..0000000000
--- a/tests/e2e/tests/devfiles/Go.spec.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { e2eContainer } from '../../inversify.config';
-import 'reflect-metadata';
-import { Logger } from '../../utils/Logger';
-import { PreferencesHandler } from '../../utils/PreferencesHandler';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-
-const workspaceStack: string = 'Go';
-const workspaceSampleName: string = 'src';
-const workspaceRootFolderName: string = 'github.com';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/golang/example/outyet`;
-const fileName: string = `main.go`;
-
-const taskRunServer: string = '1.1 Run outyet';
-const taskStopServer: string = '1.2 Stop outyet';
-const taskTestOutyet: string = '1.3 Test outyet';
-const notificationText: string = 'Process 8080-tcp is now listening on port 8080. Open it ?';
-
-suite(`${workspaceStack} test`, async () => {
-
- suite(`Create ${workspaceStack} workspace`, async () => {
- test('Workaround for issue #16113', async () => {
- Logger.warn(`Manually setting a preference for golang devfile LS based on issue: https://github.com/eclipse/che/issues/16113`);
- await preferencesHandler.setUseGoLanaguageServer();
- });
- workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, fileName);
- });
-
- suite('Test golang example', async () => {
- codeExecutionTests.runTask(taskTestOutyet, 60_000);
- codeExecutionTests.closeTerminal(taskTestOutyet);
- });
-
- suite('Run golang example server', async () => {
- codeExecutionTests.runTaskWithNotification(taskRunServer, notificationText, 40_000);
- codeExecutionTests.runTask(taskStopServer, 5_000);
- });
-
- suite(`'Language server validation'`, async () => {
- commonLanguageServerTests.suggestionInvoking(fileName, 42, 10, 'Parse');
- commonLanguageServerTests.autocomplete(fileName, 42, 10, 'Parse');
- commonLanguageServerTests.errorHighlighting(fileName, 'error;\n', 42);
- // commonLanguageServerTests.codeNavigation(fileName, 42, 10, 'flag.go'); // codenavigation is inconsistent https://github.com/eclipse/che/issues/16929
- });
-
- suite('Stop and remove workspace', async() => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/devfiles/JavaMaven.spec.ts b/tests/e2e/tests/devfiles/JavaMaven.spec.ts
deleted file mode 100644
index 21fe7f638f..0000000000
--- a/tests/e2e/tests/devfiles/JavaMaven.spec.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceSampleName: string = 'console-java-simple';
-const workspaceRootFolderName: string = 'src';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
-const tabTitle: string = 'HelloWorld.java';
-const codeNavigationClassName: string = 'String.class';
-const stack : string = 'Java Maven';
-const taskName: string = 'maven build';
-
-suite(`${stack} test`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- });
-
- suite('Validation of workspace build and run', async () => {
- codeExecutionTests.runTask(taskName, 120_000);
- codeExecutionTests.closeTerminal(taskName);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.suggestionInvoking(tabTitle, 10, 20, 'append(char c) : PrintStream');
- commonLanguageServerTests.errorHighlighting(tabTitle, 'error_text', 11);
- commonLanguageServerTests.autocomplete(tabTitle, 10, 11, 'System - java.lang');
- commonLanguageServerTests.codeNavigation(tabTitle, 9, 10, codeNavigationClassName, 30_000); // extended timout to give LS enough time to start
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/JavaSpringBoot.spec.ts b/tests/e2e/tests/devfiles/JavaSpringBoot.spec.ts
deleted file mode 100644
index b6a8bbec92..0000000000
--- a/tests/e2e/tests/devfiles/JavaSpringBoot.spec.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const stack: string = 'Java Spring Boot';
-const workspaceSampleName: string = 'java-web-spring';
-const workspaceRootFolderName: string = 'src';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/springframework/samples/petclinic`;
-const tabTitle: string = 'PetClinicApplication.java';
-const codeNavigationClassName: string = 'SpringApplication.class';
-const buildTaskName: string = 'maven build';
-const runTaskName: string = 'run webapp';
-const runTaskExpectedDialogue: string = 'Process 8080-tcp is now listening on port 8080. Open it ?';
-
-suite(`${stack} test`, async () => {
- suite(`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- });
-
- suite('Validation of workspace build', async () => {
- codeExecutionTests.runTask(buildTaskName, 420_000);
- codeExecutionTests.closeTerminal(buildTaskName);
- });
-
- suite('Validation of workspace execution', async () => {
- codeExecutionTests.runTaskWithNotification(runTaskName, runTaskExpectedDialogue, 120_000);
- codeExecutionTests.closeTerminal(runTaskName);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.autocomplete(tabTitle, 32, 56, 'args : String[]');
- commonLanguageServerTests.errorHighlighting(tabTitle, 'error_text', 30);
- commonLanguageServerTests.codeNavigation(tabTitle, 32, 23, codeNavigationClassName);
- commonLanguageServerTests.suggestionInvoking(tabTitle, 32, 23, 'run(Class>');
- });
-
- suite('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/JavaVertx.spec.ts b/tests/e2e/tests/devfiles/JavaVertx.spec.ts
deleted file mode 100644
index 9eeb76beb7..0000000000
--- a/tests/e2e/tests/devfiles/JavaVertx.spec.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceSampleName: string = 'vertx-http-example';
-const workspaceRootFolderName: string = 'src';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/io/openshift/example`;
-const tabTitle: string = 'HttpApplication.java';
-const codeNavigationClassName: string = 'RouterImpl.class';
-const buildTaskName: string = 'maven build';
-const stack: string = 'Java Vert.x';
-
-suite(`${stack} test`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- });
-
- suite('Validation of project build', async () => {
- codeExecutionTests.runTask(buildTaskName, 120_000);
- codeExecutionTests.closeTerminal(buildTaskName);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.errorHighlighting(tabTitle, 'error_text;', 20);
- commonLanguageServerTests.suggestionInvoking(tabTitle, 19, 31, 'router(Vertx vertx) : Router');
- commonLanguageServerTests.autocomplete(tabTitle, 19, 7, 'Router - io.vertx.ext.web');
- commonLanguageServerTests.codeNavigation(tabTitle, 19, 7, codeNavigationClassName, 30_000); // extended timout to give LS enough time to start
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/devfiles/NodeJS.spec.ts b/tests/e2e/tests/devfiles/NodeJS.spec.ts
deleted file mode 100644
index 1304f7e036..0000000000
--- a/tests/e2e/tests/devfiles/NodeJS.spec.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceStack: string = 'NodeJS Express Web Application';
-const workspaceSampleName: string = 'nodejs-web-app';
-const workspaceRootFolderName: string = 'app';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}`;
-const fileName: string = `app.js`;
-
-const taskDownloadDependencies: string = 'download dependencies';
-const taskRunWebApp: string = 'run the web app';
-const taskExpectedDialogText: string = 'Process nodejs is now listening on port 3000. Open it ?';
-
-suite(`${workspaceStack} test`, async () => {
-
- suite(`Create ${workspaceStack}`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, fileName);
- });
-
- suite('Download dependencies', async () => {
- codeExecutionTests.runTask(taskDownloadDependencies, 60_000);
- codeExecutionTests.closeTerminal(taskDownloadDependencies);
- });
-
- suite('Run nodejs application', async () => {
- codeExecutionTests.runTaskWithNotification(taskRunWebApp, taskExpectedDialogText, 30_000);
- });
-
- suite(`'Language server validation'`, async () => {
- commonLanguageServerTests.errorHighlighting(fileName, 'error text;\n', 17);
- commonLanguageServerTests.suggestionInvoking(fileName, 15, 20, 'require');
- commonLanguageServerTests.autocomplete(fileName, 15, 20, 'require');
- // commonLanguageServerTests.codeNavigation(fileName, 19, 10, 'index.d.ts'); // codenavigation is inconsistent https://github.com/eclipse/che/issues/16929
- });
-
- suite('Stop and remove workspace', async() => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/PHPSimple.spec.ts b/tests/e2e/tests/devfiles/PHPSimple.spec.ts
deleted file mode 100644
index cc0dc4037d..0000000000
--- a/tests/e2e/tests/devfiles/PHPSimple.spec.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { e2eContainer } from '../../inversify.config';
-import { WorkspaceNameHandler, Editor, CLASSES } from '../..';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-
-const workspaceSampleName: string = 'php-web-simple';
-const fileFolderPath: string = `${workspaceSampleName}`;
-const tabTitle: string = 'index.php';
-// const codeNavigationClassName: string = 'RouterImpl.class';
-const depTaskName: string = 'Configure Apache Web Server DocumentRoot';
-const buildTaskName: string = 'Start Apache Web Server';
-const stack: string = 'PHP Simple';
-
-suite(`${stack} test`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- prepareEditorForLanguageServerTests();
- });
-
- suite('Configuration of dependencies', async () => {
- codeExecutionTests.runTask(depTaskName, 30_000);
- });
-
- suite('Validation of project build', async () => {
- codeExecutionTests.runTask(buildTaskName, 30_000);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.errorHighlighting(tabTitle, `error_text;`, 14);
- commonLanguageServerTests.suggestionInvoking(tabTitle, 14, 26, '$test');
- commonLanguageServerTests.autocomplete(tabTitle, 15, 5, 'phpinfo');
- // commonLanguageServerTests.codeNavigation(tabTitle, 19, 7, codeNavigationClassName); // there is no codenavigation in the php simple stack (no object oriented code)
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-
-});
-
-export function prepareEditorForLanguageServerTests() {
- test(`Prepare file for LS tests`, async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 12, 4);
- await editor.performKeyCombination(tabTitle, '\n$test = " test";');
- await editor.moveCursorToLineAndChar(tabTitle, 14, 20);
- await editor.performKeyCombination(tabTitle, ' . $test;\nphpinfo();');
- });
-}
diff --git a/tests/e2e/tests/devfiles/Python.spec.ts b/tests/e2e/tests/devfiles/Python.spec.ts
deleted file mode 100644
index 0e8b1f9480..0000000000
--- a/tests/e2e/tests/devfiles/Python.spec.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceStack: string = 'Python';
-const workspaceSampleName: string = 'python-hello-world';
-
-const taskRunName: string = 'run';
-const fileFolderPath: string = `${workspaceSampleName}`;
-const fileName: string = `hello-world.py`;
-
-suite(`${workspaceStack} test`, async () => {
-
- suite(`Create ${workspaceStack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
- projectAndFileTests.waitWorkspaceReadinessNoSubfolder(workspaceSampleName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, fileName);
- });
-
- suite.skip('Run Python project', async () => {
- codeExecutionTests.runTask(taskRunName, 30_000);
- codeExecutionTests.closeTerminal(taskRunName);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.errorHighlighting(fileName, `error_text;`, 7);
- commonLanguageServerTests.suggestionInvoking(fileName, 9, 22, 'str');
- commonLanguageServerTests.autocomplete(fileName, 9, 4, 'print');
- // commonLanguageServerTests.codeNavigation(tabTitle, 19, 7, codeNavigationClassName); // there is no codenavigation in the Python devfile
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/PythonDjango.spec.ts b/tests/e2e/tests/devfiles/PythonDjango.spec.ts
deleted file mode 100644
index fd11b5599e..0000000000
--- a/tests/e2e/tests/devfiles/PythonDjango.spec.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { e2eContainer } from '../../inversify.config';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceStack: string = 'Python Django';
-const workspaceSampleName: string = 'django-realworld-example-app';
-const workspaceRootFolderName: string = 'conduit';
-
-const taskSetUpVenv: string = 'set up venv';
-const taskInstallDependencies: string = 'install dependencies';
-const taskMigrate: string = 'migrate';
-const taskRunServer: string = 'run server';
-const taskExpectedDialogText: string = 'Process django is now listening on port 7000. Open it ?';
-
-suite(`${workspaceStack} test`, async () => {
-
- suite(`Create ${workspaceStack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Set up venv', async () => {
- codeExecutionTests.runTask(taskSetUpVenv, 60_000);
- codeExecutionTests.closeTerminal(taskSetUpVenv);
- });
-
- suite('Install dependencies', async () => {
- codeExecutionTests.runTask(taskInstallDependencies, 60_000);
- codeExecutionTests.closeTerminal(taskInstallDependencies);
- });
-
- suite('Migrate Django application project', async () => {
- codeExecutionTests.runTask(taskMigrate, 30_000);
- codeExecutionTests.closeTerminal(taskMigrate);
- });
-
- suite('Run django server', async () => {
- codeExecutionTests.runTaskWithNotification(taskRunServer, taskExpectedDialogText, 30_000);
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/Quarkus.spec.ts b/tests/e2e/tests/devfiles/Quarkus.spec.ts
deleted file mode 100644
index 1210152146..0000000000
--- a/tests/e2e/tests/devfiles/Quarkus.spec.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceStack: string = 'Quarkus CLI';
-const workspaceSampleName: string = 'quarkus-quickstarts';
-const workspaceRootFolderName: string = 'getting-started-command-mode';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/src/main/java/org/acme/getting/started/commandmode`;
-const fileName: string = `GreetingService.java`;
-
-const taskPackage: string = 'Package';
-const taskPackageNative: string = 'Package Native';
-const taskStartNative: string = 'Start Native';
-
-suite(`${workspaceStack} test`, async () => {
- suite(`Create ${workspaceStack}`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(workspaceStack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite(`Test opening the file`, async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, fileName);
- });
-
- suite('Package Quarkus application', async () => {
- codeExecutionTests.runTask(taskPackage, 180_000);
- codeExecutionTests.closeTerminal(taskPackage);
- });
-
- suite('Package Quarkus Native bundle', async () => {
- codeExecutionTests.runTask(taskPackageNative, 600_000);
- codeExecutionTests.closeTerminal(taskPackageNative);
- });
-
- // test is being skipped because of broken devfile, link: https://github.com/eclipse/che/issues/18982
- suite.skip('Start Quarkus Native application', async () => {
- codeExecutionTests.runTaskInputText(taskStartNative, 'Enter your name', 'Test User', 90_000);
- });
-
- suite(`'Language server validation'`, async () => {
- commonLanguageServerTests.errorHighlighting(fileName, 'error_text;', 7);
- commonLanguageServerTests.suggestionInvoking(fileName, 8, 33, 'String');
- commonLanguageServerTests.autocomplete(fileName, 8, 33, 'String');
- commonLanguageServerTests.codeNavigation(fileName, 8, 33, 'String.class', 30_000); // extended timout to give LS enough time to start
- });
-
- suite('Stop and remove workspace', async() => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-});
diff --git a/tests/e2e/tests/devfiles/Scala.spec.ts b/tests/e2e/tests/devfiles/Scala.spec.ts
deleted file mode 100644
index 8c8b2e2bf1..0000000000
--- a/tests/e2e/tests/devfiles/Scala.spec.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { CLASSES, WorkspaceNameHandler } from '../..';
-import { LanguageServerTests } from '../../testsLibrary/LanguageServerTests';
-import { e2eContainer } from '../../inversify.config';
-import { CodeExecutionTests } from '../../testsLibrary/CodeExecutionTests';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const commonLanguageServerTests: LanguageServerTests = e2eContainer.get(CLASSES.LanguageServerTests);
-const codeExecutionTests: CodeExecutionTests = e2eContainer.get(CLASSES.CodeExecutionTests);
-
-const workspaceSampleName: string = 'console-scala-simple';
-const workspaceRootFolderName: string = 'example';
-const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/src/main/scala/org/eclipse/che/examples`;
-const tabTitle: string = 'HelloWorld.scala';
-const compileTaskkName: string = 'sbt compile';
-const runTaskName: string = 'sbt run';
-const testTaskName: string = 'sbt test';
-const stack: string = 'Scala';
-
-// skipping scala to enable pre-release suite to be easily used for updates until https://github.com/eclipse/che/issues/18662 is fixed
-suite.skip(`${stack} test`, async () => {
- suite (`Create ${stack} workspace`, async () => {
- workspaceHandlingTests.createAndOpenWorkspace(stack);
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- });
-
- suite('Validation of commands', async () => {
- codeExecutionTests.runTask(compileTaskkName, 240_000);
- codeExecutionTests.closeTerminal(compileTaskkName);
- codeExecutionTests.runTaskInputText(runTaskName, '[info] running org.eclipse.che.examples.HelloWorld', 'Test User', 120_000);
- codeExecutionTests.closeTerminal(runTaskName);
- codeExecutionTests.runTask(testTaskName, 120_000);
- codeExecutionTests.closeTerminal(testTaskName);
- });
-
- suite('Language server validation', async () => {
- commonLanguageServerTests.errorHighlighting(tabTitle, 'Abc:', 21);
- // commonLanguageServerTests.suggestionInvoking(tabTitle, 15, 31, 'Console scala');
- commonLanguageServerTests.autocomplete(tabTitle, 25, 28, 'name: String');
- // commonLanguageServerTests.codeNavigation(tabTitle, 19, 7, codeNavigationClassName, 30_000); // not working
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup(async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
-
- test(`Stop and remowe workspace`, async () => {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/e2e/DirectUrlFactoryWithKeepDirectoryTest.spec.ts b/tests/e2e/tests/e2e/DirectUrlFactoryWithKeepDirectoryTest.spec.ts
deleted file mode 100644
index d239ec8cec..0000000000
--- a/tests/e2e/tests/e2e/DirectUrlFactoryWithKeepDirectoryTest.spec.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-// /*********************************************************************
-// * Copyright (c) 2020 Red Hat, Inc.
-// *
-// * This program and the accompanying materials are made
-// * available under the terms of the Eclipse Public License 2.0
-// * which is available at https://www.eclipse.org/legal/epl-2.0/
-// *
-// * SPDX-License-Identifier: EPL-2.0
-// **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { WorkspaceNameHandler } from '../..';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-// the suite expect user to be logged in
-suite('Workspace creation via factory url', async () => {
-
- let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/master/src`;
- const workspaceSampleName: string = 'console-java-simple';
- const workspaceRootFolderName: string = 'src';
- const fileName: string = 'pom.xml';
- const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
- const tabTitle: string = 'HelloWorld.java';
-
- suite('Open factory URL', async () => {
- test(`Navigating to factory URL`, async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
- });
-
- suite('Wait workspace readyness', async () => {
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Check imported project', async () => {
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- projectAndFileTests.checkFileNotExists(`${workspaceSampleName}/${fileName}`);
-
- projectAndFileTests.checkProjectBranchName('master');
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup( async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- test (`Stop workspace`, async () => {
- await workspaceHandlingTests.stopWorkspace(workspaceName);
- });
- test (`Remove workspace`, async () => {
- await workspaceHandlingTests.removeWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/e2e/DirectUrlFactoryWithRootFolderTest.spec.ts b/tests/e2e/tests/e2e/DirectUrlFactoryWithRootFolderTest.spec.ts
deleted file mode 100644
index b9a73162d8..0000000000
--- a/tests/e2e/tests/e2e/DirectUrlFactoryWithRootFolderTest.spec.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-// /*********************************************************************
-// * Copyright (c) 2020 Red Hat, Inc.
-// *
-// * This program and the accompanying materials are made
-// * available under the terms of the Eclipse Public License 2.0
-// * which is available at https://www.eclipse.org/legal/epl-2.0/
-// *
-// * SPDX-License-Identifier: EPL-2.0
-// **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { WorkspaceNameHandler } from '../..';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-// the suite expect user to be logged in
-suite('Workspace creation via factory url', async () => {
-
- let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple`;
- const workspaceSampleName: string = 'console-java-simple';
- const workspaceRootFolderName: string = 'src';
- const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
- const tabTitle: string = 'HelloWorld.java';
-
- suite('Open factory URL', async () => {
- test(`Navigating to factory URL`, async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
- });
-
- suite('Wait workspace readyness', async () => {
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Check imported project', async () => {
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
-
- projectAndFileTests.checkProjectBranchName('master');
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup( async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- test (`Stop workspace`, async () => {
- await workspaceHandlingTests.stopWorkspace(workspaceName);
- });
- test (`Remove workspace`, async () => {
- await workspaceHandlingTests.removeWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/e2e/DirectUrlFactoryWithSpecificBranchTest.spec.ts b/tests/e2e/tests/e2e/DirectUrlFactoryWithSpecificBranchTest.spec.ts
deleted file mode 100644
index d1e07580c1..0000000000
--- a/tests/e2e/tests/e2e/DirectUrlFactoryWithSpecificBranchTest.spec.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-// /*********************************************************************
-// * Copyright (c) 2020 Red Hat, Inc.
-// *
-// * This program and the accompanying materials are made
-// * available under the terms of the Eclipse Public License 2.0
-// * which is available at https://www.eclipse.org/legal/epl-2.0/
-// *
-// * SPDX-License-Identifier: EPL-2.0
-// **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { WorkspaceNameHandler } from '../..';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-// the suite expect user to be logged in
-suite('Workspace creation via factory url', async () => {
-
- let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://github.com/che-samples/console-java-simple/tree/java1.11`;
- const workspaceSampleName: string = 'console-java-simple';
- const workspaceRootFolderName: string = 'src';
- const fileFolderPath: string = `${workspaceSampleName}/${workspaceRootFolderName}/main/java/org/eclipse/che/examples`;
- const tabTitle: string = 'HelloWorld.java';
-
- suite('Open factory URL', async () => {
- test(`Navigating to factory URL`, async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
- });
-
- suite('Wait workspace readyness', async () => {
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite('Check imported project', async () => {
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- projectAndFileTests.checkProjectBranchName('java1.11');
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup( async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- test (`Stop workspace`, async () => {
- await workspaceHandlingTests.stopWorkspace(workspaceName);
- });
- test (`Remove workspace`, async () => {
- await workspaceHandlingTests.removeWorkspace(workspaceName);
- });
- });
-
-});
diff --git a/tests/e2e/tests/e2e/FactoryUrl.spec.ts b/tests/e2e/tests/e2e/FactoryUrl.spec.ts
deleted file mode 100644
index ad6d31753b..0000000000
--- a/tests/e2e/tests/e2e/FactoryUrl.spec.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-// /*********************************************************************
-// * Copyright (c) 2020 Red Hat, Inc.
-// *
-// * This program and the accompanying materials are made
-// * available under the terms of the Eclipse Public License 2.0
-// * which is available at https://www.eclipse.org/legal/epl-2.0/
-// *
-// * SPDX-License-Identifier: EPL-2.0
-// **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { WorkspaceNameHandler } from '../..';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-// the suite expect user to be logged in
-suite('Workspace creation via factory url', async () => {
-
- let factoryUrl : string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/java-maven/devfile.yaml`;
- const workspaceSampleName: string = 'console-java-simple';
- const workspaceRootFolderName: string = 'src';
-
- suite('Open factory URL', async () => {
- test(`Navigating to factory URL`, async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
- });
-
- suite('Wait workspace readyness', async () => {
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
- suite ('Stopping and deleting the workspace', async () => {
- let workspaceName = 'not defined';
- suiteSetup( async () => {
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- test (`Stop worksapce`, async () => {
- await workspaceHandlingTests.stopWorkspace(workspaceName);
- });
- test (`Remove workspace`, async () => {
- await workspaceHandlingTests.removeWorkspace(workspaceName);
- });
- });
-
-
-});
diff --git a/tests/e2e/tests/e2e/GitPublishBranch.spec.ts b/tests/e2e/tests/e2e/GitPublishBranch.spec.ts
deleted file mode 100644
index 9dde4de7e5..0000000000
--- a/tests/e2e/tests/e2e/GitPublishBranch.spec.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES, TYPES } from '../../inversify.types';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { GitPlugin } from '../../pageobjects/ide/GitPlugin';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
-import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { By } from 'selenium-webdriver';
-
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const loginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
-const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-
-
-suite('Publish branch in git extension', async () => {
- const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
- const wsNameGitPublishBranch = WorkspaceNameHandler.generateWorkspaceName('checkGitPublishBranch-', 5);
- const changedFile = 'README.md';
- const branchName = WorkspaceNameHandler.generateWorkspaceName('checkGitPublishBranch', 5);
- const file = `https://github.com/${TestConstants.TS_GITHUB_TEST_REPO}/blob/${branchName}/README.md`;
-
-
- suiteSetup(async function () {
- const wsConfig = await testWorkspaceUtils.getBaseDevfile();
- wsConfig.metadata!.name = wsNameGitPublishBranch;
- await testWorkspaceUtils.createWsFromDevFile(wsConfig);
- });
-
- test('Login into workspace', async () => {
- await driverHelper.navigateToUrl(workspacePrefixUrl + wsNameGitPublishBranch);
- await loginPage.login();
- await ide.waitWorkspaceAndIde();
- await projectTree.openProjectTreeContainer();
- await driverHelper.wait(15000);
- });
-
- test('Create a new branch, change commit and push', async function changeCommitAndPushFunc() {
- const currentDate: string = Date.now().toString();
- const readmeFileContentXpath: string = `//div[@id='readme']//p[contains(text(), '${currentDate}')]`;
- await cloneTestRepo();
-
- await driverHelper.wait(15000);
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('branch', 'Git: Create Branch...');
- await quickOpenContainer.typeAndSelectSuggestion(branchName, `Please provide a new branch name (Press 'Enter' to confirm your input or 'Escape' to cancel)`);
-
- await projectTree.expandPathAndOpenFile('Spoon-Knife', changedFile);
- await editor.type(changedFile, currentDate + '\n', 1);
- await gitPlugin.openGitPluginContainer();
- await gitPlugin.waitChangedFileInChagesList(changedFile);
- await gitPlugin.stageAllChanges(changedFile);
- await gitPlugin.waitChangedFileInChagesList(changedFile);
- await gitPlugin.typeCommitMessage(this.test!.title + currentDate);
- await gitPlugin.commitFromCommandMenu();
- await gitPlugin.pushChangesFromCommandMenu();
- await driverHelper.waitAndClick(By.xpath(`//button[@class='theia-button main']`));
- await gitPlugin.waitDataIsSynchronized();
- await testWorkspaceUtils.cleanUpAllWorkspaces();
-
- await driverHelper.navigateToUrl(file);
- await driverHelper.waitVisibility(By.xpath(readmeFileContentXpath));
- });
-
-});
-
-suite('Cleanup', async () => {
- test('Remove test workspace', async () => {
- await testWorkspaceUtils.cleanUpAllWorkspaces();
- });
-});
-
-async function cloneTestRepo() {
- const sshLinkToRepo: string = 'git@github.com:' + TestConstants.TS_GITHUB_TEST_REPO + '.git';
- const confirmMessage = 'Clone from URL';
-
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('clone', 'Git: Clone');
- await quickOpenContainer.typeAndSelectSuggestion(sshLinkToRepo, confirmMessage);
- await gitPlugin.clickOnSelectRepositoryButton();
-}
diff --git a/tests/e2e/tests/e2e/GitSsh.spec.ts b/tests/e2e/tests/e2e/GitSsh.spec.ts
deleted file mode 100644
index ded54c2650..0000000000
--- a/tests/e2e/tests/e2e/GitSsh.spec.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { assert } from 'chai';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES, TYPES } from '../../inversify.types';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { GitPlugin } from '../../pageobjects/ide/GitPlugin';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
-import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { CheGitApi } from '../../utils/VCS/CheGitApi';
-import { GitHubUtil } from '../../utils/VCS/github/GitHubUtil';
-import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-import { Dashboard } from '../..';
-
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const loginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-const gitHubUtils: GitHubUtil = e2eContainer.get(CLASSES.GitHubUtil);
-const cheGitAPI: CheGitApi = e2eContainer.get(CLASSES.CheGitApi);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
-const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-
-
-suite('Git with ssh workflow', async () => {
- const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
- const wsNameCheckGeneratingKeys = 'checkGeneratingSsh';
- const wsNameCheckPropagatingKeys = 'checkPropagatingSsh';
- const committedFile = 'README.md';
-
- suiteSetup(async function () {
- const wsConfig = await testWorkspaceUtils.getBaseDevfile();
- wsConfig.metadata!.name = wsNameCheckGeneratingKeys;
- await browserTabsUtil.navigateTo(TestConstants.TS_SELENIUM_BASE_URL);
- await loginPage.login();
- await testWorkspaceUtils.createWsFromDevFile(wsConfig);
- });
-
- test('Login into workspace and open tree container', async () => {
- await dashboard.openDashboard();
- await browserTabsUtil.navigateTo(workspacePrefixUrl + wsNameCheckGeneratingKeys);
- await ide.waitWorkspaceAndIde();
- await projectTree.openProjectTreeContainer();
- await driverHelper.wait(TimeoutConstants.TS_PROJECT_TREE_TIMEOUT);
- });
-
- test('Generate a SSH key', async () => {
- await topMenu.selectOption('View', 'Find Command...');
- // workaround - reopen 'Find Command' container - https://github.com/eclipse/che/issues/19793
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('SSH', 'SSH: Generate Key...');
- await ide.waitNotificationAndClickOnButton('Key pair successfully generated, do you want to view the public key', 'View');
- await editor.waitEditorOpened('Untitled-0');
- await editor.waitText('Untitled-0', 'ssh-rsa');
- });
-
-
- test('Add a SSH key to GitHub side and clone by ssh link', async () => {
- const sshName: string = WorkspaceNameHandler.generateWorkspaceName('test-SSH-', 5);
- const publicSshKey = await cheGitAPI.getPublicSSHKey();
- await gitHubUtils.addPublicSshKeyToUserAccount(TestConstants.TS_GITHUB_TEST_REPO_ACCESS_TOKEN, sshName, publicSshKey);
- await cloneTestRepo();
-
- });
-
- test('Change commit and push', async function changeCommitAndPushFunc() {
- const currentDate: string = Date.now().toString();
- await projectTree.expandPathAndOpenFile('Spoon-Knife', committedFile);
- await editor.type(committedFile, currentDate + '\n', 1);
- await gitPlugin.openGitPluginContainer();
- await gitPlugin.waitChangedFileInChagesList(committedFile);
- await gitPlugin.stageAllChanges(committedFile);
- await gitPlugin.waitChangedFileInChagesList(committedFile);
- await gitPlugin.typeCommitMessage(this.test!.title + currentDate);
- await gitPlugin.commitFromCommandMenu();
- await gitPlugin.pushChangesFromCommandMenu();
- await gitPlugin.waitDataIsSynchronized();
- await driverHelper.wait(TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT);
- const rawDataFromFile: string = await gitHubUtils.getRawContentFromFile(TestConstants.TS_GITHUB_TEST_REPO + '/master/' + committedFile);
- assert.isTrue(rawDataFromFile.includes(currentDate));
- await testWorkspaceUtils.cleanUpAllWorkspaces();
- });
-
- test('Check ssh key in a new workspace', async () => {
- const data = await testWorkspaceUtils.getBaseDevfile();
-
- data.metadata!.name = wsNameCheckPropagatingKeys;
- await testWorkspaceUtils.createWsFromDevFile(data);
- await dashboard.openDashboard();
- await browserTabsUtil.navigateTo(workspacePrefixUrl + wsNameCheckPropagatingKeys);
- await ide.waitWorkspaceAndIde();
- await projectTree.openProjectTreeContainer();
- await driverHelper.wait(TimeoutConstants.TS_PROJECT_TREE_TIMEOUT);
- await cloneTestRepo();
- await projectTree.expandPath('Spoon-Knife');
- await projectTree.waitItem('Spoon-Knife/README.md');
- });
-
-});
-
-suite('Cleanup', async () => {
- test('Remove test workspace', async () => {
- await testWorkspaceUtils.cleanUpAllWorkspaces();
- });
-});
-
-async function cloneTestRepo() {
- const sshLinkToRepo: string = 'git@github.com:' + TestConstants.TS_GITHUB_TEST_REPO + '.git';
- const confirmMessage = 'Clone from URL';
-
- await topMenu.selectOption('View', 'Find Command...');
- // workaround - reopen 'Find Command' container - https://github.com/eclipse/che/issues/19793
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('clone', 'Git: Clone');
- await quickOpenContainer.typeAndSelectSuggestion(sshLinkToRepo, confirmMessage);
- await gitPlugin.clickOnSelectRepositoryButton();
-}
diff --git a/tests/e2e/tests/e2e/OpenshiftConnector.spec.ts b/tests/e2e/tests/e2e/OpenshiftConnector.spec.ts
deleted file mode 100644
index e14885c2f6..0000000000
--- a/tests/e2e/tests/e2e/OpenshiftConnector.spec.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { Key } from 'selenium-webdriver';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES, TYPES } from '../../inversify.types';
-import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { Buttons, Locations, OpenDialogWidget } from '../../pageobjects/ide/OpenDialogWidget';
-import { OpenshiftAppExplorerToolbar, OpenshiftContextMenuItems, OpenshiftPlugin } from '../../pageobjects/ide/OpenshiftPlugin';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';
-import { Terminal } from '../../pageobjects/ide/Terminal';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
-import { TestConstants } from '../../TestConstants';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { PreferencesHandler, TerminalRendererType } from '../../utils/PreferencesHandler';
-import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-
-
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const loginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-const openshiftPlugin: OpenshiftPlugin = e2eContainer.get(CLASSES.OpenshiftPlugin);
-const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
-const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);
-const openDialogWidget: OpenDialogWidget = e2eContainer.get(CLASSES.OpenDialogWidget);
-const preferencesHalder: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-const terminal: Terminal = e2eContainer.get(CLASSES.Terminal);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const projectName: string = 'node-js';
-const selectSugestionSuffix: string = '(Press \'Enter\' to confirm your input or \'Escape\' to cancel)';
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-
-suite('Openshift connector user story', async () => {
- const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
- let wsName: string;
-
- suiteSetup(async function () {
- preferencesHalder.setTerminalType(TerminalRendererType.dom);
- const wsConfig = await testWorkspaceUtils.getBaseDevfile();
- wsName = wsConfig.metadata!.name!;
- wsConfig.projects = [
- {
- 'name': 'node-js',
- 'source': {
- 'location': 'https://github.com/maxura/nodejs-hello-world.git',
- 'type': 'git'
- }
- }
- ],
-
- wsConfig.components = [
- {
- 'id': 'redhat/vscode-openshift-connector/latest',
- 'type': 'chePlugin'
- }
- ];
-
- await browserTabsUtil.navigateTo(TestConstants.TS_SELENIUM_BASE_URL);
- await loginPage.login();
- await testWorkspaceUtils.createWsFromDevFile(wsConfig);
- });
-
- test('Login into workspace and open plugin', async () => {
- await dashboard.openDashboard();
- await browserTabsUtil.navigateTo(workspacePrefixUrl + wsName);
- await ide.waitWorkspaceAndIde();
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, 'index.js');
- await dashboard.waitDisappearanceNavigationMenu();
- await openshiftPlugin.clickOnOpenshiftToollBarIcon();
- await openshiftPlugin.waitOpenshiftConnectorTree();
- });
-
- test('Login into current cluster', async () => {
- const provideAuthenticationSuffix: string = `for basic authentication to the API server ${selectSugestionSuffix}`;
- const loginIntoClusterMessage: string = 'You are already logged in the cluster. Do you want to login to a different cluster?';
- const openshiftIP: string = await openshiftPlugin.getClusterIP();
-
- await openshiftPlugin.clickOnOpenshiftConnectorTree();
- await openshiftPlugin.clickOnApplicationToolbarItem(OpenshiftAppExplorerToolbar.LogIntoCluster);
- await ide.clickOnNotificationButton(loginIntoClusterMessage, 'Yes');
- await quickOpenContainer.clickOnContainerItem('Credentials');
- await quickOpenContainer.clickOnContainerItem(`https://${openshiftIP}`);
- await quickOpenContainer.clickOnContainerItem('$(plus) Add new user...');
- await quickOpenContainer.typeAndSelectSuggestion(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_USERNAME, `Provide Username ${provideAuthenticationSuffix}`);
- await quickOpenContainer.typeAndSelectSuggestion(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_PASSWORD, `Provide Password ${provideAuthenticationSuffix}`);
-
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('OpenShift: Set Active Project', 'OpenShift: Set Active Project');
- await quickOpenContainer.typeAndSelectSuggestion(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_PROJECT, TestConstants.TS_TEST_OPENSHIFT_PLUGIN_PROJECT);
- await openshiftPlugin.clickOnItemInTree(openshiftIP);
- await openshiftPlugin.waitItemInTree(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_PROJECT);
- });
-
- test('Create new component with application', async () => {
- await topMenu.selectOption('View', 'Find Command...');
- await quickOpenContainer.typeAndSelectSuggestion('OpenShift: New Component', 'OpenShift: New Component from local folder');
- await quickOpenContainer.clickOnContainerItem('$(plus) Create new Application...');
- await quickOpenContainer.typeAndSelectSuggestion('node-js-app', `Provide Application name ${selectSugestionSuffix}` );
- await quickOpenContainer.clickOnContainerItem('$(plus) Add new context folder.');
- await openDialogWidget.selectLocationAndAddContextFolder(Locations.Root, `projects/${projectName}`, Buttons.AddContext);
- await quickOpenContainer.typeAndSelectSuggestion('component-node-js', `Provide Component name ${selectSugestionSuffix}`);
-
- await quickOpenContainer.clickOnContainerItem(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_TYPE);
- await quickOpenContainer.clickOnContainerItem(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_COMPONENT_VERSION);
-
- await driverHelper.wait(TimeoutConstants.TS_PROJECT_TREE_TIMEOUT);
- await openshiftPlugin.waitItemInTree(TestConstants.TS_TEST_OPENSHIFT_PLUGIN_PROJECT);
- await openshiftPlugin.waitItemInTree('node-js-app');
- await openshiftPlugin.waitItemInTree('component-node-js');
- });
-
- test('Push new component', async () => {
- driverHelper.getDriver().switchTo().activeElement().sendKeys(Key.F1);
- await quickOpenContainer.typeAndSelectSuggestion(OpenshiftContextMenuItems.Push, 'OpenShift: Push Component');
- await quickOpenContainer.clickOnContainerItem('node-js-app');
- await quickOpenContainer.clickOnContainerItem('component-node-js (s2i)');
- await terminal.selectTabByPrefixAndWaitText('OpenShift: Push', 'Changes successfully pushed to component', 240000);
- });
-
- suite('Cleanup', async () => {
- test('Remove test workspace', async () => {
- await testWorkspaceUtils.cleanUpAllWorkspaces();
- });
-});
-
-});
diff --git a/tests/e2e/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts b/tests/e2e/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts
deleted file mode 100644
index ba5198e9b6..0000000000
--- a/tests/e2e/tests/e2e_happy_path/DevWorkspaceHappyPath.spec.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-// /*********************************************************************
-// * Copyright (c) 2021 Red Hat, Inc.
-// *
-// * This program and the accompanying materials are made
-// * available under the terms of the Eclipse Public License 2.0
-// * which is available at https://www.eclipse.org/legal/epl-2.0/
-// *
-// * SPDX-License-Identifier: EPL-2.0
-// **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestConstants } from '../..';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-// this test checks only workspace created from "web-nodejs-sample" https://github.com/devfile/devworkspace-operator/blob/main/samples/flattened_theia-next.yaml.
-suite('Workspace creation via factory url', async () => {
-
- let factoryUrl : string = `${TestConstants.TS_SELENIUM_DEVWORKSPACE_URL}`;
- const workspaceSampleName: string = 'spring-petclinic';
- const workspaceRootFolderName: string = 'src';
-
- suite('Open factory URL', async () => {
- test(`Navigating to factory URL`, async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
- });
-
- suite('Wait workspace readiness', async () => {
- projectAndFileTests.waitWorkspaceReadiness(workspaceSampleName, workspaceRootFolderName);
- });
-
-});
diff --git a/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts b/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts
deleted file mode 100644
index 8ff4c0492c..0000000000
--- a/tests/e2e/tests/e2e_happy_path/HappyPath.spec.ts
+++ /dev/null
@@ -1,333 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TYPES, CLASSES } from '../../inversify.types';
-import { Ide, LeftToolbarButton } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { PreviewWidget } from '../../pageobjects/ide/PreviewWidget';
-import { TestConstants } from '../../TestConstants';
-import { By, Key, error } from 'selenium-webdriver';
-import { DebugView } from '../../pageobjects/ide/DebugView';
-import { DialogWindow } from '../../pageobjects/ide/DialogWindow';
-import { Terminal } from '../../pageobjects/ide/Terminal';
-import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
-import * as fs from 'fs';
-import { ContextMenu } from '../../pageobjects/ide/ContextMenu';
-import { Workspaces } from '../../pageobjects/dashboard/Workspaces';
-import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { Logger } from '../../utils/Logger';
-import { RightToolBar } from '../../pageobjects/ide/RightToolBar';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const contextMenu: ContextMenu = e2eContainer.get(CLASSES.ContextMenu);
-const previewWidget: PreviewWidget = e2eContainer.get(CLASSES.PreviewWidget);
-const workspaces: Workspaces = e2eContainer.get(CLASSES.Workspaces);
-const rightToolBar: RightToolBar = e2eContainer.get(CLASSES.RightToolBar);
-const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
-const terminal: Terminal = e2eContainer.get(CLASSES.Terminal);
-const debugView: DebugView = e2eContainer.get(CLASSES.DebugView);
-const warningDialog: DialogWindow = e2eContainer.get(CLASSES.DialogWindow);
-const projectName: string = 'petclinic';
-const workspaceRootFolderName: string = 'src';
-const workspaceName: string = TestConstants.TS_SELENIUM_HAPPY_PATH_WORKSPACE_NAME;
-const pathToJavaFolder: string = `${projectName}/${workspaceRootFolderName}/main/java/org/springframework/samples/petclinic`;
-const pathToChangedJavaFileFolder: string = `${projectName}/${workspaceRootFolderName}/main/java/org/springframework/samples/petclinic/system`;
-const classPathFilename: string = '.classpath';
-const javaFileName: string = 'PetClinicApplication.java';
-const weclomeControllerJavaFileName: string = 'WelcomeController.java';
-const changedJavaFileName: string = 'CrashController.java';
-const textForErrorMessageChange: string = 'HHHHHHHHHHHHH';
-const codeNavigationClassName: string = 'SpringApplication.class';
-const pathToYamlFolder: string = projectName;
-const yamlFileName: string = 'devfile.yaml';
-const loginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-
-const SpringAppLocators = {
- springTitleLocator: By.xpath('//div[@class=\'container-fluid\']//h2[text()=\'Welcome\']'),
- springMenuButtonLocator: By.css('button[data-target=\'#main-navbar\']'),
- springErrorButtonLocator: By.xpath('//div[@id=\'main-navbar\']//span[text()=\'Error\']'),
- springHomeButtonLocator: By.className('navbar-brand'),
- springErrorMessageLocator: By.xpath(`//h2[text()='Something happened...']`)
-};
-
-suite('Login', async () => {
- test('Login', async () => {
- await browserTabsUtil.navigateTo(TestConstants.TS_SELENIUM_BASE_URL);
- await loginPage.login();
- });
-});
-
-
-suite('Validation of workspace start', async () => {
- test('Start workspace', async () => {
- await dashboard.waitPage();
- await dashboard.clickWorkspacesButton();
- await workspaces.waitPage();
- await workspaces.clickOpenButton(workspaceName);
- });
-
- projectAndFileTests.waitWorkspaceReadiness(projectName, workspaceRootFolderName);
-});
-
-suite('Language server validation', async () => {
- test('Java LS initialization', async () => {
- await projectTree.expandPathAndOpenFile(pathToJavaFolder, javaFileName);
- await editor.selectTab(javaFileName);
-
- try {
- await ide.checkLsInitializationStart('Activating Language Support for Java');
- await ide.waitStatusBarTextAbsence('Activating Language Support for Java', 900_000);
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
-
- console.log('Known flakiness has occurred https://github.com/eclipse/che/issues/17864');
- await ide.waitStatusBarContains('Activating Java Test Runner');
- await ide.waitStatusBarTextAbsence('Activating Java Test Runner', 900_000);
- }
-
- await checkJavaPathCompletion();
- });
-
- test('Autocomplete', async () => {
- await editor.moveCursorToLineAndChar(javaFileName, 32, 17);
- await editor.pressControlSpaceCombination(javaFileName);
- await editor.waitSuggestionContainer();
- await editor.waitSuggestion(javaFileName, 'SpringApplication - org.springframework.boot');
- });
-
- test('Error highlighting', async () => {
- await driverHelper.getDriver().sleep(TimeoutConstants.TS_SUGGESTION_TIMEOUT); // workaround https://github.com/eclipse/che/issues/19004
-
- const textForErrorDisplaying: string = '$';
- await editor.type(javaFileName, textForErrorDisplaying, 30);
-
- try {
- await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
- } catch (err) {
- Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18974.');
- await browserTabsUtil.refreshPage();
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde();
- await editor.waitErrorInLine(30, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT * 2);
- }
-
- await editor.performKeyCombination(javaFileName, Key.chord(Key.BACK_SPACE));
- await editor.waitErrorInLineDisappearance(30);
- });
-
- test('Suggestion', async () => {
- await editor.moveCursorToLineAndChar(javaFileName, 32, 21);
- await editor.pressControlSpaceCombination(javaFileName);
- await editor.waitSuggestionWithScrolling(javaFileName, 'run(Class> primarySource, String... args) : ConfigurableApplicationContext', 120_000);
- });
-
- test('Codenavigation', async () => {
- await editor.moveCursorToLineAndChar(javaFileName, 32, 17);
- try {
- await editor.performKeyCombination(javaFileName, Key.chord(Key.CONTROL, Key.F12));
- await editor.waitEditorAvailable(codeNavigationClassName);
- } catch (err) {
- // workaround for issue: https://github.com/eclipse/che/issues/14520
- if (err instanceof error.TimeoutError) {
- checkCodeNavigationWithContextMenu();
- }
- }
- });
-
- test.skip('Yaml LS initialization', async () => {
- await projectTree.expandPathAndOpenFile(pathToYamlFolder, yamlFileName);
- await editor.waitEditorAvailable(yamlFileName);
- await editor.clickOnTab(yamlFileName);
- await editor.waitTabFocused(yamlFileName);
- await ide.waitStatusBarContains('Starting Yaml Language Server');
- await ide.waitStatusBarContains('100% Starting Yaml Language Server');
- await ide.waitStatusBarTextAbsence('Starting Yaml Language Server');
- });
-});
-
-suite('Validation of workspace build and run', async () => {
- test('Build application', async () => {
- let buildTaskName: string = 'build-file-output';
- await topMenu.runTask('build-file-output');
- await terminal.waitIconSuccess(buildTaskName, 250_000);
- });
-
- test('Run application', async () => {
- await topMenu.runTask('run');
- await ide.waitNotification('Process 8080-tcp is now listening on port 8080. Open it ?', 120_000);
- await ide.clickOnNotificationButton('Process 8080-tcp is now listening on port 8080. Open it ?', 'Open In Preview');
- });
-
- test('Check the running application', async () => {
- await previewWidget.waitContentAvailable(SpringAppLocators.springTitleLocator, 60_000, 10_000);
- });
-
- test('Close preview widget', async () => {
- await rightToolBar.clickOnToolIcon('Preview');
- await previewWidget.waitPreviewWidgetAbsence();
- });
-
- test('Close the terminal running tasks', async () => {
- await terminal.closeTerminalTab('build-file-output');
- await terminal.rejectTerminalProcess('run');
- await terminal.closeTerminalTab('run');
- await warningDialog.waitAndCloseIfAppear();
- });
-});
-
-suite('Display source code changes in the running application', async () => {
- test('Change source code', async () => {
- await projectTree.expandPathAndOpenFile(pathToChangedJavaFileFolder, changedJavaFileName);
- await editor.waitEditorAvailable(changedJavaFileName);
- await editor.clickOnTab(changedJavaFileName);
- await editor.waitTabFocused(changedJavaFileName);
-
- await editor.moveCursorToLineAndChar(changedJavaFileName, 34, 89);
- await editor.performKeyCombination(changedJavaFileName, textForErrorMessageChange);
- await editor.performKeyCombination(changedJavaFileName, Key.chord(Key.CONTROL, 's'));
- });
-
- test('Build application with changes', async () => {
- let buildTaskName: string = 'build';
- await topMenu.runTask('build');
- await terminal.waitIconSuccess(buildTaskName, 250_000);
- });
-
- test('Run application with changes', async () => {
- await topMenu.runTask('run-with-changes');
- await ide.waitNotification('Process 8080-tcp is now listening on port 8080. Open it ?', 120_000);
- await ide.clickOnNotificationButton('Process 8080-tcp is now listening on port 8080. Open it ?', 'Open In Preview');
- });
-
- test('Check changes are displayed', async () => {
- await previewWidget.waitContentAvailable(SpringAppLocators.springTitleLocator, 60_000, 10_000);
- await checkErrorMessageInApplicationController();
- });
-
- test('Close preview widget', async () => {
- await rightToolBar.clickOnToolIcon('Preview');
- await previewWidget.waitPreviewWidgetAbsence();
- });
-
- test('Close running terminal processes and tabs', async () => {
- await terminal.rejectTerminalProcess('run-with-changes');
- await terminal.closeTerminalTab('run-with-changes');
- await warningDialog.waitAndCloseIfAppear();
- });
-});
-
-suite('Validation of debug functionality', async () => {
- test('Launch debug', async () => {
- await topMenu.runTask('run-debug');
- await ide.waitNotification('Process 8080-tcp is now listening on port 8080. Open it ?', 180_000);
- await ide.clickOnNotificationButton('Process 8080-tcp is now listening on port 8080. Open it ?', 'Open In Preview');
- });
-
- test('Check content of the launched application', async () => {
- await previewWidget.waitAndSwitchToWidgetFrame();
- await previewWidget.waitAndClick(SpringAppLocators.springHomeButtonLocator);
- await driverHelper.getDriver().switchTo().defaultContent();
- await ide.waitAndSwitchToIdeFrame();
- });
-
-
- test('Run debug and check application stop in the breakpoint', async () => {
- await projectTree.expandPathAndOpenFile(pathToJavaFolder + '/system', weclomeControllerJavaFileName);
- await editor.selectTab(weclomeControllerJavaFileName);
- await topMenu.selectOption('View', 'Debug');
- await ide.waitLeftToolbarButton(LeftToolbarButton.Debug);
- await debugView.clickOnDebugConfigurationDropDown();
- await debugView.clickOnDebugConfigurationItem('Debug (Attach) - Remote (petclinic)');
- await debugView.clickOnRunDebugButton();
-
- try {
- await debugView.waitForDebuggerToConnect();
- } catch (err) {
- Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18034 issue.');
- await debugView.clickOnThreadsViewTitle();
-
- await debugView.waitForDebuggerToConnect();
- }
-
- await editor.selectTab(weclomeControllerJavaFileName);
- await editor.activateBreakpoint(weclomeControllerJavaFileName, 27);
-
- await previewWidget.refreshPage();
- try {
- await editor.waitStoppedDebugBreakpoint(weclomeControllerJavaFileName, 27);
- } catch (err) {
- await previewWidget.refreshPage();
- await editor.waitStoppedDebugBreakpoint(weclomeControllerJavaFileName, 27);
- }
- });
-});
-
-async function checkErrorMessageInApplicationController() {
- await previewWidget.waitAndSwitchToWidgetFrame();
- await previewWidget.waitAndClick(SpringAppLocators.springMenuButtonLocator);
- await previewWidget.waitAndClick(SpringAppLocators.springErrorButtonLocator);
-
- try {
- await previewWidget.waitVisibility(SpringAppLocators.springErrorMessageLocator, 15_000);
- } catch (err) {
-
- await driverHelper.getDriver().switchTo().defaultContent();
- await ide.waitAndSwitchToIdeFrame();
-
- await previewWidget.waitAndSwitchToWidgetFrame();
- await previewWidget.waitVisibility(SpringAppLocators.springErrorMessageLocator, 15_000);
- }
-
-
- await driverHelper.getDriver().switchTo().defaultContent();
- await ide.waitAndSwitchToIdeFrame();
-}
-
-async function checkCodeNavigationWithContextMenu() {
- await contextMenu.invokeContextMenuOnActiveElementWithKeys();
- await contextMenu.waitContextMenuAndClickOnItem('Go to Definition');
- console.log('Known isuue https://github.com/eclipse/che/issues/14520.');
-}
-
-async function checkJavaPathCompletion() {
- if (await ide.isNotificationPresent('Classpath is incomplete. Only syntax errors will be reported')) {
- const classpathText: string = fs.readFileSync('./files/happy-path/petclinic-classpath.txt', 'utf8');
- const workaroundReportText: string = '\n############################## \n\n' +
- 'Known issue: https://github.com/eclipse/che/issues/13427 \n' +
- '\"Java LS \"Classpath is incomplete\" warning when loading petclinic\" \n' +
- '\".classpath\" will be configured with next settings: \n\n' +
- classpathText + '\n' +
- '############################## \n';
-
- console.log(workaroundReportText);
-
- await projectTree.expandPathAndOpenFile(projectName, classPathFilename);
- await editor.waitEditorAvailable(classPathFilename);
- await editor.type(classPathFilename, Key.chord(Key.CONTROL, 'a'), 1);
- await editor.performKeyCombination(classPathFilename, Key.DELETE);
- await editor.type(classPathFilename, classpathText, 1);
- await editor.waitTabWithSavedStatus(classPathFilename);
- }
-}
diff --git a/tests/e2e/tests/intelij/IntelijOpenWorkspace.spec.ts b/tests/e2e/tests/intelij/IntelijOpenWorkspace.spec.ts
deleted file mode 100644
index 05ff7e052c..0000000000
--- a/tests/e2e/tests/intelij/IntelijOpenWorkspace.spec.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { By } from 'selenium-webdriver';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestConstants } from '../../TestConstants';
-
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const dashboardUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}`;
-
-suite('The "IntelijOpenWorkspace" userstory', async () => {
- suite('Open workspace', async () => {
- test('Open workspace', async () => {
- await driverHelper.navigateToUrl(`${dashboardUrl}/dashboard/#/ide/admin/java-11-intellij`);
- });
-
- test('Wait workspace', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await waitIntelijWorkspace();
- });
- });
-
-});
-
-async function waitIntelijWorkspace() {
- await driverHelper.waitVisibility(By.css('div#noVNC_container canvas'), 300000);
- await driverHelper.wait(10000);
-}
diff --git a/tests/e2e/tests/load_test/LoadTest.spec.ts b/tests/e2e/tests/load_test/LoadTest.spec.ts
deleted file mode 100644
index 2b06a90923..0000000000
--- a/tests/e2e/tests/load_test/LoadTest.spec.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES, TYPES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { ICheLoginPage } from '../../pageobjects/login/ICheLoginPage';
-import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
-import { TestConstants, WorkspaceNameHandler } from '../..';
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const cheLoginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-const workspaceName: string = WorkspaceNameHandler.generateWorkspaceName('wksp-test-', 5);
-const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
-
-suite('Load test suite', async () => {
-
- suiteTeardown (async function () { await testWorkspaceUtils.cleanUpAllWorkspaces(); });
-
- suiteSetup(async function () {
- const wsConfig = await testWorkspaceUtils.getBaseDevfile();
- wsConfig.metadata!.name = workspaceName;
- await testWorkspaceUtils.createWsFromDevFile(wsConfig);
- });
-
- test('Login into workspace and open tree container', async () => {
- await driverHelper.navigateToUrl(workspacePrefixUrl + workspaceName);
- await cheLoginPage.login();
- });
-
-
- test('Wait loading workspace and get time', async () => {
- await ide.waitWorkspaceAndIde();
- await projectTree.openProjectTreeContainer();
- });
-
-});
-
-
diff --git a/tests/e2e/tests/login/LinkCheAndOcpUsers.spec.ts b/tests/e2e/tests/login/LinkCheAndOcpUsers.spec.ts
deleted file mode 100644
index 880f3cf832..0000000000
--- a/tests/e2e/tests/login/LinkCheAndOcpUsers.spec.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { TestConstants, DriverHelper, CLASSES, TYPES } from '../..';
-import { e2eContainer } from '../../inversify.config';
-import { IOcpLoginPage } from '../../pageobjects/login/IOcpLoginPage';
-import { UpdateAccountInformationPage } from '../../pageobjects/login/UpdateAccountInformationPage';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
-
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ocpLogin: IOcpLoginPage = e2eContainer.get(TYPES.OcpLogin);
-const updateAccountInformation: UpdateAccountInformationPage = e2eContainer.get(CLASSES.UpdateAccountInformationPage);
-const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
-
-const commonTimeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT * 2;
-
-suite('Link users', async () => {
- test('Login to OCP', async () => {
- await driverHelper.navigateToUrl(TestConstants.TS_SELENIUM_BASE_URL);
-
- await ocpLogin.login();
- await updateAccountInformation.clickToAllowSelectedPermissionsButton(commonTimeout);
- });
-
- test('Update account information', async () => {
- await updateAccountInformation.enterEmail('admin@admin.com', commonTimeout);
- await updateAccountInformation.enterFirstName(TestConstants.TS_SELENIUM_USERNAME, commonTimeout);
- await updateAccountInformation.enterLastName(TestConstants.TS_SELENIUM_USERNAME, commonTimeout);
- await updateAccountInformation.clickConfirmButton(commonTimeout);
- await updateAccountInformation.clickAddToExistingAccountButton(commonTimeout);
- });
-
- test('Login to Che', async () => {
- await updateAccountInformation.enterPassword(TestConstants.TS_SELENIUM_PASSWORD, commonTimeout);
- await updateAccountInformation.clickLogInButton(commonTimeout);
- await dashboard.waitPage(commonTimeout);
- });
-
-});
diff --git a/tests/e2e/tests/login/Login.spec.ts b/tests/e2e/tests/login/Login.spec.ts
deleted file mode 100644
index cbfa21d232..0000000000
--- a/tests/e2e/tests/login/Login.spec.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { TestConstants, DriverHelper, CLASSES, ICheLoginPage, TYPES, Logger } from '../..';
-import { e2eContainer } from '../../inversify.config';
-
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const loginPage: ICheLoginPage = e2eContainer.get(TYPES.CheLogin);
-
-suite('Login test', async () => {
- test('Login', async () => {
- await driverHelper.navigateToUrl(TestConstants.TS_SELENIUM_BASE_URL);
- await loginPage.login();
- if (TestConstants.TS_SELENIUM_LAUNCH_FULLSCREEN) {
- Logger.debug(`TS_SELENIUM_LAUNCH_FULLSCREEN is set to true, maximizing window.`);
- await driverHelper.maximize();
- }
- });
-});
diff --git a/tests/e2e/tests/plugins/InstallPluginUsingUI.spec.ts b/tests/e2e/tests/plugins/InstallPluginUsingUI.spec.ts
deleted file mode 100644
index de950c62ff..0000000000
--- a/tests/e2e/tests/plugins/InstallPluginUsingUI.spec.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2021 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import 'reflect-metadata';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES, TYPES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-import { PluginsView } from '../../pageobjects/ide/plugins/PluginsView';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const pluginsView: PluginsView = e2eContainer.get(CLASSES.PluginsView);
-
-const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil);
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-const workspaceHandling: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-
-const workspaceName: string = 'install-plugin-test';
-const workspaceUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/${workspaceName}`;
-
-const pluginTitle: string = 'java11';
-
-suite(`The 'InstallPluginUsingUI' test`, async () => {
- suite('Create workspace', async () => {
- test('Create workspace', async () => {
- const wsConfig = await testWorkspaceUtils.getBaseDevfile();
- wsConfig.metadata!.name = workspaceName;
- await testWorkspaceUtils.createWsFromDevFile(wsConfig);
- });
-
- test('Wait until created workspace is started', async () => {
- await browserTabsUtil.navigateTo(workspaceUrl);
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- });
- });
-
- suite('Install plugin test', async () => {
- test('Open plugins view', async () => {
- await pluginsView.openView();
- });
-
- test('Search plugin', async () => {
- await pluginsView.typeTextToSearchField(pluginTitle);
- await pluginsView.waitPlugin(pluginTitle);
- });
-
- test('Install plugin', async () => {
- await pluginsView.clickInstallButton(pluginTitle);
- await pluginsView.waitInstalledButton(pluginTitle);
- await pluginsView.waitPluginNotification('Click here to apply changes and restart your workspace');
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test(`Stop and remove workspace`, async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- await workspaceHandling.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-
-});
diff --git a/tests/e2e/tests/plugins/JavaPlugin.spec.ts b/tests/e2e/tests/plugins/JavaPlugin.spec.ts
deleted file mode 100644
index 9bc156a2d7..0000000000
--- a/tests/e2e/tests/plugins/JavaPlugin.spec.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2021 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Key } from 'selenium-webdriver';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { ProjectAndFileTests } from '../../testsLibrary/ProjectAndFileTests';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/Java11PluginTest.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const codeNavigationClassName: string = 'String.class';
-const sampleName: string = 'console-java-simple';
-const subRootFolder: string = 'src';
-
-const fileFolderPath: string = `${sampleName}/src/main/java/org/eclipse/che/examples`;
-const tabTitle: string = 'HelloWorld.java';
-
-suite(`The 'JavaPlugin' test`, async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(sampleName, subRootFolder);
- });
- });
-
- suite('Test opening file', async () => {
- // opening file that soon should give time for LS to initialize
- projectAndFileTests.openFile(fileFolderPath, tabTitle);
- });
-
- suite('Language server validation', async () => {
- test('Wait until Java LS is initialised', async () => {
- await ide.checkLsInitializationStart('Activating');
- await ide.waitStatusBarTextAbsence('Activating', 900_000);
- });
-
- test('Autocomplete', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 10, 20);
- await editor.pressControlSpaceCombination(tabTitle);
- await editor.waitSuggestionContainer();
- await editor.waitSuggestion(tabTitle, 'close() : void');
- });
-
- test('Error highlighting', async () => {
- const textForErrorDisplaying: string = '$';
- await editor.type(tabTitle, textForErrorDisplaying, 10);
- await editor.waitErrorInLine(10, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
- await editor.performKeyCombination(tabTitle, Key.chord(Key.BACK_SPACE));
- await editor.waitErrorInLineDisappearance(10);
- });
-
- test('Codenavigation', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 9, 12);
- await editor.performKeyCombination(tabTitle, Key.chord(Key.CONTROL, Key.F12));
- await editor.waitEditorAvailable(codeNavigationClassName, 60_000);
- });
-
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
-
- });
-});
diff --git a/tests/e2e/tests/plugins/PhpPlugin.spec.ts b/tests/e2e/tests/plugins/PhpPlugin.spec.ts
deleted file mode 100644
index f5b7890c2d..0000000000
--- a/tests/e2e/tests/plugins/PhpPlugin.spec.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2021 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide, LeftToolbarButton } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Key } from 'selenium-webdriver';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { DebugView } from '../../pageobjects/ide/DebugView';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const debugView: DebugView = e2eContainer.get(CLASSES.DebugView);
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/PhpPluginTest.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const projectName: string = 'php-web-simple';
-const subRootFolder: string = 'README.md';
-
-const fileFolderPath: string = `${projectName}`;
-const tabTitle: string = 'index.php';
-
-suite(`The 'PhpPlugin' tests`, async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await browserTabsUtil.navigateTo(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, subRootFolder);
- });
- });
-
- suite('The php plugin test', async () => {
- test('Open file', async () => {
- await projectTree.expandPathAndOpenFile(fileFolderPath, tabTitle);
- await editor.selectTab(tabTitle);
- });
-
- test('Autocomplete', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 13, 2);
- await editor.pressControlSpaceCombination(tabTitle);
- await editor.waitSuggestionContainer();
- await editor.waitSuggestion(tabTitle, 'error_log');
- });
-
- test('Error highlighting', async () => {
- const textForErrorDisplaying: string = '*';
- await editor.type(tabTitle, textForErrorDisplaying, 13);
- await editor.waitErrorInLine(13, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
- await editor.type(tabTitle, Key.chord(Key.DELETE), 13);
- await editor.waitErrorInLineDisappearance(13);
- });
- });
-
- suite(`The 'Php-debug' plugin test`, async () => {
- test('Activate breakpoint', async () => {
- await projectTree.expandPathAndOpenFile(fileFolderPath, tabTitle);
- await editor.activateBreakpoint(tabTitle, 13);
- });
-
- test('Run debug', async () => {
- await topMenu.selectOption('View', 'Debug');
- await ide.waitLeftToolbarButton(LeftToolbarButton.Debug);
- await debugView.clickOnDebugConfigurationDropDown();
- await debugView.clickOnDebugConfigurationItem('Launch currently open script (php-web-simple)');
- await debugView.clickOnRunDebugButton();
- });
-
- test('Check breakpoint stopped', async () => {
- await editor.waitStoppedDebugBreakpoint(tabTitle, 13, 60_000);
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/PythonPlugin.spec.ts b/tests/e2e/tests/plugins/PythonPlugin.spec.ts
deleted file mode 100644
index e2a54366fd..0000000000
--- a/tests/e2e/tests/plugins/PythonPlugin.spec.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2021 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Key } from 'selenium-webdriver';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/PythonPluginTest.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const sampleName: string = 'python-hello-world';
-const subRootFile: string = 'README.md';
-
-const fileFolderPath: string = `${sampleName}`;
-const tabTitle: string = 'hello-world.py';
-
-suite(`The 'PythonPlugin' test`, async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(sampleName, subRootFile);
- });
- });
-
- suite('Language server validation', async () => {
- test('Expand project and open file in editor', async () => {
- await projectTree.expandPathAndOpenFile(fileFolderPath, tabTitle);
- await editor.selectTab(tabTitle);
- });
-
- test('Autocomplete', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 8, 2);
- await editor.pressControlSpaceCombination(tabTitle);
- await editor.waitSuggestionContainer();
- await editor.waitSuggestion(tabTitle, 'sum');
- });
-
- test('Error highlighting', async () => {
- const textForErrorDisplaying: string = 'err';
- await editor.type(tabTitle, textForErrorDisplaying, 7);
- await editor.waitErrorInLine(7, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
- await editor.performKeyCombination(tabTitle, Key.chord(Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE));
- await editor.waitErrorInLineDisappearance(7);
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/TypescriptPlugin.spec.ts b/tests/e2e/tests/plugins/TypescriptPlugin.spec.ts
deleted file mode 100644
index 45df1c4b13..0000000000
--- a/tests/e2e/tests/plugins/TypescriptPlugin.spec.ts
+++ /dev/null
@@ -1,168 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2021 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-
-import { DriverHelper } from '../../utils/DriverHelper';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide, LeftToolbarButton } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Key, By } from 'selenium-webdriver';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { TopMenu } from '../../pageobjects/ide/TopMenu';
-import { DebugView } from '../../pageobjects/ide/DebugView';
-import { Terminal } from '../../pageobjects/ide/Terminal';
-import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
-const debugView: DebugView = e2eContainer.get(CLASSES.DebugView);
-const terminal: Terminal = e2eContainer.get(CLASSES.Terminal);
-const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/TypescriptNodeDebug2PluginTest.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const codeNavigationClassName: string = 'OpenDefinition.ts';
-const projectName: string = 'nodejs-web-app';
-const subRootFolder: string = 'app';
-const sampleBodyLocator: By = By.xpath(`//body[text()='Hello World!']`);
-
-const fileFolderPath: string = `${projectName}`;
-const debugFileFolderPath: string = `${projectName}/app`;
-const debugFile: string = 'app.js';
-const tabTitle: string = 'typescript-node-debug.ts';
-
-suite(`The 'TypescriptPlugin and Node-debug' tests`, async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, subRootFolder);
- });
- });
-
- suite('The Typescript plugin test', async () => {
- test('Open file', async () => {
- await projectTree.expandPathAndOpenFile(fileFolderPath, tabTitle);
- await editor.selectTab(tabTitle);
- });
-
- test('Wait until JS/Typescript LS is initialised', async () => {
- await ide.checkLsInitializationStart('Initializing');
- await ide.waitStatusBarTextAbsence('Initializing', 900_000);
- });
-
- test('Autocomplete', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 8, 22);
- await editor.pressControlSpaceCombination(tabTitle);
- await editor.waitSuggestionContainer();
- await editor.waitSuggestion(tabTitle, 'OpenDefinition');
- });
-
- test('Error highlighting', async () => {
- const textForErrorDisplaying: string = '//';
- await editor.type(tabTitle, textForErrorDisplaying, 5);
- await editor.waitErrorInLine(4, TimeoutConstants.TS_ERROR_HIGHLIGHTING_TIMEOUT);
- await editor.type(tabTitle, Key.chord(Key.DELETE, Key.DELETE), 5);
- await editor.waitErrorInLineDisappearance(4);
- });
-
- test('Codenavigation', async () => {
- await editor.moveCursorToLineAndChar(tabTitle, 8, 22);
- await editor.performKeyCombination(tabTitle, Key.chord(Key.CONTROL, Key.F12));
- await editor.waitEditorAvailable(codeNavigationClassName, 60_000);
- });
- });
-
- suite(`The 'Node-debug' plugin test`, async () => {
- let currentWindow: string = '';
- let applicationPreviewWindow: string = '';
-
- test('Run application in debug mode', async () => {
- await topMenu.runTask('run the web app (debugging enabled)');
- await ide.waitNotification('Process nodejs is now listening on port 3000.');
-
- currentWindow = await browserTabsUtil.getCurrentWindowHandle();
- });
-
- test('Open application in the new editor window', async () => {
- await ide.clickOnNotificationButton('Process nodejs is now listening on port 3000.', 'Open In New Tab');
- await browserTabsUtil.waitAndSwitchToAnotherWindow(currentWindow, 60_000);
- await browserTabsUtil.waitContentAvailableInTheNewTab(sampleBodyLocator, 60_000);
-
- applicationPreviewWindow = await browserTabsUtil.getCurrentWindowHandle();
- });
-
- test('Switch back to the IDE window', async () => {
- await browserTabsUtil.switchToWindow(currentWindow);
- await ide.waitAndSwitchToIdeFrame(60_000);
- });
-
- test('Activate breakpoint', async () => {
- await projectTree.expandPathAndOpenFile(debugFileFolderPath, debugFile);
- await editor.activateBreakpoint(debugFile, 19);
- });
-
- test('Run debug', async () => {
- await topMenu.selectOption('View', 'Debug');
- await ide.waitLeftToolbarButton(LeftToolbarButton.Debug);
- await debugView.clickOnDebugConfigurationDropDown();
- await debugView.clickOnDebugConfigurationItem('Attach to Remote (nodejs-web-app)');
- await debugView.clickOnRunDebugButton();
- });
-
- test('Wait debug connected', async () => {
- await terminal.waitTab('Debug Console', 60_000);
-
- // for make sure that debug really start
- // (inner processes may not be displayed)
- await driverHelper.wait(10_000);
- });
-
- test('Refresh application sample window', async () => {
- await browserTabsUtil.switchToWindow(applicationPreviewWindow);
- await browserTabsUtil.waitContentAvailableInTheNewTab(sampleBodyLocator, 60_000);
- await browserTabsUtil.refreshPage();
- });
-
- test('Check breakpoint stopped', async () => {
- await browserTabsUtil.switchToWindow(currentWindow);
- await ide.waitAndSwitchToIdeFrame(60000);
-
- await editor.waitStoppedDebugBreakpoint(debugFile, 19, 60_000);
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/VscodeKubernetesPlugin.spec.ts b/tests/e2e/tests/plugins/VscodeKubernetesPlugin.spec.ts
deleted file mode 100644
index ea5e33f943..0000000000
--- a/tests/e2e/tests/plugins/VscodeKubernetesPlugin.spec.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { PreferencesHandler } from '../../utils/PreferencesHandler';
-import { KubernetesPlugin } from '../../pageobjects/ide/plugins/KubernetesPlugin';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-const kubernetesPlugin: KubernetesPlugin = e2eContainer.get(CLASSES.KubernetesPlugin);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/VscodeKubernetesPlugin.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const sampleName: string = 'nodejs-web-app';
-const subRootFolder: string = 'app';
-const vsKubernetesConfig = { 'vs-kubernetes.kubeconfig': '/projects/nodejs-web-app/config' };
-
-suite(`The 'VscodeKubernetesPlugin' test`, async () => {
- suite('Create workspace', async () => {
- test('Set kubeconfig path', async () => {
- await preferencesHandler.setVscodeKubernetesPluginConfig(vsKubernetesConfig);
- });
-
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(sampleName, subRootFolder);
- });
- });
-
- suite('Check the "Kubernetes" plugin', async () => {
- test('Check plugin is added to workspace', async () => {
- await kubernetesPlugin.openView(240_000);
- });
-
- test('Check plugin basic functionality', async () => {
- await kubernetesPlugin.waitListItemContains('/api-ocp46-crw-qe-com:6443/', 240_000);
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/VscodeShellcheckPlugin.spec.ts b/tests/e2e/tests/plugins/VscodeShellcheckPlugin.spec.ts
deleted file mode 100644
index aac23cce67..0000000000
--- a/tests/e2e/tests/plugins/VscodeShellcheckPlugin.spec.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2020 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { WorkspaceNameHandler } from '../..';
-import 'reflect-metadata';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { TestConstants } from '../../TestConstants';
-import { PreferencesHandler } from '../../utils/PreferencesHandler';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Key } from 'selenium-webdriver';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/VscodeShellcheckPlugin.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const sampleName: string = 'nodejs-web-app';
-const subRootFolder: string = 'app';
-const pathToFile: string = `${sampleName}`;
-const fileName: string = 'test.sh';
-
-suite(`The 'VscodeShellcheckPlugin' test`, async () => {
- suite('Create workspace', async () => {
- test('Set shellcheck path', async () => {
- const shellcheckExecutablePathPropertyName: string = 'shellcheck.executablePath';
- const shellcheckExecutablePath: string = '/bin/shellcheck';
-
- await preferencesHandler.setPreference(shellcheckExecutablePathPropertyName, shellcheckExecutablePath);
- });
-
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(sampleName, subRootFolder);
- });
- });
-
- suite('Check the "Shellcheck" plugin', async () => {
- test('Check errors highlighting', async () => {
- // the simple " character as a result. Workaround to avoiding autocomplete.
- const errorText: string = Key.chord('"""', Key.BACK_SPACE, Key.BACK_SPACE);
-
- await projectTree.expandPathAndOpenFile(pathToFile, fileName);
- await editor.type(fileName, errorText, 4);
- await editor.waitErrorInLine(4);
- });
-
- test('Check errors highlighting disappearance', async () => {
- await editor.type(fileName, Key.DELETE, 4);
- await editor.waitErrorInLineDisappearance(4);
- });
-
- test('Check warning highlighting', async () => {
- await editor.waitWarningInLine(5);
- });
-
- test('Uncomment the 4-th row', async () => {
- await editor.type(fileName, Key.DELETE, 3);
- });
-
- test('Check warning highlighting disappearance', async () => {
- await editor.waitWarningInLineDisappearance(5);
- });
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- let workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/VscodeValePlugin.spec.ts b/tests/e2e/tests/plugins/VscodeValePlugin.spec.ts
deleted file mode 100644
index 1624ed26e3..0000000000
--- a/tests/e2e/tests/plugins/VscodeValePlugin.spec.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { Key } from 'selenium-webdriver';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestConstants } from '../../TestConstants';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { Terminal } from '../../pageobjects/ide/Terminal';
-import { Logger } from '../../utils/Logger';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const terminal: Terminal = e2eContainer.get(CLASSES.Terminal);
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-
-let workspaceName: string = '';
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/VscodeValePlugin.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const projectName: string = 'che-docs';
-const pathToFile: string = `${projectName}/modules/administration-guide/partials`;
-const docFileName: string = 'assembly_authenticating-users.adoc';
-
-suite('The "VscodeValePlugin" userstory', async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
-
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- });
-
- suite('Check workspace readiness to work', async () => {
- test('Wait until project is imported', async () => {
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, 'modules');
- });
- });
-
- suite('Check the "vale" plugin', async () => {
- test('Check warning in the editor appearance', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, docFileName);
- await editor.waitWarningInLine(16);
- });
-
- test('Open the "Problems" terminal tab', async () => {
- await editor.type(docFileName, Key.chord(Key.CONTROL, Key.SHIFT, 'm'), 3);
- await terminal.waitTab('Problems', 60_000);
- });
-
- test('Check the vale plugin output in the "Problems" tab', async () => {
- await terminal.waitTextInProblemsTab('Keep sentences short and to the point', 60_000);
- });
-
- });
-
- suite('Stopping and deleting the workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/tests/plugins/VscodeXmlPlugin.spec.ts b/tests/e2e/tests/plugins/VscodeXmlPlugin.spec.ts
deleted file mode 100644
index 846acaaf1a..0000000000
--- a/tests/e2e/tests/plugins/VscodeXmlPlugin.spec.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { Key } from 'selenium-webdriver';
-import { e2eContainer } from '../../inversify.config';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { CLASSES } from '../../inversify.types';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { TestConstants } from '../../TestConstants';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-import { Logger } from '../../utils/Logger';
-
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-
-let workspaceName: string = '';
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/VscodeXmlPlugin.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const projectName: string = 'nodejs-web-app';
-const pathToFile: string = `${projectName}`;
-const xmlFileName: string = 'hello.xml';
-
-suite('The "VscodeXmlPlugin" userstory', async () => {
- suite('Create workspace', async () => {
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
-
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- });
-
- suite('Check workspace readiness to work', async () => {
- test('Wait until project is imported', async () => {
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, 'app');
- });
- });
-
- suite('Check the "vscode-xml" plugin', async () => {
- test('Check autocomplete', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
- await editor.waitSuggestion(xmlFileName, 'rollback', 60000, 16, 4);
- });
-
- test('Check error appearance', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
-
- await editor.type(xmlFileName, '\$\%\^\#', 16);
- await editor.waitErrorInLine(16);
- });
-
- test('Check error disappearance', async () => {
- await editor.performKeyCombination(xmlFileName, Key.chord(Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE));
- await editor.waitErrorInLineDisappearance(16);
- });
-
- test('Check auto-close tags', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
-
- await editor.type(xmlFileName, '', 21);
- await editor.waitText(xmlFileName, '', 60000, 10000);
-
- await editor.performKeyCombination(xmlFileName, Key.chord(Key.CONTROL, 'z'));
- await editor.performKeyCombination(xmlFileName, Key.chord(Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE, Key.BACK_SPACE));
- });
-
- test('To unformat the "xml" file', async () => {
- const expectedTextBeforeFormating: string = 'Hello World!!!';
- await projectTree.expandPathAndOpenFile(pathToFile, xmlFileName);
-
- await editor.selectTab(xmlFileName);
- await editor.moveCursorToLineAndChar(xmlFileName, 25, 22);
- await editor.performKeyCombination(xmlFileName, Key.chord(Key.SPACE, Key.SPACE, Key.SPACE, Key.SPACE));
- await editor.waitText(xmlFileName, expectedTextBeforeFormating, 60000, 10000);
- });
-
- test('To format the "xml" document', async () => {
- const expectedTextAfterFormating: string = 'Hello World!!!';
-
- await editor.type(xmlFileName, Key.chord(Key.CONTROL, Key.SHIFT, 'I'), 25);
- await editor.waitText(xmlFileName, expectedTextAfterFormating, 60000, 10000);
- });
-
- });
-
- suite('Delete workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-
-});
diff --git a/tests/e2e/tests/plugins/VscodeYamlPlugin.spec.ts b/tests/e2e/tests/plugins/VscodeYamlPlugin.spec.ts
deleted file mode 100644
index 47aa3f916d..0000000000
--- a/tests/e2e/tests/plugins/VscodeYamlPlugin.spec.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { Key } from 'selenium-webdriver';
-import { e2eContainer } from '../../inversify.config';
-import { CLASSES } from '../../inversify.types';
-import { Ide } from '../../pageobjects/ide/Ide';
-import { ProjectTree } from '../../pageobjects/ide/ProjectTree';
-import { Editor } from '../../pageobjects/ide/Editor';
-import { DriverHelper } from '../../utils/DriverHelper';
-import { PreferencesHandler } from '../../utils/PreferencesHandler';
-import { TestConstants } from '../../TestConstants';
-import { TimeoutConstants } from '../../TimeoutConstants';
-import { WorkspaceNameHandler } from '../../utils/WorkspaceNameHandler';
-import { Logger } from '../../utils/Logger';
-import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
-
-const ide: Ide = e2eContainer.get(CLASSES.Ide);
-const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
-const editor: Editor = e2eContainer.get(CLASSES.Editor);
-const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
-const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
-
-let workspaceName: string = '';
-
-const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/master/tests/e2e/files/devfiles/plugins/VscodeYamlPlugin.yaml';
-const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
-const projectName: string = 'nodejs-web-app';
-const pathToFile: string = `${projectName}`;
-const yamlFileName: string = 'routes.yaml';
-const yamlSchema = { 'https://raw.githubusercontent.com/apache/camel-k-runtime/camel-k-runtime-parent-1.5.0/camel-k-loader-yaml/camel-k-loader-yaml/src/generated/resources/camel-yaml-dsl.json': '*.yaml' };
-
-suite('The "VscodeYamlPlugin" userstory', async () => {
- suite('Create workspace', async () => {
- test('Set yaml schema', async () => {
- await preferencesHandler.setPreference('yaml.schemas', yamlSchema);
- });
-
- test('Create workspace using factory', async () => {
- await driverHelper.navigateToUrl(factoryUrl);
- });
-
- test('Wait until created workspace is started', async () => {
- await ide.waitAndSwitchToIdeFrame();
- await ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
-
- workspaceName = await WorkspaceNameHandler.getNameFromUrl();
- });
- });
-
- suite('Check workspace readiness to work', async () => {
- test('Wait until project is imported', async () => {
- await projectTree.openProjectTreeContainer();
- await projectTree.waitProjectImported(projectName, 'app');
- });
- });
-
- suite('Check the "vscode-yaml" plugin', async () => {
- test('Check autocomplete', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, yamlFileName);
- await editor.waitSuggestion(yamlFileName, 'from', 60000, 18, 5);
- });
-
- test('Check error appearance', async () => {
- await projectTree.expandPathAndOpenFile(pathToFile, yamlFileName);
-
- await editor.type(yamlFileName, Key.SPACE, 19);
- await editor.waitErrorInLine(19);
- });
-
- test('Check error disappearance', async () => {
- await editor.performKeyCombination(yamlFileName, Key.BACK_SPACE);
- await editor.waitErrorInLineDisappearance(19);
- });
-
- test('To unformat the "yaml" file', async () => {
- const expectedTextBeforeFormating: string = 'uri: "timer:tick"';
- await projectTree.expandPathAndOpenFile(pathToFile, yamlFileName);
-
- await editor.selectTab(yamlFileName);
- await editor.moveCursorToLineAndChar(yamlFileName, 19, 10);
- await editor.performKeyCombination(yamlFileName, Key.chord(Key.SPACE, Key.SPACE, Key.SPACE, Key.SPACE));
- await editor.waitText(yamlFileName, expectedTextBeforeFormating, 60000, 10000);
- });
-
- test('To format the "yaml" document', async () => {
- const expectedTextAfterFormating: string = 'uri: "timer:tick"';
-
- await editor.type(yamlFileName, Key.chord(Key.CONTROL, Key.SHIFT, 'I'), 19);
- await editor.waitText(yamlFileName, expectedTextAfterFormating, 60000, 10000);
- });
-
- });
-
- suite('Delete workspace', async () => {
- test('Stop and remove workspace', async () => {
- if (TestConstants.TS_DELETE_PLUGINS_TEST_WORKSPACE === 'true') {
- await workspaceHandlingTests.stopAndRemoveWorkspace(workspaceName);
- return;
- }
-
- Logger.info(`As far as the "TS_DELETE_PLUGINS_TEST_WORKSPACE" value is "false the workspace deletion is skipped"`);
- });
- });
-});
diff --git a/tests/e2e/testsLibrary/CodeExecutionTests.ts b/tests/e2e/testsLibrary/CodeExecutionTests.ts
deleted file mode 100644
index 22367153bc..0000000000
--- a/tests/e2e/testsLibrary/CodeExecutionTests.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import 'reflect-metadata';
-import { inject, injectable } from 'inversify';
-import { Ide } from '../pageobjects/ide/Ide';
-import { Terminal } from '../pageobjects/ide/Terminal';
-import { TopMenu } from '../pageobjects/ide/TopMenu';
-import { DialogWindow } from '../pageobjects/ide/DialogWindow';
-import { DriverHelper } from '../utils/DriverHelper';
-import { Key } from 'selenium-webdriver';
-import Axios from 'axios';
-import { CLASSES } from '../inversify.types';
-
-@injectable()
-export class CodeExecutionTests {
-
- constructor(
- @inject(CLASSES.Terminal) private readonly terminal: Terminal,
- @inject(CLASSES.TopMenu) private readonly topMenu: TopMenu,
- @inject(CLASSES.Ide) private readonly ide: Ide,
- @inject(CLASSES.DialogWindow) private readonly dialogWindow: DialogWindow,
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) {}
-
- public runTask(taskName: string, timeout: number) {
- test(`Run command '${taskName}'`, async () => {
- await this.topMenu.runTask(taskName);
- await this.terminal.waitIconSuccess(taskName, timeout);
- });
- }
-
- public runTaskInputText(taskName: string, waitedText: string, inputText: string, timeout: number) {
- test(`Run command '${taskName}' expecting dialog shell`, async () => {
- await this.topMenu.runTask(taskName);
- await this.terminal.waitText(taskName, waitedText, timeout);
- await this.terminal.clickOnTab(taskName);
- await this.terminal.type(taskName, inputText);
- await this.terminal.type(taskName, Key.ENTER);
- await this.terminal.waitIconSuccess(taskName, timeout);
- });
- }
-
- public runTaskWithDialogShellAndOpenLink(taskName: string, expectedDialogText: string, timeout: number) {
- test(`Run command '${taskName}' expecting dialog shell`, async () => {
- await this.topMenu.runTask(taskName);
- await this.dialogWindow.waitDialogAndOpenLink(expectedDialogText, timeout);
- });
- }
-
- public runTaskWithDialogShellDjangoWorkaround(taskName: string, expectedDialogText: string, urlSubPath: string, timeout: number) {
- test(`Run command '${taskName}' expecting dialog shell`, async () => {
- await this.topMenu.runTask(taskName);
- await this.dialogWindow.waitDialog(expectedDialogText, timeout);
- const dialogRedirectUrl: string = await this.dialogWindow.getApplicationUrlFromDialog(expectedDialogText);
- const augmentedPreviewUrl: string = dialogRedirectUrl + urlSubPath;
- await this.dialogWindow.closeDialog();
- await this.dialogWindow.waitDialogDissappearance();
- await this.driverHelper.getDriver().wait(async () => {
- try {
- const res = await Axios.get(augmentedPreviewUrl);
- if (res.status === 200) { return true; }
- } catch (error) { await this.driverHelper.wait(1_000); }
- }, timeout);
- });
- }
-
- public runTaskWithDialogShellAndClose(taskName: string, expectedDialogText: string, timeout: number) {
- test(`Run command '${taskName}' expecting dialog shell`, async () => {
- await this.topMenu.runTask(taskName);
- await this.dialogWindow.waitDialog(expectedDialogText, timeout);
- await this.dialogWindow.closeDialog();
- await this.dialogWindow.waitDialogDissappearance();
- });
- }
-
- public runTaskWithNotification(taskName: string, notificationText: string, timeout: number) {
- test(`Run command '${taskName}' expecting notification pops up`, async () => {
- await this.topMenu.runTask(taskName);
- await this.ide.waitNotification(notificationText, timeout);
- });
- }
-
- public closeTerminal(taskName: string) {
- test('Close the terminal tasks', async () => {
- await this.ide.closeAllNotifications();
- await this.terminal.closeTerminalTab(taskName);
- });
- }
-}
diff --git a/tests/e2e/testsLibrary/LanguageServerTests.ts b/tests/e2e/testsLibrary/LanguageServerTests.ts
deleted file mode 100644
index 6896b59dbc..0000000000
--- a/tests/e2e/testsLibrary/LanguageServerTests.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import 'reflect-metadata';
-import { inject, injectable } from 'inversify';
-import { CLASSES } from '../inversify.types';
-import { TimeoutConstants } from '../TimeoutConstants';
-import { Editor } from '../pageobjects/ide/Editor';
-import { Ide} from '../pageobjects/ide/Ide';
-import { Key, error } from 'selenium-webdriver';
-import { Logger } from '../utils/Logger';
-
-@injectable()
-export class LanguageServerTests {
-
- constructor(@inject(CLASSES.Editor) private readonly editor: Editor, @inject(CLASSES.Ide) private readonly ide: Ide) { }
-
- public errorHighlighting(openedTab: string, textToWrite: string, line: number) {
- test('Error highlighting', async () => {
- await this.editor.type(openedTab, textToWrite, line);
- try {
- await this.editor.waitErrorInLine(line);
- } catch (err) {
- if (!(err instanceof error.TimeoutError)) {
- throw err;
- }
- }
- for (let i = 0; i < textToWrite.length; i++) {
- await this.editor.performKeyCombination(openedTab, Key.BACK_SPACE);
- }
- await this.editor.waitErrorInLineDisappearance(line);
- });
- }
-
- public suggestionInvoking(openedTab: string, line: number, char: number, suggestionText: string) {
- test('Suggestion invoking', async () => {
- await this.ide.closeAllNotifications();
- await this.editor.waitEditorAvailable(openedTab);
- await this.editor.clickOnTab(openedTab);
- await this.editor.waitEditorAvailable(openedTab);
- await this.editor.waitTabFocused(openedTab);
- await this.editor.moveCursorToLineAndChar(openedTab, line, char);
- await this.editor.pressControlSpaceCombination(openedTab);
- await this.editor.waitSuggestion(openedTab, suggestionText);
- });
- }
-
- public autocomplete(openedTab: string, line: number, char: number, expectedText: string) {
- test('Autocomplete', async () => {
- await this.editor.moveCursorToLineAndChar(openedTab, line, char);
- await this.editor.pressControlSpaceCombination(openedTab);
- await this.editor.waitSuggestionContainer();
- await this.editor.waitSuggestionWithScrolling(openedTab, expectedText);
- });
- }
-
- public waitLSInitialization(startingNote: string, startTimeout: number, buildWorkspaceTimeout: number) {
- test('LS initialization', async () => {
- await this.ide.checkLsInitializationStart(startingNote);
- await this.ide.waitStatusBarTextAbsence(startingNote, startTimeout);
- await this.ide.waitStatusBarTextAbsence('Building workspace', buildWorkspaceTimeout);
- });
- }
-
- public codeNavigation(openedFile: string, line: number, char: number, codeNavigationClassName: string, timeout : number = TimeoutConstants.TS_EDITOR_TAB_INTERACTION_TIMEOUT) {
- test('Codenavigation', async () => {
- // adding retry to fix https://github.com/eclipse/che/issues/17411
- try {
- await this.editor.moveCursorToLineAndChar(openedFile, line, char);
- await this.editor.performKeyCombination(openedFile, Key.chord(Key.CONTROL, Key.F12));
- await this.editor.waitEditorAvailable(codeNavigationClassName, timeout);
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- Logger.warn('Code navigation didn\'t work. Trying again.');
- await this.editor.moveCursorToLineAndChar(openedFile, line, char);
- await this.editor.performKeyCombination(openedFile, Key.chord(Key.CONTROL, Key.F12));
- await this.editor.waitEditorAvailable(codeNavigationClassName, timeout);
- } else {
- Logger.error('Code navigation didn\'t work even after retrying.');
- throw err;
- }
- }
- });
- }
-}
diff --git a/tests/e2e/testsLibrary/ProjectAndFileTests.ts b/tests/e2e/testsLibrary/ProjectAndFileTests.ts
deleted file mode 100644
index ed5dc6ad71..0000000000
--- a/tests/e2e/testsLibrary/ProjectAndFileTests.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import 'reflect-metadata';
-import { inject, injectable } from 'inversify';
-import { By } from 'selenium-webdriver';
-import { Ide } from '../pageobjects/ide/Ide';
-import { ProjectTree } from '../pageobjects/ide/ProjectTree';
-import { Editor } from '../pageobjects/ide/Editor';
-import { TimeoutConstants } from '../TimeoutConstants';
-import { DriverHelper } from '../utils/DriverHelper';
-import { CLASSES } from '../inversify.types';
-
-@injectable()
-export class ProjectAndFileTests {
-
- constructor(
- @inject(CLASSES.Ide) private readonly ide: Ide,
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.ProjectTree) private readonly projectTree: ProjectTree,
- @inject(CLASSES.Editor) private readonly editor: Editor) {}
-
- public waitWorkspaceReadiness(sampleName : string, folder: string) {
- test('Wait for workspace readiness', async () => {
- await this.ide.waitAndSwitchToIdeFrame();
- await this.ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await this.projectTree.openProjectTreeContainer();
- await this.projectTree.waitProjectImported(sampleName, folder);
- });
- }
-
- public waitWorkspaceReadinessNoSubfolder(sampleName : string) {
- test('Wait for workspace readiness', async () => {
- await this.ide.waitAndSwitchToIdeFrame();
- await this.ide.waitIde(TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT);
- await this.projectTree.openProjectTreeContainer();
- await this.projectTree.waitProjectImportedNoSubfolder(sampleName);
- });
- }
-
- public openFile(filePath: string, fileName: string) {
- test('Expand project and open file in editor', async () => {
- await this.projectTree.expandPathAndOpenFile(filePath, fileName);
- await this.editor.selectTab(fileName);
- });
- }
-
- public checkFileNotExists(filePath: string) {
- test('Check that file is not exist in project', async () => {
- await this.projectTree.waitItemDisappearance(filePath);
- });
- }
-
- public checkProjectBranchName(branchName: string) {
- test('Check branch name is ${}', async () => {
- await this.driverHelper.waitVisibility(By.xpath(`//div[@id='theia-statusBar']/div//span[text()=' ${branchName}']`));
- });
- }
-}
diff --git a/tests/e2e/testsLibrary/WorkspaceHandlingTests.ts b/tests/e2e/testsLibrary/WorkspaceHandlingTests.ts
deleted file mode 100644
index 02f8807196..0000000000
--- a/tests/e2e/testsLibrary/WorkspaceHandlingTests.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import 'reflect-metadata';
-import { inject, injectable } from 'inversify';
-import { CLASSES } from '../inversify.types';
-import { Dashboard } from '../pageobjects/dashboard/Dashboard';
-import { CreateWorkspace } from '../pageobjects/dashboard/CreateWorkspace';
-
-@injectable()
-export class WorkspaceHandlingTests {
-
- constructor(@inject(CLASSES.Dashboard) private readonly dashboard: Dashboard, @inject(CLASSES.CreateWorkspace) private readonly createWorkspace: CreateWorkspace) {}
-
- public createAndOpenWorkspace(stack: string) {
- test(`Open 'New Workspace' page`, async () => {
- await this.dashboard.waitPage();
- await this.dashboard.clickCreateWorkspaceButton();
- await this.createWorkspace.waitPage();
- await this.createWorkspace.clickOnSample(stack);
- });
- }
-
- public async stopWorkspace(workspaceName: string) {
- await this.dashboard.stopWorkspaceByUI(workspaceName);
- }
-
- public async removeWorkspace(workspaceName: string) {
- await this.dashboard.deleteWorkspaceByUI(workspaceName);
- }
-
- public async stopAndRemoveWorkspace(workspaceName: string) {
- await this.dashboard.stopAndRemoveWorkspaceByUI(workspaceName);
- }
-}
diff --git a/tests/e2e/tsconfig.json b/tests/e2e/tsconfig.json
deleted file mode 100644
index 03f7a97bed..0000000000
--- a/tests/e2e/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "compilerOptions": {
- "target": "es2017",
- "module": "commonjs",
- "strict": true,
- "esModuleInterop": true,
-
- "outDir": "dist",
- "lib": ["es2017", "dom"],
- "types": ["reflect-metadata", "@types/mocha", "@types/node"],
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "sourceMap": true
-
- }
-}
diff --git a/tests/e2e/tslint.json b/tests/e2e/tslint.json
deleted file mode 100644
index b75b55b98e..0000000000
--- a/tests/e2e/tslint.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "rules": {
- "ban": [
- true,
- [
- "_",
- "extend"
- ],
- [
- "_",
- "isNull"
- ],
- [
- "_",
- "isDefined"
- ]
- ],
- "class-name": true,
- "comment-format": [
- true,
- "check-space",
- "check-lowercase"
- ],
- "curly": true,
- "eofline": true,
- "forin": true,
- "indent": [
- true,
- 2
- ],
- "interface-name": true,
- "jsdoc-format": true,
- "label-position": true,
- "label-undefined": true,
- "max-line-length": [
- false,
- 140
- ],
- "member-ordering": [
- true,
- "public-before-private",
- "static-before-instance",
- "variables-before-functions"
- ],
- "no-arg": true,
- "no-bitwise": true,
- "no-console": [
- true,
- "debug",
- "info",
- "time",
- "timeEnd",
- "trace"
- ],
- "no-construct": true,
- "no-constructor-vars": true,
- "no-debugger": true,
- "no-duplicate-key": true,
- "no-duplicate-variable": true,
- "no-empty": true,
- "no-eval": true,
- "no-string-literal": true,
- "no-switch-case-fall-through": true,
- "no-trailing-comma": true,
- "no-trailing-whitespace": true,
- "no-unused-expression": true,
- "no-unused-variable": true,
- "no-unreachable": true,
- "no-use-before-declare": true,
- "no-var-requires": false,
- "one-line": [
- true,
- "check-open-brace",
- "check-catch",
- "check-else",
- "check-whitespace"
- ],
- "quotemark": [
- true,
- "single"
- ],
- "radix": true,
- "semicolon": true,
- "triple-equals": [
- true,
- "allow-null-check"
- ],
- "typedef": [
- true,
- "callSignature",
- "indexSignature",
- "parameter",
- "propertySignature",
- "variableDeclarator"
- ],
- "typedef-whitespace": [
- true,
- [
- "callSignature",
- "noSpace"
- ],
- [
- "catchClause",
- "noSpace"
- ],
- [
- "indexSignature",
- "space"
- ]
- ],
- "use-strict": false,
- "variable-name": false,
- "whitespace": [
- true,
- "check-branch",
- "check-decl",
- "check-operator",
- "check-separator",
- "check-type"
- ]
- }
- }
-
\ No newline at end of file
diff --git a/tests/e2e/utils/BrowserTabsUtil.ts b/tests/e2e/utils/BrowserTabsUtil.ts
deleted file mode 100644
index 423aaf222b..0000000000
--- a/tests/e2e/utils/BrowserTabsUtil.ts
+++ /dev/null
@@ -1,106 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { injectable, inject } from 'inversify';
-import { By } from 'selenium-webdriver';
-import { CLASSES } from '../inversify.types';
-import { DriverHelper } from './DriverHelper';
-import { Logger } from './Logger';
-import { TimeoutConstants } from '../TimeoutConstants';
-
-@injectable()
-export class BrowserTabsUtil {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async switchToWindow(windowHandle: string) {
- Logger.debug('BrowserTabsUtil.switchToWindow');
- await this.driverHelper.getDriver().switchTo().window(windowHandle);
- }
-
- async getAllWindowHandles(): Promise {
- Logger.debug('BrowserTabsUtil.getAllWindowHandles');
-
- return (await this.driverHelper.getDriver()).getAllWindowHandles();
- }
-
- async getCurrentWindowHandle(): Promise {
- Logger.debug('BrowserTabsUtil.getCurrentWindowHandle');
-
- return await this.driverHelper.getDriver().getWindowHandle();
- }
-
- async navigateTo(url: string) {
- Logger.debug(`BrowserTabsUtil.navigateTo ${url}`);
-
- await this.driverHelper.getDriver().navigate().to(url);
- }
-
- async navigateAndWaitToUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_WAIT_FOR_URL) {
- Logger.trace(`BrowserTabsUtil.navigateAndWaitToUrl ${url}`);
-
- await this.navigateTo(url);
- await this.waitURL(url, timeout);
- }
-
- async waitAndSwitchToAnotherWindow(currentWindowHandle: string, timeout: number) {
- Logger.debug('BrowserTabsUtil.waitAndSwitchToAnotherWindow');
-
- await this.driverHelper.waitUntilTrue(async () => {
- const windowHandles: string[] = await this.getAllWindowHandles();
-
- return windowHandles.length > 1;
- }, timeout);
-
- const windowHandles: string[] = await this.getAllWindowHandles();
-
- windowHandles.forEach(async windowHandle => {
- if (windowHandle !== currentWindowHandle) {
- await this.switchToWindow(windowHandle);
- return;
- }
- });
- }
-
- async waitContentAvailableInTheNewTab(contentLocator: By, timeout: number) {
- Logger.debug('BrowserTabsUtil.waitContentAvailableInTheNewTab');
-
- await this.driverHelper.waitVisibility(contentLocator, timeout);
- }
-
- async refreshPage() {
- Logger.debug('BrowserTabsUtil.refreshPage');
-
- await (await this.driverHelper.getDriver()).navigate().refresh();
- }
-
- async getCurrentUrl(): Promise {
- return await this.driverHelper.getDriver().getCurrentUrl();
- }
-
- async waitURL(expectedUrl: string, timeout: number) {
- Logger.trace(`BrowserTabsUtil.waitURL ${expectedUrl}`);
-
- await this.driverHelper.getDriver().wait(async () => {
- const currentUrl: string = await this.driverHelper.getDriver().getCurrentUrl();
- const urlEquals: boolean = currentUrl === expectedUrl;
-
- if (urlEquals) {
- return true;
- }
- }, timeout);
- }
-
- public async maximize() {
- Logger.trace(`BrowserTabsUtil.maximize`);
-
- await this.driverHelper.getDriver().manage().window().maximize();
- }
-
-}
diff --git a/tests/e2e/utils/DriverHelper.ts b/tests/e2e/utils/DriverHelper.ts
deleted file mode 100644
index 147c700587..0000000000
--- a/tests/e2e/utils/DriverHelper.ts
+++ /dev/null
@@ -1,753 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { IDriver } from '../driver/IDriver';
-import { inject, injectable } from 'inversify';
-import { TYPES } from '../inversify.types';
-import { error, ActionSequence } from 'selenium-webdriver';
-import 'reflect-metadata';
-import { ThenableWebDriver, By, until, WebElement } from 'selenium-webdriver';
-import { TestConstants } from '../TestConstants';
-import { Logger } from './Logger';
-import { TimeoutConstants } from '../TimeoutConstants';
-
-
-@injectable()
-export class DriverHelper {
- private readonly driver: ThenableWebDriver;
-
- constructor(@inject(TYPES.Driver) driver: IDriver) {
- this.driver = driver.get();
- }
-
- public getAction(): ActionSequence {
- Logger.trace('DriverHelper.getAction');
-
- return this.driver.actions();
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.maximize()
- */
- public async maximize() {
- Logger.trace(`DriverHelper.maximize`);
-
- await this.driver.manage().window().maximize();
- }
-
- public async isVisible(locator: By): Promise {
- Logger.trace(`DriverHelper.isVisible ${locator}`);
-
- try {
- const element: WebElement = await this.driver.findElement(locator);
- const isVisible: boolean = await element.isDisplayed();
- return isVisible;
- } catch {
- return false;
- }
- }
-
- public async wait(milliseconds: number) {
- Logger.trace(`DriverHelper.wait (${milliseconds} milliseconds)`);
-
- await this.driver.sleep(milliseconds);
- }
-
- public async waitVisibilityBoolean(locator: By,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING): Promise {
-
- Logger.trace(`DriverHelper.waitVisibilityBoolean ${locator}`);
-
- for (let i = 0; i < attempts; i++) {
- const isVisible: boolean = await this.isVisible(locator);
-
- if (isVisible) {
- return true;
- }
-
- await this.wait(polling);
- }
-
- return false;
- }
-
- public async waitDisappearanceBoolean(locator: By,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING): Promise {
-
- Logger.trace(`DriverHelper.waitDisappearanceBoolean ${locator}`);
-
- for (let i = 0; i < attempts; i++) {
- const isVisible: boolean = await this.isVisible(locator);
-
- if (!isVisible) {
- return true;
- }
-
- await this.wait(polling);
- }
-
- return false;
- }
-
- public async waitVisibility(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitVisibility ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.driver.wait(until.elementLocated(elementLocator), polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.waitVisibility - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- if (attempts !== 1) { // waitVisibility was spamming other methods when the number of attempts was 1 - only show message if attempts > 1
- Logger.trace(`DriverHelper.waitVisibility - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- }
- continue;
- }
-
- if (err instanceof error.NoSuchWindowError) { // sometimes waitVisibility fails with NoSuchWindowError when the check is run too soon before the page loads
- Logger.trace(`DriverHelper.waitVisibility - failed with NoSuchWindow exception. Attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.waitVisibility - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- const visibleWebElement = await this.driver.wait(until.elementIsVisible(element), polling);
- Logger.trace('DriverHelper.waitVisibility - Element is located and is visible.');
- return visibleWebElement;
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- if (attempts !== 1) { // waitVisibility was spamming other methods when the number of attempts was 1 - only show message if attempts > 1
- Logger.trace(`DriverHelper.waitVisibility - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- }
- continue;
- }
-
- if (err instanceof error.StaleElementReferenceError) {
- Logger.debug(`DriverHelper.waitVisibility - Stale element error - ${err}`);
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitVisibility - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum visibility checkings attempts for '${elementLocator}' element, timeouted after ${timeout}`);
- }
-
- public async waitPresence(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitPresence ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- try {
- const webElement: WebElement = await this.driver.wait(until.elementLocated(elementLocator), polling);
- return webElement;
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitPresence - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitPresence - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum presence checkings attempts, problems with 'StaleElementReferenceError' of '${elementLocator}' element`);
- }
-
- public async waitAllPresence(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise> {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitAllPresence ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- try {
- const webElements: Array = await this.driver.wait(until.elementsLocated(elementLocator), polling);
- return webElements;
- } catch (err) {
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitAllPresence - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAllPresence - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum presence checkings attempts, problems with 'StaleElementReferenceError' of '${elementLocator}' element`);
- }
-
- public async waitAllVisibility(locators: Array, timeout: number) {
- Logger.trace(`DriverHelper.waitAllVisibility ${locators}`);
-
- for (const elementLocator of locators) {
- await this.waitVisibility(elementLocator, timeout);
- }
- }
-
- public async waitDisappearance(elementLocator: By,
- attempts: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.trace(`DriverHelper.waitDisappearance ${elementLocator}`);
-
- const isDisappeared = await this.waitDisappearanceBoolean(elementLocator, attempts, polling);
-
- if (!isDisappeared) {
- throw new error.TimeoutError(`Waiting attempts exceeded, element '${elementLocator}' is still visible`);
- }
- }
-
- public async waitDisappearanceWithTimeout(elementLocator: By, timeout: number) {
- Logger.trace(`DriverHelper.waitDisappearanceWithTimeout ${elementLocator}`);
-
- await this.getDriver().wait(async () => {
- const isVisible: boolean = await this.isVisible(elementLocator);
-
- if (!isVisible) {
- return true;
- }
- }, timeout);
- }
-
- public async waitAllDisappearance(locators: Array,
- attemptsPerLocator: number = TestConstants.TS_SELENIUM_DEFAULT_ATTEMPTS,
- pollingPerLocator: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING) {
-
- Logger.trace(`DriverHelper.waitAllDisappearance ${locators}`);
-
- for (const elementLocator of locators) {
- await this.waitDisappearance(elementLocator, attemptsPerLocator, pollingPerLocator);
- }
- }
-
- public async waitAndClick(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitAndClick ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.waitAndClick - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitAndClick - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndClick - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await element.click();
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- Logger.debug(`DriverHelper.waitAndClik - ${elementLocator} - StaleElementReferenceError - ${err}`);
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndClick - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum clicking attempts, the '${elementLocator}' element is not clickable`);
-
- }
-
- public async waitAndGetElementAttribute(elementLocator: By, attribute: string,
- timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitAndGetElementAttribute ${elementLocator} attribute: '${attribute}'`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.waitAndGetElementAttribute - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitAndGetElementAttribute - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetElementAttribute - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- const attributeValue = await element.getAttribute(attribute);
- return attributeValue;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetElementAttribute - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum gettin of the '${attribute}' attribute attempts, from the '${elementLocator}' element`);
- }
-
- public async waitAndGetCssValue(elementLocator: By, cssAttribute: string,
- timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitAndGetCssValue ${elementLocator} cssAttribute: ${cssAttribute}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.waitAndGetCssValue - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitAndGetCssValue - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetCssValue - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- const cssAttributeValue = await element.getCssValue(cssAttribute);
- return cssAttributeValue;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetCssValue - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum gettin of the '${cssAttribute}' css attribute attempts, from the '${elementLocator}' element`);
- }
-
- public async waitAttributeValue(elementLocator: By,
- attribute: string,
- expectedValue: string,
- timeout: number) {
-
- Logger.trace(`DriverHelper.waitAttributeValue ${elementLocator}`);
-
- await this.driver.wait(async () => {
- const attributeValue: string = await this.waitAndGetElementAttribute(elementLocator, attribute, timeout);
-
- return expectedValue === attributeValue;
- },
- timeout,
- `The '${attribute}' attribute value doesn't match with expected value '${expectedValue}'`);
- }
-
- public async type(elementLocator: By, text: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.type ${elementLocator} text: ${text}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.type - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.type - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.type - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await element.sendKeys(text);
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.type - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum typing attempts, to the '${elementLocator}' element`);
- }
-
- public async typeToInvisible(elementLocator: By, text: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.typeToInvisible ${elementLocator} text: ${text}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitPresence(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.typeToInvisible - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.typeToInvisible - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.typeToInvisible - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await element.sendKeys(text);
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.typeToInvisible - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum typing attempts, to the '${elementLocator}' element`);
- }
-
- public async clear(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.clear ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.clear - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.clear - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.clear - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await element.clear();
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.clear - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum clearing attempts, to the '${elementLocator}' element`);
- }
-
- public async clearInvisible(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.clearInvisible ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitPresence(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.clearInvisible - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.clearInvisible - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.clearInvisible - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await element.clear();
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.clearInvisible - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum clearing attempts, to the '${elementLocator}' element`);
- }
-
- public async enterValue(elementLocator: By, text: string, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- Logger.trace(`DriverHelper.enterValue ${elementLocator} text: ${text}`);
-
- await this.waitVisibility(elementLocator, timeout);
- await this.clear(elementLocator);
- await this.waitAttributeValue(elementLocator, 'value', '', timeout);
- await this.type(elementLocator, text, timeout);
- await this.waitAttributeValue(elementLocator, 'value', text, timeout);
- }
-
- public async waitAndSwitchToFrame(iframeLocator: By, timeout: number) {
- Logger.trace(`DriverHelper.waitAndSwitchToFrame ${iframeLocator}`);
-
- await this.driver.wait(until.ableToSwitchToFrame(iframeLocator), timeout);
- }
-
- public async waitAndGetText(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.waitAndGetText ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitVisibility(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.waitAndGetText - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.waitAndGetText - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetText - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- const innerText: string = await element.getText();
- return innerText;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.waitAndGetText - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum text obtaining attempts, from the '${elementLocator}' element`);
- }
-
- public async waitAndGetValue(elementLocator: By, timeout: number): Promise {
- Logger.trace(`DriverHelper.waitAndGetValue ${elementLocator}`);
-
- const elementValue: string = await this.waitAndGetElementAttribute(elementLocator, 'value', timeout);
- return elementValue;
- }
-
- public async waitUntilTrue(callback: any, timeout: number) {
- Logger.trace('DriverHelper.waitUntilTrue');
-
- await this.driver.wait(callback, timeout);
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.refreshPage()
- */
- public async reloadPage() {
- Logger.debug('DriverHelper.reloadPage');
-
- await this.driver.navigate().refresh();
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.navigateAndWaitToUrl()
- */
- public async navigateAndWaitToUrl(url: string, timeout: number = TimeoutConstants.TS_SELENIUM_WAIT_FOR_URL) {
- Logger.trace(`DriverHelper.navigateAndWaitToUrl ${url}`);
-
- await this.navigateToUrl(url);
- await this.waitURL(url, timeout);
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.navigateTo()
- */
- public async navigateToUrl(url: string) {
- Logger.debug(`DriverHelper.navigateToUrl ${url}`);
-
- await this.driver.navigate().to(url);
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.waitURL()
- */
- public async waitURL(expectedUrl: string, timeout: number) {
- Logger.trace(`DriverHelper.waitURL ${expectedUrl}`);
-
- await this.getDriver().wait(async () => {
- const currentUrl: string = await this.getDriver().getCurrentUrl();
- const urlEquals: boolean = currentUrl === expectedUrl;
-
- if (urlEquals) {
- return true;
- }
- }, timeout);
- }
-
- public async scrollTo(elementLocator: By, timeout: number = TimeoutConstants.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM) {
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- const attempts: number = Math.ceil(timeout / polling);
-
- Logger.trace(`DriverHelper.scrollTo ${elementLocator}`);
-
- for (let i = 0; i < attempts; i++) {
- let element: WebElement;
- try {
- element = await this.waitPresence(elementLocator, polling);
- } catch (err) {
- if (i >= attempts) {
- Logger.error(`DriverHelper.scrollTo - failed with exception, out of attempts - ${err}`);
- throw err;
- }
-
- if (err instanceof error.TimeoutError) {
- Logger.trace(`DriverHelper.scrollTo - Polling timed out attempt #${(i + 1)}, retrying with ${polling}ms timeout`);
- continue;
- }
-
- Logger.error(`DriverHelper.scrollTo - failed with an unexpected exception - ${err}`);
- throw err;
- }
-
- try {
- await this.getAction().mouseMove(element).perform();
- return;
- } catch (err) {
- if (err instanceof error.StaleElementReferenceError) {
- await this.wait(polling);
- continue;
- }
-
- Logger.error(`DriverHelper.scrollTo - failed with an unexpected exception - ${err}`);
- throw err;
- }
- }
-
- throw new error.TimeoutError(`Exceeded maximum mouse move attempts, for the '${elementLocator}' element`);
- }
-
- /**
- * @deprecated Method deprecated. Use the next method instead.
- * @see BrowserTabsUtil.getCurrentUrl()
- */
- public async getCurrentUrl(): Promise {
- return await this.driver.getCurrentUrl();
- }
-
- getDriver(): ThenableWebDriver {
- Logger.trace('DriverHelper.getDriver');
-
- return this.driver;
- }
-
- public sleep(time: number) {
- this.driver.sleep(time);
- }
-}
diff --git a/tests/e2e/utils/Logger.ts b/tests/e2e/utils/Logger.ts
deleted file mode 100644
index 4da33f57c8..0000000000
--- a/tests/e2e/utils/Logger.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import { TestConstants } from '../TestConstants';
-
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-export abstract class Logger {
-
- /**
- * Uses for logging of fatal errors.
- * @param text log text
- */
- public static error(text: string, indentLevel: number = 1) {
- this.logText(indentLevel, `[ERROR] ${text}`);
- }
-
- /**
- * Uses for logging of recoverable errors and general warnings.
- * @param text log text
- */
- public static warn(text: string, indentLevel: number = 1) {
- if (TestConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR') {
- return;
- }
- this.logText(indentLevel, `[WARN] ${text}`);
- }
-
- /**
- * Uses for logging of the public methods of the pageobjects.
- * @param text log text
- */
- public static info(text: string, indentLevel: number = 3) {
- if (TestConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'WARN') {
- return;
- }
- this.logText(indentLevel, `• ${text}`);
- }
-
- /**
- * Uses for logging of the public methods of the pageobjects.
- * @param text log text
- */
- public static debug(text: string, indentLevel: number = 5) {
- if (TestConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'WARN' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'INFO') {
- return;
- }
- this.logText(indentLevel, `▼ ${text}`);
- }
-
- /**
- * Uses for logging of the public methods of the {@link DriverHelper} or
- * private methods inside of pageobjects.
- * @param text log text
- */
- public static trace(text: string, indentLevel: number = 6) {
- if (TestConstants.TS_SELENIUM_LOG_LEVEL === 'ERROR' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'WARN' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'INFO' ||
- TestConstants.TS_SELENIUM_LOG_LEVEL === 'DEBUG') {
- return;
- }
- this.logText(indentLevel, `‣ ${text}`);
- }
-
- private static logText(messageIndentationLevel: number, text: string) {
- // start group for every level
- for (let i = 0; i < messageIndentationLevel; i++) {
- console.group();
- }
- // print the trimmed text
- // if multiline, the message should be properly padded
- console.log(text);
- // end group for every level
- for (let i = 0; i < messageIndentationLevel; i++) {
- console.groupEnd();
- }
- }
-}
diff --git a/tests/e2e/utils/PreferencesHandler.ts b/tests/e2e/utils/PreferencesHandler.ts
deleted file mode 100644
index 9adc3a47c6..0000000000
--- a/tests/e2e/utils/PreferencesHandler.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { injectable, inject } from 'inversify';
-import { Logger } from './Logger';
-import { CLASSES } from '../inversify.types';
-import { CheApiRequestHandler } from './requestHandlers/CheApiRequestHandler';
-
-export enum TerminalRendererType {
- canvas = 'canvas',
- dom = 'dom'
-}
-
-export enum AskForConfirmationType {
- never = 'never',
- ifRquired = 'ifRequired',
- always = 'always'
-}
-
-@injectable()
-export class PreferencesHandler {
-
- constructor(@inject(CLASSES.CheApiRequestHandler) private readonly requestHandler: CheApiRequestHandler) {
- }
-
- /**
- * Works properly only if set before workspace startup.
- */
- public async setTerminalType(type: TerminalRendererType) {
- Logger.debug('PreferencesHandler.setTerminalToDom');
- await this.setPreference('terminal.integrated.rendererType', type);
- }
-
- /**
- *
- * @param askForConfirmation possible values are "never", "ifRequired" and "always"
- */
- public async setConfirmExit(askForConfirmation: AskForConfirmationType) {
- Logger.debug(`PreferencesHandler.setConfirmExit to ${askForConfirmation}`);
- await this.setPreference(`application.confirmExit`, askForConfirmation);
- }
-
- /**
- * Works properly only if set before workspace startup.
- */
- public async setUseGoLanaguageServer() {
- Logger.debug(`PreferencesHandler.setUseGoLanguageServer to true.`);
- await this.setPreference('go.useLanguageServer', 'true');
- }
-
- /**
- * Works properly only if set before workspace startup.
- */
- public async setVscodeKubernetesPluginConfig(vsKubernetesConfig: any) {
- Logger.debug(`PreferencesHandler.setVscodeKubernetesPluginConfig`);
- await this.setPreference('vs-kubernetes', vsKubernetesConfig);
- }
-
- public async setPreference(attribute: string, value: any) {
- Logger.trace(`PreferencesHandler.setPreferences ${attribute} to ${value}`);
- let response;
- try {
- response = await this.requestHandler.get('api/preferences');
- } catch (e) {
- Logger.error(`PreferencesHandler.setPreferences failed to get user preferences`);
- throw e;
- }
- let userPref = response.data;
- try {
- let theiaPref = JSON.parse(userPref['theia-user-preferences']);
- theiaPref[attribute] = value;
- userPref['theia-user-preferences'] = JSON.stringify(theiaPref);
- await this.requestHandler.post('api/preferences', userPref);
- } catch (e) {
- // setting terminal before running a workspace, so no theia preferences are set
- Logger.warn(`PreferencesHandler.setPreference could not set theia-user-preferences from api/preferences response, forcing manually.`);
- let theiaPref = `{ "${attribute}":"${value}" }`;
- userPref['theia-user-preferences'] = JSON.stringify(JSON.parse(theiaPref));
- try {
- await this.requestHandler.post('api/preferences', userPref);
- } catch (e) {
- Logger.error(`PreferencesHandler.setPreference failed to manually set preferences value.`);
- throw e;
- }
- }
- Logger.trace(`PreferencesHandler.setPreferences ${attribute} to ${value} done.`);
- }
-}
diff --git a/tests/e2e/utils/ScreenCatcher.ts b/tests/e2e/utils/ScreenCatcher.ts
deleted file mode 100644
index 9ff2d9909b..0000000000
--- a/tests/e2e/utils/ScreenCatcher.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import * as fs from 'fs';
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../inversify.types';
-import { DriverHelper } from './DriverHelper';
-import { TestConstants } from '..';
-
-@injectable()
-export class ScreenCatcher {
- constructor(@inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper) { }
-
- async catchMethodScreen(methodName: string, methodIndex: number, screenshotIndex: number) {
- const executionScreenCastDir = `${TestConstants.TS_SELENIUM_REPORT_FOLDER}/executionScreencast`;
- const executionScreenCastErrorsDir = `${TestConstants.TS_SELENIUM_REPORT_FOLDER}/executionScreencastErrors`;
- const formattedMethodIndex: string = new Intl.NumberFormat('en-us', { minimumIntegerDigits: 3 }).format(methodIndex);
- const formattedScreenshotIndex: string = new Intl.NumberFormat('en-us', { minimumIntegerDigits: 5 }).format(screenshotIndex).replace(/,/g, '');
-
- if (!fs.existsSync(TestConstants.TS_SELENIUM_REPORT_FOLDER)) {
- fs.mkdirSync(TestConstants.TS_SELENIUM_REPORT_FOLDER);
- }
-
- if (!fs.existsSync(executionScreenCastDir)) {
- fs.mkdirSync(executionScreenCastDir);
- }
-
- const date: Date = new Date();
- const timeStr: string = date.toLocaleTimeString('en-us', { hour12: false }) + '.' + new Intl.NumberFormat('en-us', { minimumIntegerDigits: 3 }).format(date.getMilliseconds());
-
- const screenshotPath: string = `${executionScreenCastDir}/${formattedMethodIndex}${formattedScreenshotIndex}--(${timeStr}): ${methodName}.png`;
-
- try {
- await this.catchScreen(screenshotPath);
- } catch (err) {
- if (!fs.existsSync(executionScreenCastErrorsDir)) {
- fs.mkdirSync(executionScreenCastErrorsDir);
- }
-
- let errorLogFilePath: string = screenshotPath.replace('.png', '.txt');
- errorLogFilePath = errorLogFilePath.replace(executionScreenCastDir, executionScreenCastErrorsDir);
- await this.writeErrorLog(errorLogFilePath, err);
- }
- }
-
- async catchScreen(screenshotPath: string) {
- const screenshot: string = await this.driverHelper.getDriver().takeScreenshot();
- const screenshotStream = fs.createWriteStream(screenshotPath);
- screenshotStream.write(Buffer.from(screenshot, 'base64'));
- screenshotStream.end();
- }
-
- async writeErrorLog(errorLogPath: string, err: Error) {
- console.log(`Failed to save screenshot, additional information in the ${errorLogPath}`);
-
- if (err.stack) {
- const screenshotStream = fs.createWriteStream(errorLogPath);
- screenshotStream.write(Buffer.from(err.stack, 'utf8'));
- screenshotStream.end();
- }
- }
-
-}
diff --git a/tests/e2e/utils/VCS/CheGitApi.ts b/tests/e2e/utils/VCS/CheGitApi.ts
deleted file mode 100644
index 854583e1ce..0000000000
--- a/tests/e2e/utils/VCS/CheGitApi.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { injectable, inject } from 'inversify';
-import { CLASSES } from '../../inversify.types';
-import { CheApiRequestHandler } from '../../utils/requestHandlers/CheApiRequestHandler';
-
-
-@injectable()
-export class CheGitApi {
- static readonly GIT_API_ENTRIPOINT_URL = 'api/ssh/vcs';
-
- constructor(@inject(CLASSES.CheApiRequestHandler) private readonly processRequestHandler: CheApiRequestHandler) { }
-
-
-
- public async getPublicSSHKey(): Promise {
-
- try {
- const responce = await this.processRequestHandler.get(CheGitApi.GIT_API_ENTRIPOINT_URL);
- return responce.data[0].publicKey;
- } catch (error) {
- console.error('Cannot get public ssh key with API \n' + error);
- throw error;
- }
-
- }
-
-}
diff --git a/tests/e2e/utils/VCS/github/GitHubUtil.ts b/tests/e2e/utils/VCS/github/GitHubUtil.ts
deleted file mode 100644
index 2bc7932f39..0000000000
--- a/tests/e2e/utils/VCS/github/GitHubUtil.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { injectable } from 'inversify';
-import axios from 'axios';
-
-@injectable()
-export class GitHubUtil {
- private static readonly GITHUB_API_ENTRIPOINT_URL = 'https://api.github.com/';
- /**
- * add public part of ssh key to the defied github account
- * @param authToken
- * @param title
- * @param key
- */
- async addPublicSshKeyToUserAccount(authToken: string, title: string, key: string) {
- const gitHubApiSshURL: string = GitHubUtil.GITHUB_API_ENTRIPOINT_URL + 'user/keys';
- const authHeader = { headers: { 'Authorization': 'token ' + authToken, 'Content-Type': 'application/json' } };
-
- const data = {
- title: `${title}`,
- key: `${key}`
- };
-
- try { await axios.post(gitHubApiSshURL, JSON.stringify(data), authHeader); } catch (error) {
- console.error('Cannot add the public key to the GitHub account: ');
- console.error(error);
- throw error;
- }
- }
-
- async getRawContentFromFile(pathToFile: string): Promise {
- const gitHubContentEntryPointUrl: string = 'https://raw.githubusercontent.com/';
- const pathToRawContent: string = `${gitHubContentEntryPointUrl}${pathToFile}`;
- const authorization: string = 'Authorization';
- const contentType: string = 'Content-Type';
-
- try {
- delete axios.defaults.headers.common[authorization];
- delete axios.defaults.headers.common[contentType];
- const response = await axios.get(`${gitHubContentEntryPointUrl}${pathToFile}`);
- return response.data;
- } catch (error) {
- console.error('Cannot get content form the raw github content: ' + pathToRawContent);
- console.error(error);
- throw error;
- }
- }
-
- async getPublicSshKeys(authToken: string): Promise> {
- const gitHubApiSshURL: string = GitHubUtil.GITHUB_API_ENTRIPOINT_URL + 'user/keys';
- const authHeader = { headers: { 'Authorization': 'token ' + authToken, 'Content-Type': 'application/json' } };
- try {
- const response = await axios.get(gitHubApiSshURL, authHeader);
- const stringified = JSON.stringify(response.data);
- const arrayOfWorkspaces = JSON.parse(stringified);
- const idOfRunningWorkspace: Array = new Array();
- for (let entry of arrayOfWorkspaces) {
- idOfRunningWorkspace.push(entry.id);
- }
- return idOfRunningWorkspace;
- } catch (error) {
- console.error('Cannot get public Keys from github: ' + gitHubApiSshURL);
- console.error(error);
- throw error;
- }
- }
-
- async removePublicSshKey(authToken: string, keyId: string) {
- const gitHubApiSshURL: string = GitHubUtil.GITHUB_API_ENTRIPOINT_URL + 'user/keys/' + keyId;
- const authHeader = { headers: { 'Authorization': 'token ' + authToken, 'Content-Type': 'application/json' } };
- try { await axios.delete(gitHubApiSshURL, authHeader); } catch (error) {
- console.error('Cannot delete the public key from the GitHub account: ');
- console.error(error);
- throw error;
- }
- }
-
-
- async removeAllPublicSshKeys(authToken: string) {
- try {
- const idList: string[] = await this.getPublicSshKeys(authToken);
- for (let id of idList) {
- this.removePublicSshKey(authToken, id);
- }
-
- } catch (error) {
- console.error('Cannot delete the public key from the GitHub account: ');
- console.error(error);
- throw error;
- }
- }
-
-}
diff --git a/tests/e2e/utils/WorkspaceNameHandler.ts b/tests/e2e/utils/WorkspaceNameHandler.ts
deleted file mode 100644
index dc0fed13d5..0000000000
--- a/tests/e2e/utils/WorkspaceNameHandler.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { DriverHelper } from './DriverHelper';
-import { e2eContainer } from '../inversify.config';
-import { CLASSES } from '../inversify.types';
-let driverHelper : DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
-
-export class WorkspaceNameHandler {
-
- public static generateWorkspaceName(prefix: string, randomLength: number): string {
- const possibleCharacters: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
- const possibleCharactersLength: number = possibleCharacters.length;
- let randomPart: string = '';
-
- for (let i = 0; i < randomLength; i++) {
- let currentRandomIndex: number = Math.floor(Math.random() * Math.floor(possibleCharactersLength));
-
- randomPart += possibleCharacters[currentRandomIndex];
- }
-
- return prefix + randomPart;
- }
-
- public static async getNameFromUrl() : Promise {
- let url : string = await driverHelper.getCurrentUrl();
- url = url.split('?')[0];
- let splittedUrl = url.split(`/`);
- let wsname : string = splittedUrl[splittedUrl.length - 1];
- return wsname;
- }
-
-}
diff --git a/tests/e2e/utils/requestHandlers/CheApiRequestHandler.ts b/tests/e2e/utils/requestHandlers/CheApiRequestHandler.ts
deleted file mode 100644
index 3da50057c7..0000000000
--- a/tests/e2e/utils/requestHandlers/CheApiRequestHandler.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import axios, { AxiosResponse, AxiosRequestConfig } from 'axios';
-import { TestConstants } from '../../TestConstants';
-import { TYPES } from '../../inversify.types';
-import { inject, injectable } from 'inversify';
-import { IAuthorizationHeaderHandler } from './headers/IAuthorizationHeaderHandler';
-
-@injectable()
-export class CheApiRequestHandler {
-
- /**
- * This method adds a request interceptor into axios request interceptors list and returns an ID of the interceptor
- */
- public static enableRequestInteceptor(): number {
- console.log(`CheApiRequestHandler.enableRequestInterceptor`);
- return axios.interceptors.request.use( request => {
- try {
- let request_censored: AxiosRequestConfig = JSON.parse(JSON.stringify(request));
- request_censored.headers.Authorization = 'CENSORED';
- console.log(`RequestHandler request:\n`, request_censored);
- } catch (err) {
- console.log(`RequestHandler request: Failed to deep clone AxiosRequestConfig:`, err);
- }
- return request;
- });
- }
-
- /**
- * This method adds a response interceptor into axios response interceptors list and returns an ID of the interceptor
- */
- public static enableResponseInterceptor(): number {
- console.log(`CheApiRequestHandler.enableResponseRedirects`);
- return axios.interceptors.response.use( response => {
- try {
- let response_censored: AxiosResponse = JSON.parse(JSON.stringify(response, (key, value) => {
- switch (key) {
- case 'request': return 'CENSORED';
- default: return value;
- }
- }));
- response_censored.config.headers.Authorization = 'CENSORED';
- if (response_censored.data.access_token != null) {
- response_censored.data.access_token = 'CENSORED';
- }
- if (response_censored.data.refresh_token != null) {
- response_censored.data.refresh_token = 'CENSORED';
- }
- console.log(`RequestHandler response:\n`, response_censored);
- } catch (err) {
- console.log(`RequestHandler response: Failed to deep clone AxiosResponse:`, err);
- }
- return response;
- });
- }
-
- constructor(@inject(TYPES.IAuthorizationHeaderHandler) private readonly headerHandler: IAuthorizationHeaderHandler) { }
-
- async get(relativeUrl: string): Promise {
- return await axios.get(this.assembleUrl(relativeUrl), await this.headerHandler.get());
- }
-
- async post(relativeUrl: string, data?: string | any ): Promise {
- return await axios.post(this.assembleUrl(relativeUrl), data, await this.headerHandler.get());
- }
-
- async delete(relativeUrl: string): Promise {
- return await axios.delete(this.assembleUrl(relativeUrl), await this.headerHandler.get());
- }
-
- private assembleUrl(relativeUrl: string): string {
- return `${TestConstants.TS_SELENIUM_BASE_URL}/${relativeUrl}`;
- }
-
-}
diff --git a/tests/e2e/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts b/tests/e2e/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts
deleted file mode 100644
index b7ecbba72a..0000000000
--- a/tests/e2e/utils/requestHandlers/headers/CheMultiuserAuthorizationHeaderHandler.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import { AxiosRequestConfig } from 'axios';
-
-import { TYPES } from '../../../inversify.types';
-import { IAuthorizationHeaderHandler } from './IAuthorizationHeaderHandler';
-import { injectable, inject } from 'inversify';
-import { ITokenHandler } from '../tokens/ITokenHandler';
-
-@injectable()
-export class CheMultiuserAuthorizationHeaderHandler implements IAuthorizationHeaderHandler {
-
- constructor(@inject(TYPES.ITokenHandler) private readonly tokenHandler: ITokenHandler) {
- }
-
- async get(): Promise {
- const token = await this.tokenHandler.get();
- return { headers: { 'Authorization': `Bearer ${token}` } };
- }
-}
diff --git a/tests/e2e/utils/requestHandlers/headers/IAuthorizationHeaderHandler.ts b/tests/e2e/utils/requestHandlers/headers/IAuthorizationHeaderHandler.ts
deleted file mode 100644
index 257f0ed060..0000000000
--- a/tests/e2e/utils/requestHandlers/headers/IAuthorizationHeaderHandler.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { AxiosRequestConfig } from 'axios';
-
-export interface IAuthorizationHeaderHandler {
- get(): Promise;
-}
diff --git a/tests/e2e/utils/requestHandlers/tokens/CheMultiuserTokenHandler.ts b/tests/e2e/utils/requestHandlers/tokens/CheMultiuserTokenHandler.ts
deleted file mode 100644
index 450c3bacff..0000000000
--- a/tests/e2e/utils/requestHandlers/tokens/CheMultiuserTokenHandler.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-import axios from 'axios';
-import querystring from 'querystring';
-import { injectable } from 'inversify';
-import { TestConstants } from '../../../TestConstants';
-import { ITokenHandler } from './ITokenHandler';
-
-@injectable()
-export class CheMultiuserTokenHandler implements ITokenHandler {
- async get(): Promise {
- let params = {};
-
- let keycloakUrl = this.handleTrailingSlash(TestConstants.TS_SELENIUM_BASE_URL);
- const keycloakAuthSuffix = 'auth/realms/che/protocol/openid-connect/token';
-
- if (TestConstants.TS_SELENIUM_SINGLE_HOST) {
- keycloakUrl = keycloakUrl + keycloakAuthSuffix;
- } else {
- keycloakUrl = keycloakUrl.replace('che', 'keycloak') + keycloakAuthSuffix;
- }
-
- params = {
- client_id: 'che-public',
- username: TestConstants.TS_SELENIUM_USERNAME,
- password: TestConstants.TS_SELENIUM_PASSWORD,
- grant_type: 'password'
- };
-
- try {
- const responseToObtainBearerToken = await axios.post(keycloakUrl, querystring.stringify(params));
- return responseToObtainBearerToken.data.access_token;
- } catch (err) {
- console.log(`Can not get bearer token. URL used: ${keycloakUrl}`);
- throw err;
- }
-
- }
-
- /**
- * Append `/` if it's not in the URL yet. Keycloak doesn't handle double `//` in URL well.
- *
- * @param keycloakUrl
- */
- private handleTrailingSlash(keycloakUrl: string) {
- if (!(new RegExp('/$').test(keycloakUrl))) {
- keycloakUrl += '/';
- }
- return keycloakUrl;
- }
-}
diff --git a/tests/e2e/utils/requestHandlers/tokens/ITokenHandler.ts b/tests/e2e/utils/requestHandlers/tokens/ITokenHandler.ts
deleted file mode 100644
index 5c9dc5e8b9..0000000000
--- a/tests/e2e/utils/requestHandlers/tokens/ITokenHandler.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-
-export interface ITokenHandler {
- get(): Promise;
-}
diff --git a/tests/e2e/utils/workspace/ITestWorkspaceUtil.ts b/tests/e2e/utils/workspace/ITestWorkspaceUtil.ts
deleted file mode 100644
index 2216a331c8..0000000000
--- a/tests/e2e/utils/workspace/ITestWorkspaceUtil.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { WorkspaceStatus } from './WorkspaceStatus';
-import { che } from '@eclipse-che/api';
-
-export interface ITestWorkspaceUtil {
- cleanUpAllWorkspaces() : void;
- waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus) : void;
- waitPluginAdding(namespace: string, workspaceName: string, pluginId: string) : void;
- removeWorkspaceById(id: string) : void;
- stopWorkspaceById(id: string) : void;
- getIdOfRunningWorkspace(namespace: string): Promise;
- getIdOfRunningWorkspaces(): Promise>;
- createWsFromDevFile(customTemplate: che.workspace.devfile.Devfile): void;
- getBaseDevfile(): Promise;
- startWorkspace(workspaceId: string): void;
-}
diff --git a/tests/e2e/utils/workspace/TestWorkspaceUtil.ts b/tests/e2e/utils/workspace/TestWorkspaceUtil.ts
deleted file mode 100644
index bb706c8fd4..0000000000
--- a/tests/e2e/utils/workspace/TestWorkspaceUtil.ts
+++ /dev/null
@@ -1,245 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
-import { che } from '@eclipse-che/api';
-import { TestConstants } from '../../TestConstants';
-import { injectable, inject } from 'inversify';
-import { DriverHelper } from '../DriverHelper';
-import 'reflect-metadata';
-import { WorkspaceStatus } from './WorkspaceStatus';
-import { ITestWorkspaceUtil } from './ITestWorkspaceUtil';
-import { error } from 'selenium-webdriver';
-import { CheApiRequestHandler } from '../requestHandlers/CheApiRequestHandler';
-import { CLASSES } from '../../inversify.types';
-import { Logger } from '../Logger';
-
-@injectable()
-export class TestWorkspaceUtil implements ITestWorkspaceUtil {
-
- static readonly WORKSPACE_API_URL: string = 'api/workspace';
-
- constructor(
- @inject(CLASSES.DriverHelper) private readonly driverHelper: DriverHelper,
- @inject(CLASSES.CheApiRequestHandler) private readonly processRequestHandler: CheApiRequestHandler
- ) { }
-
- public async waitWorkspaceStatus(namespace: string, workspaceName: string, expectedWorkspaceStatus: WorkspaceStatus) {
- Logger.debug('TestWorkspaceUtil.waitWorkspaceStatus');
-
- const workspaceStatusApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${namespace}:${workspaceName}`;
- const attempts: number = TestConstants.TS_SELENIUM_WORKSPACE_STATUS_ATTEMPTS;
- const polling: number = TestConstants.TS_SELENIUM_WORKSPACE_STATUS_POLLING;
- let workspaceStatus: string = '';
-
- for (let i = 0; i < attempts; i++) {
- const response = await this.processRequestHandler.get(workspaceStatusApiUrl);
-
- if (response.status !== 200) {
- await this.driverHelper.wait(polling);
- continue;
- }
-
- workspaceStatus = await response.data.status;
-
- if (workspaceStatus === expectedWorkspaceStatus) {
- return;
- }
-
- await this.driverHelper.wait(polling);
- }
-
- throw new error.TimeoutError(`Exceeded the maximum number of checking attempts, workspace status is: '${workspaceStatus}' different to '${expectedWorkspaceStatus}'`);
- }
-
- public async waitPluginAdding(namespace: string, workspaceName: string, pluginName: string) {
- Logger.debug('TestWorkspaceUtil.waitPluginAdding');
-
- const workspaceStatusApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${namespace}:${workspaceName}`;
- const attempts: number = TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS;
- const polling: number = TestConstants.TS_SELENIUM_DEFAULT_POLLING;
-
- for (let i = 0; i < attempts; i++) {
- const response = await this.processRequestHandler.get(workspaceStatusApiUrl);
-
- if (response.status !== 200) {
- await this.driverHelper.wait(polling);
- continue;
- }
-
- const machines: string = JSON.stringify(response.data.runtime.machines);
- const isPluginPresent: boolean = machines.search(pluginName) > 0;
-
- if (isPluginPresent) {
- break;
- }
-
- if (i === attempts - 1) {
- throw new error.TimeoutError(`Exceeded maximum tries attempts, the '${pluginName}' plugin is not present in the workspace runtime.`);
- }
-
- await this.driverHelper.wait(polling);
- }
- }
-
- public async getListOfWorkspaceId(): Promise {
- Logger.debug('TestWorkspaceUtil.getListOfWorkspaceId');
-
- const getAllWorkspacesResponse = await this.processRequestHandler.get(TestWorkspaceUtil.WORKSPACE_API_URL);
-
- interface IMyObj {
- id: string;
- status: string;
- }
-
- let stringified = JSON.stringify(getAllWorkspacesResponse.data);
- let arrayOfWorkspaces = JSON.parse(stringified);
- let wsList: Array = [];
-
- for (let entry of arrayOfWorkspaces) {
- wsList.push(entry.id);
- }
-
- return wsList;
- }
-
- public async getIdOfRunningWorkspace(wsName: string): Promise {
- Logger.debug('TestWorkspaceUtil.getIdOfRunningWorkspace');
-
- const getWorkspacesByNameResponse = await this.processRequestHandler.get(`${TestWorkspaceUtil.WORKSPACE_API_URL}/:${wsName}`);
- return getWorkspacesByNameResponse.data.id;
-
- }
-
- public async getIdOfRunningWorkspaces(): Promise> {
- Logger.debug('TestWorkspaceUtil.getIdOfRunningWorkspaces');
-
- try {
- const getAllWorkspacesResponse = await this.processRequestHandler.get(TestWorkspaceUtil.WORKSPACE_API_URL);
-
- interface IMyObj {
- id: string;
- status: string;
- }
- let stringified = JSON.stringify(getAllWorkspacesResponse.data);
- let arrayOfWorkspaces = JSON.parse(stringified);
- let idOfRunningWorkspace: Array = new Array();
-
- for (let entry of arrayOfWorkspaces) {
- if (entry.status === 'RUNNING') {
- idOfRunningWorkspace.push(entry.id);
- }
- }
-
- return idOfRunningWorkspace;
- } catch (err) {
- console.log(`Getting id of running workspaces failed. URL used: ${TestWorkspaceUtil.WORKSPACE_API_URL}`);
- throw err;
- }
- }
-
- public async removeWorkspaceById(id: string) {
- Logger.debug('TestWorkspaceUtil.removeWorkspaceById');
-
- const workspaceIdUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${id}`;
- try {
- const deleteWorkspaceResponse = await this.processRequestHandler.delete(workspaceIdUrl);
- // response code 204: "No Content" expected
- if (deleteWorkspaceResponse.status !== 204) {
- throw new Error(`Can not remove workspace. Code: ${deleteWorkspaceResponse.status} Data: ${deleteWorkspaceResponse.data}`);
- }
- } catch (err) {
- console.log(`Removing of workspace failed.`);
- throw err;
- }
- }
-
- public async stopWorkspaceById(id: string) {
- Logger.debug('TestWorkspaceUtil.stopWorkspaceById');
-
- const stopWorkspaceApiUrl: string = `${TestWorkspaceUtil.WORKSPACE_API_URL}/${id}`;
-
- try {
- const stopWorkspaceResponse = await this.processRequestHandler.delete(`${stopWorkspaceApiUrl}/runtime`);
- // response code 204: "No Content" expected
- if (stopWorkspaceResponse.status !== 204) {
- throw new Error(`Can not stop workspace. Code: ${stopWorkspaceResponse.status} Data: ${stopWorkspaceResponse.data}`);
- }
- let stopped: boolean = false;
- let wsStatus = await this.processRequestHandler.get(stopWorkspaceApiUrl);
- for (let i = 0; i < TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS; i++) {
- wsStatus = await this.processRequestHandler.get(stopWorkspaceApiUrl);
- if (wsStatus.data.status === 'STOPPED') {
- stopped = true;
- break;
- }
- await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
- }
- if (!stopped) {
- let waitTime = TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS * TestConstants.TS_SELENIUM_DEFAULT_POLLING;
- throw new error.TimeoutError(`The workspace was not stopped in ${waitTime} ms. Currnet status is: ${wsStatus.data.status}`);
- }
- } catch (err) {
- console.log(`Stopping workspace failed. URL used: ${stopWorkspaceApiUrl}`);
- throw err;
- }
- }
-
- public async cleanUpAllWorkspaces() {
- Logger.debug('TestWorkspaceUtil.cleanUpAllWorkspaces');
-
- let listOfRunningWorkspaces: Array = await this.getIdOfRunningWorkspaces();
- for (const entry of listOfRunningWorkspaces) {
- await this.stopWorkspaceById(entry);
- }
-
- let listAllWorkspaces: Array = await this.getListOfWorkspaceId();
-
- for (const entry of listAllWorkspaces) {
- await this.removeWorkspaceById(entry);
- }
-
- }
-
- async createWsFromDevFile(customTemplate: che.workspace.devfile.Devfile) {
- Logger.debug('TestWorkspaceUtil.createWsFromDevFile');
-
- try {
- await this.processRequestHandler.post(TestWorkspaceUtil.WORKSPACE_API_URL + '/devfile', customTemplate);
- } catch (error) {
- console.error(error);
- throw error;
- }
- }
-
- async getBaseDevfile(): Promise {
- Logger.debug('TestWorkspaceUtil.getBaseDevfile');
-
- const baseDevfile: che.workspace.devfile.Devfile = {
- apiVersion: '1.0.0',
- metadata: {
- name: 'test-workspace'
- }
- };
-
- return baseDevfile;
- }
-
- async startWorkspace(workspaceId: string) {
- Logger.debug('TestWorkspaceUtil.startWorkspace');
-
- try {
- await this.processRequestHandler.post(`${TestWorkspaceUtil.WORKSPACE_API_URL}/${workspaceId}/runtime`);
- } catch (error) {
- console.error(error);
- throw error;
- }
- }
-
-}
diff --git a/tests/e2e/utils/workspace/WorkspaceStatus.ts b/tests/e2e/utils/workspace/WorkspaceStatus.ts
deleted file mode 100644
index 3505b40ca0..0000000000
--- a/tests/e2e/utils/workspace/WorkspaceStatus.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2019 Red Hat, Inc.
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- **********************************************************************/
-
- export enum WorkspaceStatus {
- RUNNING = 'RUNNING',
- STOPPED = 'STOPPED',
- STARTING = 'STARTING'
-}
diff --git a/tests/performance/README.md b/tests/performance/README.md
deleted file mode 100644
index 4bb696c2a5..0000000000
--- a/tests/performance/README.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# Load tests
-
-Load tests should test the behaviour of server when users will start workspace at once.
-
-## Prereqiusites
-Test itself is just creating a load so there are some steps that need to be done before running load tests.
-What do you need to run those tests
-- `oc` client, `jq` and `tar` installed
-- cluster with running Che/CRW
-- cluster where load tests pods will be executed (can be the same cluster where Che/CRW is deployed)
-- users created on a Che/CRW (see 'How to create users' below)
-
-### How to crate users
-Users can be craeted manually, but there is a script `create_users.sh` to create users automatically.
-#### Creating users via script
-Log in via oc to the server and namespace, where the Che/CRW is running.
-Type `create_users.s -h` to see how to run the script. The script will generate users based on `base part of username` and will add an increment to that.
-```
--n base part of username (e.g. 'user')
--p common password
--s starting index of a users (generated name will look like e.g. 'user1')
--c number of users that should be created
--e tested environment - can be Che or CRW
-```
-Examples:
-The Che is running without any users created yet. 5 users can be created here by this command:
-```
-./create_users.sh -n user -p pass123 -c 5 -e Che -s 1
-```
-
-There are 5 users created `user1`, `user2`, `user3`, `user4`, `user5`. All users have common password `pass123`.
-Now 5 usres exist and can be used for load tests. Let's add anoter 10!
-```
-./create_users.sh -n user -p pass123 -c 10 -e Che -s 6
-```
-New users `user6`, `user7`, ..., `user25` are created.
-
-## Running load tests
-The command `./load-tests.sh -h` can be executed to give a help with setting up all required parameters.
-
-### Setting up users
-There are two ways how to tell the load tests which users to use. Users can be written in .csv file in format `user,password`. Use `-c .csv` to use all users in your file.
-The second way is usable when username are composed in format ``. To use that approach set those parameters:
-```
--u base username
--p common password
--n number of users
-```
-Please note that currently it is not possible to start from another index then 1.
-
-Example:
-Let's consider Che with 15 users created in format `user1`, `user2`, etc. and with password `pass123`. Then the setting of those values would be: `-u user -p pass123 -n 15`.
-
-**Additional parameters**
-There is non mandatory parameter that can be used:
-`-t` defines how many workspaces will user create in a row. Default value is one. That basicly means that whole test flow will be run again - so only one workspace will run at one time.
-
-### Other parameters
-`-i` sets the image that include test. This image is used as a base image for a pods where test runs.
-`-r` Che/CRW url where user can log in.
-`-f` full path to folder where logs and reports should be saved
-
-## Results and logs
-Once tests are done, logs and reports are copied from the pods to the local folder specified by `-f` flag. The structure looks like this:
-
-
-
-Each time the test is run, new folder with timestamp as its name is created. All files are saved in this folder.
-
-## User folder
-Each user has own folder with logs which is named in a way `-`. The timestamp is a time when this particular user test was started. If tests succeed, there are console-log.txt and load-test-folder in user folder. In load-test-folder there is just one file load-test-results.txt with test names and time taken by those tests.
-If tests fail, there is also another folder called report. There are screenshots and logs from the failed test so it should be easier to understand what happened.
-
-
-
-## Pod conole log files
-For each running pod there are logs gathered in a file `pod--console-logs.txt`. Please note that if you set `-t` larger then 1, this pod console log contains logs only from the last run.
-
diff --git a/tests/performance/create_users.sh b/tests/performance/create_users.sh
deleted file mode 100755
index 846bcc4a09..0000000000
--- a/tests/performance/create_users.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-oc whoami 1>/dev/null
-if [ $? -gt 0 ] ; then
- echo "ERROR: You are not logged! Please login to oc before running this script again."
- exit 1
-fi
-
-echo "You are logged in OC: $(oc whoami -c )"
-
-function printHelp {
- echo "$(basename "$0") [-n ] [-m ] [-s ] [-c ] [-e ] [-n ] [-p ] [-r ] [-f ] [-t ]"
- echo -e "\n${NC}Script for running load tests against Che 7."
- echo -e "${GREEN}where:${WHITE}"
- echo -e "-u base username"
- echo -e "-p common password"
- echo -e "-n number of users ${NC} usernames will be set in format 1, 2, ..."${WHITE}
- echo -e "-i image with test"
- echo -e "-r URL of Che"
- echo -e "-f full path to folder ${NC} all reports will be saved in this folder"${WHITE}
- echo -e "-c credential file ${NC} with usernames and passwords in *.csv format: \`user,pass\`"${WHITE}
- echo -e "-t count on how many times one user should run a workspace"
- echo -e "-l log level for test [ 'INFO' (default), 'DEBUG', 'TRACE' ]"
- echo -e "-s setting of CRW [ 'oauth' (default), 'no-oauth'] "
- echo -e "-v cluster URL to obtain OC user token"
- echo -e "-w test suite ${NC} default to load-test"${NC}
-}
-
-oc whoami 1>/dev/null
-if [ $? -gt 0 ] ; then
- echo "ERROR: You are not logged! Please login to oc before running this script again."
- exit 1
-fi
-
-echo "You are logged in OC: $(oc whoami -c)"
-while getopts "c:f:hi:l:n:p:r:t:u:s:v:w:" opt; do
- case $opt in
- h) printHelp
- exit 0
- ;;
- c) export CRED_FILE=$OPTARG
- ;;
- f) export FOLDER=$OPTARG
- ;;
- i) export TEST_IMAGE=$OPTARG
- ;;
- l) export LOG_LEVEL=$OPTARG
- ;;
- n) export USER_COUNT=$OPTARG
- ;;
- p) export PASSWORD=$OPTARG
- ;;
- r) export URL=$OPTARG
- ;;
- s) export SERVER_SETTING=$OPTARG
- ;;
- t) export COMPLETITIONS_COUNT=$OPTARG
- ;;
- u) export USERNAME=$OPTARG
- ;;
- v) export cheClusterUrl=$OPTARG
- ;;
- w) export TEST_SUITE=$OPTARG
- ;;
- \?) # invalid option
- exit 1
- ;;
- :)
- echo "Option \"$opt\" needs an argument."
- exit 1
- ;;
- esac
-done
-
-function exists {
- resource=$1
- name=$2
- if ( oc get $1 $2 > /dev/null 2>&1 ); then
- return 0
- else
- return 1
- fi
-}
-
-# check that all parameters are set
-if [ -z $CRED_FILE ]; then
- if [ -z $USERNAME ] || [ -z $PASSWORD ] || [ -z $USER_COUNT ]; then
- echo "ERROR: No credentials given! You need to set username, password and user count or set credentials file."
- printHelp
- exit 1
- fi
-fi
-
-if [ -z $URL ] || [ -z $FOLDER ] || [ -z $TEST_IMAGE ]; then
- echo "Some parameters are not set! Exitting load tests."
- printHelp
- exit 1
-else
- echo "Running load tests, result will be stored in $FOLDER in $TIMESTAMP subfolder."
-fi
-
-if [ -z $COMPLETITIONS_COUNT ]; then
- echo "Parameter -t wasn't set, setting completitions count to 1."
- COMPLETITIONS_COUNT=1
-fi
-
-# ----------- PREPARE ENVIRONMENT ----------- #
-echo "-- Preparing environment."
-# create pvc
-clean_pvc=false
-if ( exists pvc load-test-pvc ); then
- echo "PVC load-test-pvc already exists. Reusing and cleaning PVC."
- clean_pvc=true
-else
- oc create -f pvc.yaml
-fi
-
-# create ftp server
-if ( exists pod ftp-server ); then
- echo "Pod ftp-server already exists. Skipping creation."
-else
- oc create -f ftp-server.yaml
-fi
-
-# create service
-if ( exists service load-tests-ftp-service ); then
- echo "Service load-tests-ftp-service already exists. Skipping creation."
-else
- oc create -f ftp-service.yaml
-fi
-
-# load users if credential file was provided
-if [ ! -z $CRED_FILE ]; then
- cred_file_size=$(wc -l $CRED_FILE)
-fi
-
-# wait for ftp-server to be running
-echo "wait for ftp server to be running"
-status=$(oc get pod ftp-server | awk '{print $3}' | tail -n 1)
-while [[ $status != "Running" ]]
-do
- echo "ftp-server is not running, sleep 1 sec and re-check"
- sleep 5
- status=$(oc get pod ftp-server | awk '{print $3}' | tail -n 1)
-done
-echo "ftp-server pod is running"
-
-# clean pvc
-if [[ $clean_pvc == true ]]; then
- oc exec ftp-server -- rm -rf /home/vsftpd/user/*
-fi
-
-# setup and run vsftpd in ftp-server pod
-oc exec ftp-server -- sed -i 's/connect_from_port_20/#connect_from_port_20/' /etc/vsftpd/vsftpd.conf
-oc exec ftp-server -- sed -i 's/ftp_data_port/#ftp_data_port/' /etc/vsftpd/vsftpd.conf
-oc exec ftp-server -- sh /usr/sbin/run-vsftpd.sh &
-
-# set common variables to template.yaml
-if [ $SERVER_SETTING == "oauth" ]; then
- pod_spec="pod-oauth.yaml"
-elif [ $SERVER_SETTING == "no-oauth" ]; then
- pod_spec="pod.yaml"
-fi
-
-echo "set common variables to template.yaml"
-cp $pod_spec template.yaml
-parsed_url=$(echo $URL | sed 's/\//\\\//g')
-parsed_image=$(echo $TEST_IMAGE | sed 's/\//\\\//g')
-
-sed -i "s/REPLACE_COMPLETITIONS/$COMPLETITIONS_COUNT/g" template.yaml
-sed -i "s/REPLACE_URL/\"$parsed_url\"/g" template.yaml
-sed -i "s/REPLACE_TIMESTAMP/\"$TIMESTAMP\"/g" template.yaml
-sed -i "s/REPLACE_IMAGE/\"$parsed_image\"/g" template.yaml
-sed -i "s/REPLACE_LOG_LEVEL/$LOG_LEVEL/g" template.yaml
-if [ $TEST_SUITE == "load-test" ]; then
- sed -i_.bak '/USERSTORY/d' template.yaml
- sed -i "s/REPLACE_TEST_SUITE/$TEST_SUITE/g" template.yaml
- sed -i "s/MEMORY_REQUEST/\"900Mi\"/g" template.yaml
- sed -i "s/MEMORY_LIMIT/\"900Mi\"/g" template.yaml
-else
- sed -i_.bak '/TEST_SUITE/d' template.yaml
- sed -i "s/REPLACE_USERSTORY/$TEST_SUITE/g" template.yaml
- sed -i "s/MEMORY_REQUEST/\"1Gi\"/g" template.yaml
- sed -i "s/MEMORY_LIMIT/\"1Gi\"/g" template.yaml
-fi
-
-# ----------- RUNNING TEST ----------- #
-echo "-- Running pods with tests."
-echo "Searching for already created jobs..."
-jobs=$(oc get jobs -l group=load-tests)
-if [[ ! -z $jobs ]]; then
- echo "[WARNING] There are some jobs already running. Removing all jobs with label \"load-tests\" and creating new ones."
- oc delete jobs -l group=load-tests
- oc delete pods -l group=load-tests
-fi
-
-# set variables specific for each pod and create pods
-users_assigned=0
-executor_context=$(oc whoami -c)
-if [ ! -z $USER_COUNT ]; then
- while [ $users_assigned -lt $USER_COUNT ]
- do
- users_assigned=$((users_assigned+1))
- cp template.yaml final.yaml
- sed -i "s/REPLACE_NAME/load-test-$users_assigned/g" final.yaml
- sed -i "s/REPLACE_USERNAME/$USERNAME$users_assigned/g" final.yaml
- sed -i "s/REPLACE_PASSWORD/$PASSWORD/g" final.yaml
- echo "Getting OC token for this cluster url: ${cheClusterUrl}"
- oc login ${cheClusterUrl} -u $USERNAME$users_assigned -p $PASSWORD
- oc_token=$(oc whoami -t)
- sed -i "s/REPLACE_TOKEN/$oc_token/g" final.yaml
- oc config use-context $executor_context
- oc create -f final.yaml
- done
-fi
-if [ ! -z $CRED_FILE ]; then
- oldifs=$IFS
- while IFS=, read -r cred_file_username cred_file_pass
- do
- users_assigned=$((users_assigned+1))
- cp template.yaml final.yaml
- sed -i "s/REPLACE_NAME/load-test-$users_assigned/g" final.yaml
- sed -i "s/REPLACE_USERNAME/$cred_file_username/g" final.yaml
- sed -i "s/REPLACE_PASSWORD/$cred_file_pass/g" final.yaml
- oc create -f final.yaml
- done < $CRED_FILE
- IFS=$oldifs
-fi
-
-echo "-- Waiting for all pods to be completed."
-
-#waiting for jobs to be completed
-all_completed=false
-while [ $all_completed == false ]
-do
- sleep 20
- all_completed=true
- for job_name in $(oc get jobs -o name )
- do
- if [ $(oc get $job_name -o json | jq .status.completionTime) == null ]; then
- echo "Some jobs are still not completed. Waiting for 20 seconds."
- all_completed=false
- break
- fi
- done
-done
-
-echo "All jobs are completed!"
-
-statuses=""
-for p in $(oc get pods -l group=load-tests -o name)
-do
- status=$(oc get $p | awk '{print $3}' | tail -n 1)
- statuses="$statuses $status"
-done
-echo "Pods ended with those statuses: $statuses"
-
-# ----------- GATHERING LOGS ----------- #
-echo "-- Gathering logs."
-
-echo "Syncing files from PVC to local folder."
-mkdir $FOLDER/$TIMESTAMP
-cd $FOLDER/$TIMESTAMP
-oc rsync --no-perms ftp-server:/home/vsftpd/user/ $FOLDER/$TIMESTAMP
-echo "Tar files rsynced, untarring..."
-for filename in *.tar; do
- tar xf $filename;
-done
-rm ./*.tar
-cd ..
-set +x
-
-# ----------- CLEANING ENVIRONMENT ----------- #
-echo "-- Cleaning environment."
-
-oc delete jobs -l group=load-tests
-oc delete pods -l group=load-tests
-
-oc delete pod ftp-server
-oc delete service load-tests-ftp-service
-oc delete pvc load-test-pvc
-
-# ----------- PROCESSING TEST RESULTS ----------- #
-$TEST_FOLDER/process-logs.sh -t $TIMESTAMP -f $FOLDER -u $users_assigned -c $COMPLETITIONS_COUNT
diff --git a/tests/performance/pod-oauth.yaml b/tests/performance/pod-oauth.yaml
deleted file mode 100644
index 64a93c7276..0000000000
--- a/tests/performance/pod-oauth.yaml
+++ /dev/null
@@ -1,78 +0,0 @@
-apiVersion: batch/v1
-kind: Job
-metadata:
- labels:
- group: load-tests
- name: REPLACE_NAME
-spec:
- completions: REPLACE_COMPLETITIONS
- backoffLimit: 0
- template:
- metadata:
- name: load-tests-template
- labels:
- group: load-tests
- spec:
- containers:
- - env:
- - name: TS_SELENIUM_BASE_URL
- value: REPLACE_URL
- - name: TEST_SUITE
- value: REPLACE_TEST_SUITE
- - name: USERSTORY
- value: REPLACE_USERSTORY
- - name: TIMESTAMP
- value: REPLACE_TIMESTAMP
- - name: TS_SELENIUM_MULTIUSER
- value: "true"
- - name: TS_SELENIUM_LOAD_PAGE_TIMEOUT
- value: "180000"
- - name: TS_SELENIUM_START_WORKSPACE_TIMEOUT
- value: "180000"
- - name: TS_SELENIUM_LOG_LEVEL
- value: "REPLACE_LOG_LEVEL"
- - name: TS_IDE_LOAD_TIMEOUT
- value: "180000"
- - name: NODE_TLS_REJECT_UNAUTHORIZED
- value: "0"
- - name: TS_SELENIUM_VALUE_OPENSHIFT_OAUTH
- value: "true"
- - name: TS_OCP_LOGIN_PAGE_PROVIDER_TITLE
- value: "crw-qe-htpasswd-provider"
- - name: TS_SELENIUM_OCP_USERNAME
- value: REPLACE_USERNAME
- - name: TS_SELENIUM_USERNAME
- value: REPLACE_USERNAME
- - name: TS_SELENIUM_OCP_PASSWORD
- value: REPLACE_PASSWORD
- - name: TS_SELENIUM_PASSWORD
- value: REPLACE_PASSWORD
- - name: E2E_OPENSHIFT_TOKEN
- value: REPLACE_TOKEN
- - name: E2E_OCP_CLUSTER_VERSION
- value: "4.x"
- - name: TS_SELENIUM_VALUE_TLS_SUPPORT
- value: "true"
- - name: TS_SELENIUM_W3C_CHROME_OPTION
- value: "true"
- - name: VIDEO_RECORDING
- value: "false"
- - name: TS_SELENIUM_HEADLESS
- value: "false"
- - name: TS_SELENIUM_DEFAULT_TIMEOUT
- value: "1000000"
- - name: TS_SELENIUM_WORKSPACE_STATUS_POLLING
- value: "500000"
- - name: TS_LOAD_TESTS
- value: "true"
- image: REPLACE_IMAGE
- imagePullPolicy: Always
- name: load-testing-container
- resources:
- requests:
- memory: MEMORY_REQUEST
- cpu: "250m"
- limits:
- memory: MEMORY_LIMIT
- cpu: "700m"
- restartPolicy: Never
diff --git a/tests/performance/pod.yaml b/tests/performance/pod.yaml
deleted file mode 100644
index e7608f342b..0000000000
--- a/tests/performance/pod.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
-apiVersion: batch/v1
-kind: Job
-metadata:
- labels:
- group: load-tests
- name: REPLACE_NAME
-spec:
- completions: REPLACE_COMPLETITIONS
- backoffLimit: 0
- template:
- metadata:
- name: load-tests-template
- labels:
- group: load-tests
- spec:
- containers:
- - env:
- - name: TS_SELENIUM_BASE_URL
- value: REPLACE_URL
- - name: TS_SELENIUM_USERNAME
- value: REPLACE_USERNAME
- - name: TS_SELENIUM_PASSWORD
- value: REPLACE_PASSWORD
- - name: TEST_SUITE
- value: load-test
- - name: TIMESTAMP
- value: REPLACE_TIMESTAMP
- - name: TS_SELENIUM_MULTIUSER
- value: "true"
- - name: TS_SELENIUM_LOAD_PAGE_TIMEOUT
- value: "60000"
- - name: TS_SELENIUM_START_WORKSPACE_TIMEOUT
- value: "180000"
- - name: TS_SELENIUM_LOG_LEVEL
- value: "REPLACE_LOG_LEVEL"
- - name: NODE_TLS_REJECT_UNAUTHORIZED
- value: "0"
- - name: VIDEO_RECORDING
- value: "false"
- image: REPLACE_IMAGE
- imagePullPolicy: Always
- name: load-testing-container
- resources:
- requests:
- memory: "900Mi"
- cpu: "250m"
- limits:
- memory: "900Mi"
- cpu: "700m"
- restartPolicy: Never
diff --git a/tests/performance/process-logs.sh b/tests/performance/process-logs.sh
deleted file mode 100755
index c826f08fdf..0000000000
--- a/tests/performance/process-logs.sh
+++ /dev/null
@@ -1,130 +0,0 @@
-# --- PROCESSING LOGS FROM LOAD_TESTS ---
-
-function printHelp {
- echo "Script for processing logs of laod tests."
- echo "-f folder where logs are stored"
- echo "-t timestamp of the run"
- echo "-c completitions count"
- echo "-u users count"
-}
-
-while getopts "f:t:c:u:h" opt; do
- case $opt in
- h) printHelp
- ;;
- f) export FOLDER=$OPTARG
- ;;
- t) export TIMESTAMP=$OPTARG
- ;;
- c) export COMPLETITIONS_COUNT=$OPTARG
- ;;
- u) export USERS_COUNT=$OPTARG
- ;;
- \?) # invalid option
- exit 1
- ;;
- :)
- echo "Option \"$opt\" needs an argument."
- exit 1
- ;;
- esac
-done
-
-TEST_COUNT=$((USERS_COUNT*COMPLETITIONS_COUNT))
-
-CURRENT_DIR=$(pwd)
-
-echo "-- Generate sum-up for load tests."
-
-# --- create sum up file for gathering logs ---
-sumupFile="$FOLDER/$TIMESTAMP/load-test-sumup.txt"
-touch $sumupFile
-
-# write users with failed tests
-failedUsers=""
-i=1
-failedCounter=0
-user_for_getting_test_names=""
-
-cd $FOLDER/$TIMESTAMP
-rm -rf "lost+found"
-for d in */ ; do
- if [ -d ${d}report ]; then
- failedUsers="$failedUsers ${d%"/"}"
- failedCounter=$((failedCounter + 1))
- else
- if [[ $user_for_getting_test_names == "" ]]; then
- user_for_getting_test_names=${d%"/"}
- fi
- fi
-done
-cd $CURRENT_DIR
-
-echo "Tests setup: $USERS_COUNT users, each running $COMPLETITIONS_COUNT workspaces"
-echo -e "Tests setup: $USERS_COUNT users, each running $COMPLETITIONS_COUNT workspaces \n \n" > $sumupFile
-
-if [[ $failedUsers == "" ]]; then
- echo "All tests has passed, yay!"
- echo -e "Tests passed for all $TEST_COUNT workspaces, yay! \n" > $sumupFile
-else
- echo "Test failed for $failedCounter/$TEST_COUNT workspaces: $failedUsers"
- echo -e "Test failed for $failedCounter/$TEST_COUNT workspaces: $failedUsers \n" >> $sumupFile
-fi
-
-if [[ $user_for_getting_test_names == "" ]]; then
- echo "Tests failed for all users. Skipping generation logs."
- exit
-fi
-
-# change \r to \n in files
-for file in $(find $FOLDER/$TIMESTAMP -name 'load-test-results.txt'); do
- sed -i 's/\r/\n/g' $file
-done
-
-lineCounter=1
-tests=$(wc -l < $FOLDER/$TIMESTAMP/$user_for_getting_test_names/load-test-folder/load-test-results.txt)
-
-while [[ $lineCounter -le $tests ]]; do
- sum=0
- min=-1
- max=-1
- count=0
- sed "${lineCounter}q;d" $FOLDER/$TIMESTAMP/$user_for_getting_test_names/load-test-folder/load-test-results.txt | awk -F ':' '{print $1}' >> $sumupFile
- for file in $(find $FOLDER/$TIMESTAMP -name 'load-test-results.txt'); do
- actual=$(sed "${lineCounter}q;d" $file | awk -F ':' '{print $2}' | awk -F ' ' '{ print $1}')
- if [[ -z $actual ]]; then
- continue
- fi
- sum=$(($sum + $actual))
- if [[ $min == -1 ]]; then
- min=$actual
- else
- if [[ $min -gt $actual ]]; then
- min=$actual
- fi
- fi
- if [[ $max == -1 ]]; then
- max=$actual
- else
- if [[ $max -lt $actual ]]; then
- max=$actual
- fi
- fi
- count=$((count + 1))
- done
- lineCounter=$((lineCounter+1))
- if [[ $count == 0 ]]; then
- echo "No values collected. " >> $sumupFile
- else
- avg=$((sum / count))
- echo "min: $min" >> $sumupFile
- echo "max: $max" >> $sumupFile
- echo "avg: $avg" >> $sumupFile
- fi
-done
-
-END_TIME=$(date +%s)
-TEST_DURATION=$((END_TIME-TIMESTAMP))
-echo "Tests are done! :) "
-echo "Tests lasted $TEST_DURATION seconds."
-echo "You can see load tests sum up here: $sumupFile"
diff --git a/tests/performance/pvc.yaml b/tests/performance/pvc.yaml
deleted file mode 100644
index 77c490e164..0000000000
--- a/tests/performance/pvc.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: load-test-pvc
-spec:
- accessModes: [ "ReadWriteOnce" ]
- resources:
- requests:
- storage: 5Gi
- volumeName: loadTestVolume
diff --git a/tests/performance/report-tree.png b/tests/performance/report-tree.png
deleted file mode 100644
index e715da1d81..0000000000
Binary files a/tests/performance/report-tree.png and /dev/null differ
diff --git a/tests/performance/report-user.png b/tests/performance/report-user.png
deleted file mode 100644
index 03e36dc62c..0000000000
Binary files a/tests/performance/report-user.png and /dev/null differ
diff --git a/tests/performance/sum_up_failures.sh b/tests/performance/sum_up_failures.sh
deleted file mode 100755
index 5a0edec30c..0000000000
--- a/tests/performance/sum_up_failures.sh
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2020 Red Hat, Inc.
-# This program and the accompanying materials are made
-# available under the terms of the Eclipse Public License 2.0
-# which is available at https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# See: https://sipb.mit.edu/doc/safe-shell/
-
-# This script goes through results of load tests and sums up well known issues. Also reports non recognized failures for manual investigation.
-# To run this script, set:
-# TIMESTAMP to the name of a folder, where load tests results are stored.
-# filedFolderNames to the array of a users, where test failed. You can easily copy that from the load test sum up.
-
-TIMESTAMP=
-failedFolderNames=( )
-
-staleErrors=0
-explorerErrs=0
-nosuchwindowErr=0
-stopErr=0
-removeErr=0
-loadErr=0
-tokenErr=0
-startErr=0
-ETIMEDOUTerr=0
-
-sum=0
-staleElementUser=""
-explorerUser=""
-nosuchwindUser=""
-stopErrUser=""
-removeUser=""
-loadErrUser=""
-tokenErrUser=""
-startErrUser=""
-ETIMEDOUTUser=""
-notclasified=0
-
-#aditional info
-usr409=""
-usr503=""
-usr504=""
-
-for i in "${failedFolderNames[@]}"
-do
- #################### Additional info gathering #############################################
- er409=$(cat report/$TIMESTAMP/$i/console-log.txt | grep '409')
- if [[ ! -z $er409 ]]; then
- usr409="$usr409 $i"
- fi
- er503=$(cat report/$TIMESTAMP/$i/console-log.txt | grep '503')
- if [[ ! -z $er503 ]]; then
- usr503="$usr503 $i"
- fi
- er504=$(cat report/$TIMESTAMP/$i/console-log.txt | grep '504')
- if [[ ! -z $er504 ]]; then
- usr504="$usr504 $i"
- fi
- ############################################################################################
-
- sum=$((sum+1))
- staleerror=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'StaleElementReferenceError')
- if [[ ! -z $staleerror ]]; then
- staleErrors=$((staleErrors+1))
- staleElementUser="$staleElementUser $i"
- continue;
- fi
-
- explorer=$(cat report/$TIMESTAMP/$i/console-log.txt | grep "TimeoutError: Waiting for element to be located.*Explorer")
- if [[ ! -z $explorer ]]; then
- explorerErrs=$((explorerErrs+1))
- explorerUser="$explorerUser $i"
- continue;
- fi
-
- nosuchwindow=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'NoSuchWindowError: no such window')
- if [[ ! -z $nosuchwindow ]]; then
- nosuchwindowErr=$((nosuchwindowErr+1))
- nosuchwindUser="$nosuchwindUser $i"
- continue;
- fi
-
- loading=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'cannot determine loading status')
- if [[ ! -z $loading ]]; then
- loadErr=$((loadErr+1))
- loadErrUser="$loadErrUser $i"
- continue;
- fi
-
- starterror=$(cat report/$TIMESTAMP/$i/console-log.txt | grep ') Wait loading workspace and get time')
- if [[ ! -z $starterror ]]; then
- startErr=$((startErr+1))
- startErrUser="$startErrUser $i"
- continue;
- fi
-
- stoperror=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'Stopping workspace failed')
- if [[ ! -z $stoperror ]]; then
- stopErr=$((stopErr+1))
- stopErrUser="$stopErrUser $i"
- continue;
- fi
-
- removingerr=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'Removing of workspace failed')
- if [[ ! -z $removingerr ]]; then
- removeErr=$((removeErr+1))
- removeUser="$removeUser $i"
- continue;
- fi
-
- token=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'Can not get bearer token')
- if [[ ! -z $token ]]; then
- tokenErr=$((tokenErr+1))
- tokenErrUser="$tokenErrUser $i"
- continue;
- fi
-
- etimed=$(cat report/$TIMESTAMP/$i/console-log.txt | grep 'ETIMEDOUT')
- if [[ ! -z $etimed ]]; then
- ETIMEDOUTerr=$((ETIMEDOUTerr+1))
- ETIMEDOUTUser="$ETIMEDOUTUser $i"
- continue;
- fi
-
-
- echo " ========================================================= vv $i vv ================================================================================"
- cat report/$TIMESTAMP/$i/console-log.txt | grep ') "after all"'
- notclasified=$((notclasified+1))
-
-done
-
-echo "StaleElementReferenceError seen: $staleErrors times"
-echo $staleElementUser
-echo
-echo "Waiting for IDE - Explorer seen: $explorerErrs times"
-echo $explorerUser
-echo
-echo "NoSuchWindowError: no such window seen: $nosuchwindowErr times"
-echo $nosuchwindUser
-echo
-echo "Failed to start workspace seen: $startErr times"
-echo $startErrUser
-echo
-echo "Can not get bearer token seen: $tokenErr times"
-echo $tokenErrUser
-echo
-echo "Stopping workspace failed seen: $stopErr times"
-echo $stopErrUser
-echo
-echo "Removing of workspace failed seen: $removeErr times"
-echo $removeUser
-echo
-echo "cannot determine loading status seen: $loadErr times"
-echo $loadErrUser
-echo
-echo "afer suited - ETIMEDOUT seen: $ETIMEDOUTerr times"
-echo $ETIMEDOUTUser
-echo
-echo "Remaining for manual verifictaion $notclasified/$sum"
-echo
-echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-echo "info about error codes found:"
-echo "409: $usr409"
-echo "503: $usr503"
-echo "504: $usr504"
-echo "Note: error 409 happens when you try to remove workspace which is not stopped"