Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial e2e test setup #1

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
'./configs/base.playwright.eslintrc.json',
'./configs/warnings.eslintrc.json',
'./configs/errors.eslintrc.json',
'./configs/ui-tests.eslintrc.json',
'./configs/ui-tests.playwright.eslintrc.json'
],
ignorePatterns: [
'**/{node_modules,lib}'
],
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.json'
}
};
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://community.theia-ide.org
about: Please ask questions on the Theia Discourse.
- name: Create issue
url: https://github.com/eclipse-theia/theia-e2e-test-suite/issues/new/choose
about: Please create issues in this repository.
80 changes: 80 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- main
schedule:
- cron: "0 4 * * *" # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule

jobs:
build:
name: E2E Tests on ubuntu-18.04 with Node.js 16.x

runs-on: ubuntu-18.04
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js "16.x"
uses: actions/setup-node@v1
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"

- name: Use Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Build
shell: bash
run: |
yarn

- name: Checkout Theia
uses: actions/checkout@master
with:
repository: eclipse-theia/theia
path: ./theia

- name: Build Theia
shell: bash
working-directory: ./theia
run: |
yarn --skip-integrity-check --network-timeout 100000
yarn browser build

- name: Run Theia
shell: bash
working-directory: ./theia
run: yarn browser start &

- name: Test (playwright)
uses: GabrielBB/xvfb-action@v1
with:
run: yarn ui-tests-ci

- name: Generate Report
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: allure-results
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history

- name: Publish Report
if: always() && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.DS_Store
**/node_modules
**/.browser_modules
**/dist
**/lib
**/src-gen
**/gen-webpack.config.js
**/plugins
**/tsconfig.tsbuildinfo
*.log

node_modules
allure-results
test-results
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug selected test file",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/playwright",
"args": [
"test",
"--debug",
"--config=./configs/playwright.debug.config.ts",
"${fileBasenameNoExtension}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
]
}
35 changes: 35 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// If one would like to add/remove/modify user preferences without modifying the content of the
// workspace settings file, then one would need to modify the `settings.json` under here:
// - Windows: %APPDATA%\Code\User\settings.json
// - Linux: $HOME/.config/Code/User/settings.json
// - Mac: $HOME/Library/Application Support/Code/User/settings.json
{
"editor.formatOnSave": true,
"search.exclude": {
"**/node_modules": true,
"**/lib": true,
"**/coverage": true
},
"editor.insertSpaces": true,
"[typescript]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "vscode.typescript-language-features",
},
"[javascript]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "vscode.json-language-features",
},
"[jsonc]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "vscode.json-language-features",
},
"typescript.tsdk": "node_modules/typescript/lib",
"files.insertFinalNewline": true,
"editor.rulers": [
180
], // ESLint `max-len` rule.
}
52 changes: 52 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run all tests",
"type": "shell",
"group": {
"kind": "test",
"isDefault": true
},
"command": "yarn ui-tests",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "Run selected test file in headless mode",
"type": "shell",
"group": "test",
"command": "yarn ui-tests ${fileBasenameNoExtension}",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "Run selected test file in headful mode",
"type": "shell",
"group": "test",
"command": "yarn ui-tests-headful ${fileBasenameNoExtension}",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": []
},
{
"label": "Generate and open test report",
"type": "shell",
"group": "test",
"command": "yarn ui-tests-report",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}
62 changes: 62 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<div id="theia-logo" align="left">
<br />
<img src="https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/EF_GRY-OR_svg.svg?sanitize=true" alt="Eclipse Logo" width="300"/>
</div>

# Community Code of Conduct

Version 1.1

October 21, 2019

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

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.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at codeofconduct@eclipse.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq

<div id="theia-logo" align="left">
<br />
<img src="https://www.eclipse.org/images/Eclipse_Code_of_Conduct.png" alt="Eclipse Logo" width="150"/>
</div>

----
Note: Please see [here](https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php) for the latest version of this document, hosted at the Eclipse Foundation
Loading