Skip to content

Commit 29705b2

Browse files
committed
add e2e test
1 parent 55e6b06 commit 29705b2

File tree

10 files changed

+1631
-1295
lines changed

10 files changed

+1631
-1295
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ cypress/integration/localhost*
99
cypress/plugins
1010
cypress.env.json
1111
.DS_Store
12+
/cypress/videos/
13+
/cypress/screenshots/

bin/cli-setup.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ wp --allow-root theme activate twentynineteen
1212
# set this constant so that the specific hooks are loaded
1313
wp --allow-root config set TI_CYPRESS_TESTING true --raw
1414

15-
# create terms
16-
wp --allow-root term create category c_feedzy-1
17-
wp --allow-root term create post_tag t_feedzy-1
1815

1916
# debugging
2017
wp --allow-root config set WP_DEBUG true --raw

cypress.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"baseUrl": "http://localhost:8080",
33
"env": {
4+
"login": "wordpress",
5+
"pass": "wordpress",
46
"urls": {
57
"library": "/wp-admin/admin.php?page=visualizer",
68
"samples": "https://s3.amazonaws.com/downloads.themeisle.com/samples-visualizer/"

cypress/integration/default/free-lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('Test Free - lifecycle', function() {
22
before(function(){
33

44
// login to WP
5-
cy.visit( '/wp-admin/wp-login.php');
5+
cy.visit( '/wp-login.php');
66
cy.get('#user_login').clear().type( Cypress.env('login') );
77
cy.get('#user_pass').clear().type( Cypress.env('pass') );
88
cy.get('#wp-submit').click();

cypress/integration/gutenberg-datatable/free-gutenberg-datatable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('Test Free - gutenberg (datatable)', function() {
22
before(function(){
33

44
// login to WP
5-
cy.visit('/wp-admin/wp-login.php');
5+
cy.visit('/wp-login.php');
66
cy.get('#user_login').clear().type( Cypress.env('login') );
77
cy.get('#user_pass').clear().type( Cypress.env('pass') );
88
cy.get('#wp-submit').click();

cypress/integration/gutenberg/free-gutenberg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('Test Free - gutenberg', function() {
22
before(function(){
33

44
// login to WP
5-
cy.visit('/wp-admin/wp-login.php');
5+
cy.visit('/wp-login.php');
66
cy.get('#user_login').clear().type( Cypress.env('login') );
77
cy.get('#user_pass').clear().type( Cypress.env('pass') );
88
cy.get('#wp-submit').click();

cypress/support/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import './commands'
2121

2222
// allow WP session to remain open during multiple cy.visit() invocations.
2323
Cypress.Cookies.defaults({
24-
whitelist: /wordpress_.*/
24+
preserve: /wordpress_.*/
2525
})
2626

2727
// ignore JS errors.

docker-compose.ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ services:
1818
restart: always
1919
volumes:
2020
- ./bin:/var/www/html/bin
21-
- ~/wpcore:/var/www/html/
22-
- .:/var/www/html/wp-content/plugins/feedzy-rss-feeds/
21+
- wpcore:/var/www/html/
22+
- .:/var/www/html/wp-content/plugins/visualizer/
2323
depends_on:
2424
- mysql
2525
- wordpress
@@ -38,8 +38,8 @@ services:
3838
image: wordpress:latest
3939
volumes:
4040
- ./bin:/var/www/html/bin
41-
- ~/wpcore:/var/www/html/
42-
- .:/var/www/html/wp-content/plugins/feedzy-rss-feeds/
41+
- wpcore:/var/www/html/
42+
- .:/var/www/html/wp-content/plugins/visualizer/
4343
restart: always
4444
environment:
4545
WORDPRESS_DB_NAME: wordpress

0 commit comments

Comments
 (0)