Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4d43571
Initial cypress setup.
iamdharmesh Apr 15, 2022
791cfd6
Added initial admin tests.
iamdharmesh Apr 15, 2022
4caeeb3
Added image processing tests.
iamdharmesh Apr 15, 2022
a0b7ef1
Added language processing tests.
iamdharmesh Apr 15, 2022
9adaaae
Added more tests related to image processing
iamdharmesh Apr 15, 2022
6da86c4
eslint fixes
iamdharmesh Apr 15, 2022
f960ca2
fix composer error
iamdharmesh Apr 15, 2022
a021285
added assertions for classifAI email and key field in settings.
iamdharmesh Apr 22, 2022
ba3eaf5
Added test plugin with sample data to mock classifai http requests.
iamdharmesh Apr 22, 2022
c024940
added cypress related path in .gitignore
iamdharmesh Apr 22, 2022
c21e125
Added language processing related test cases to verify created terms …
iamdharmesh Apr 22, 2022
db42947
Upload artifacts in case of failure.
iamdharmesh Apr 22, 2022
a813e06
Fix media.min.js error in WP5.2 env.
iamdharmesh Apr 22, 2022
75b37df
Fix WP minimum env tests,
iamdharmesh Apr 22, 2022
dae61ef
Added some additional tests related to language processing.
iamdharmesh Apr 29, 2022
2eafbeb
Merge branch 'develop' of https://github.com/10up/classifai into test…
iamdharmesh Apr 29, 2022
6501253
fixed disable feature visible issue.
iamdharmesh Apr 29, 2022
52fbded
Added more cases related to image processing.
iamdharmesh Apr 29, 2022
155a790
Added image processing tests with HTTP mock
iamdharmesh May 9, 2022
4212ace
Added PDF read tests.
iamdharmesh May 9, 2022
60afe28
use asset image for thumnail content
iamdharmesh May 9, 2022
f61e36d
fix image processing fail tests
iamdharmesh May 9, 2022
e82f058
wpacceptance removed.
iamdharmesh May 9, 2022
2973ac7
fix pdf read test
iamdharmesh May 9, 2022
41f9087
Merge branch 'develop' of https://github.com/10up/classifai into test…
iamdharmesh May 16, 2022
4300423
Fix eslint deprecated value.
iamdharmesh May 16, 2022
67d5418
fix indentation
iamdharmesh May 17, 2022
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
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"globals": {
"wp": "readable",
"jQuery": "readable"
"wp": "readonly",
"jQuery": "readonly",
"describe": "readonly",
"before": "readonly",
"beforeEach": "readonly",
"expect": "readonly",
"it": "readonly",
"Cypress": "readonly",
"cy": "readonly"
},
"extends": "@10up/eslint-config"
}
54 changes: 54 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E test

on:
push:
branches:
- develop
- trunk
pull_request:
branches:
- develop
jobs:
cypress:
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest
strategy:
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#5.2'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm install

- name: Composer (optional)
run: composer update -W
continue-on-error: true

- name: Build (optional)
run: npm run build
continue-on-error: true

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run env:start

- name: Test
run: npm run cypress:run

- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-artifact-classifai
retention-days: 7
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
23 changes: 0 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@ on:
- develop

jobs:
wpa:
runs-on: ubuntu-latest

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

- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer:v1

- name: Install dependencies
run: composer install

- name: Setup WP Snapshots
run: ./vendor/bin/wpsnapshots configure 10up --aws_key=${{ secrets.AWS_ACCESS_KEY_ID }} --aws_secret=${{ secrets.AWS_SECRET_ACCESS_KEY }} --user_name=wp-acceptance --user_email=travis@10up.com

- name: Test
run: ./vendor/bin/wpacceptance run

phpunit:
runs-on: ubuntu-latest

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ Thumbs.db
Desktop.ini

config.local.php

# cypress.
tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
.wp-env.override.json
10 changes: 10 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugins": [".", "./tests/test-plugin"],
"env": {
"tests": {
"mappings": {
"wp-cli.yml": "./tests/bin/wp-cli.yml"
}
}
}
}
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@
"require-dev": {
"phpunit/phpunit": "^7.5",
"10up/phpcs-composer": "dev-master",
"10up/wpacceptance": "dev-master",
"yoast/phpunit-polyfills": "^1.0.0"
},
"minimum-stability": "dev"
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading