File tree Expand file tree Collapse file tree 5 files changed +57
-18
lines changed Expand file tree Collapse file tree 5 files changed +57
-18
lines changed Original file line number Diff line number Diff line change
1
+ const { defineConfig } = require ( 'cypress' )
2
+
3
+ module . exports = defineConfig ( {
4
+ viewportWidth : 1280 ,
5
+ defaultCommandTimeout : 8888 ,
6
+ chromeWebSecurity : false ,
7
+ reporter : 'junit' ,
8
+ video : true ,
9
+ retries : {
10
+ runMode : 8 ,
11
+ openMode : 0 ,
12
+ } ,
13
+ reporterOptions : {
14
+ mochaFile : 'cypress/reports/cypress-[hash].xml' ,
15
+ jenkinsMode : true ,
16
+ toConsole : true ,
17
+ } ,
18
+ e2e : {
19
+ // We've imported your old cypress plugins here.
20
+ // You may want to clean this up later by importing these.
21
+ setupNodeEvents ( on , config ) {
22
+ return require ( './cypress/plugins/index.js' ) ( on , config )
23
+ } ,
24
+ baseUrl : 'http://localhost:3000' ,
25
+ } ,
26
+ } )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { setupBeforeEach , tearDownAfterEach } from '../support/e2e' ;
2
+
3
+ describe ( 'Blocks Tests' , ( ) => {
4
+ beforeEach ( setupBeforeEach ) ;
5
+ afterEach ( tearDownAfterEach ) ;
6
+
7
+ it ( 'Add Block: Empty' , ( ) => {
8
+ // Change page title
9
+ cy . get ( '[contenteditable=true]' ) . first ( ) . clear ( ) ;
10
+
11
+ cy . get ( '[contenteditable=true]' ) . first ( ) . type ( 'My Add-on Page' ) ;
12
+
13
+ cy . get ( '.documentFirstHeading' ) . contains ( 'My Add-on Page' ) ;
14
+
15
+ cy . get ( '[contenteditable=true]' ) . first ( ) . type ( '{enter}' ) ;
16
+
17
+ // Add block
18
+ cy . get ( '.ui.basic.icon.button.block-add-button' ) . first ( ) . click ( ) ;
19
+ cy . get ( '.blocks-chooser .title' ) . contains ( 'Media' ) . click ( ) ;
20
+ cy . get ( '.content.active.media .button.image' ) . contains ( 'Irudia' ) . click ( ) ;
21
+
22
+ // Save
23
+ cy . get ( '#toolbar-save' ) . click ( ) ;
24
+ cy . url ( ) . should ( 'eq' , Cypress . config ( ) . baseUrl + '/cypress/my-page' ) ;
25
+
26
+ // then the page view should contain our changes
27
+ cy . contains ( 'My Add-on Page' ) ;
28
+ cy . get ( '.block.image' ) ;
29
+ } ) ;
30
+ } ) ;
Original file line number Diff line number Diff line change 1
- import { setupBeforeEach , tearDownAfterEach } from '../support' ;
1
+ import { setupBeforeEach , tearDownAfterEach } from '../support/e2e ' ;
2
2
3
3
describe ( 'Blocks Tests' , ( ) => {
4
4
beforeEach ( setupBeforeEach ) ;
File renamed without changes.
You can’t perform that action at this time.
0 commit comments