This repository was archived by the owner on Jun 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const expect = require('chai').expect;
33const helpers = require ( './helpers' ) ;
44
55const byId = helpers . byTestID ;
6+ const url = `http://localhost:${ process . env . PORT || 8080 } ` ;
67
78module . exports = {
89 '[Project Tests] - Create environment' : function ( browser ) {
@@ -29,6 +30,8 @@ module.exports = {
2930 . waitForElementVisible ( "[name='confirm-env-name']" )
3031 . setValue ( "[name='confirm-env-name']" , 'StagingInternal' )
3132 . click ( '#confirm-delete-env-btn' )
33+ . waitForElementVisible ( byId ( 'features-page' ) ) ;
34+ browser . url ( `${ url } /projects` )
3235 . waitForElementVisible ( '#project-select-page' ) ;
3336 } ,
3437 '[Project Tests] - View project' : function ( browser ) {
Original file line number Diff line number Diff line change @@ -48,7 +48,12 @@ const EnvironmentSettingsPage = class extends Component {
4848 } ;
4949
5050 onRemoveEnvironment = ( ) => {
51- this . context . router . history . replace ( '/projects' ) ;
51+ const envs = ProjectStore . getEnvs ( ) ;
52+ if ( envs && envs . length ) {
53+ this . context . router . history . replace ( `/project/${ this . props . match . params . projectId } /environment` + `/${ envs [ 0 ] . api_key } /features` ) ;
54+ } else {
55+ this . context . router . history . replace ( `/project/${ this . props . match . params . projectId } /environment/create` ) ;
56+ }
5257 } ;
5358
5459 saveEnv = ( e ) => {
You can’t perform that action at this time.
0 commit comments