Skip to content

Commit

Permalink
Unit tests (#297)
Browse files Browse the repository at this point in the history
* [Spencer/Venus] add engagemnt-routing

* [Spencer/Venus] Add Drawer to the page

* refactoring teh component - pass the component as a props

* [Spencer/Venus] adding tests

* add tests for main template, drawer and engagement navigation

* [Spencer/Venus] add tests for drawer behaviour

* lodestar rename (#163) (#164)

* add header nav

* Feature/engagement shell (#165)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* Feature/create engagement popup (#167)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* fixed tests for new engagements

* engagement list view created (#168)

* engagement list view created

* updated snapshots

* updated gitignore (#169)

* add Red Hat font - add About page

* refactor admin to about page

* update tests

* Fixed page headers to match designs (#170)

* add notification beahviour

* add tests

* bumped packages

* bumped packages

* updated failing snapshots from patternfly/react-scripts upgrade

* fixes for engagement list route placeholder

* fix the error

* update the notification

* update the notification look, remove the caret icon next to it

* update the header based on new upgrade of patternfly

* refactor: rename the files and folders to be easier to find

* Feature/tabbed engagement view (#174)

* engagement view wrapper

* engagement view wrapper

* initial wrapper for content and engagement view template

* tabs

* placed form view in tabs

* mock overview page

* refactored faked engagement

* updated unused import int he router

* Feature/tabbed view enhancements (#175)

* updated folder structure

* updated folder structure

* added snapshot test for tab view

* fixes for cluster user view

* updated failing snapshot

* Initial implementation of informational card designs (#176)

* fixes for patternfly upgrade

* added basic cards with available information

* added tests, static faked engagement item

* updated tests"

* Card view improvements and save/launch buttons (#177)

* null coalescing operator

* added save button

* fixes for failing tests

* Convenient urls (#178)

* null coalescing operator

* added save button

* fixes for failing tests

* added convenient urls to enable direct navigation to specific tabs

* updated tests

* actually resolved merge conflicts

* updated failing test from bad merge with develop

* Engagement improvements (#179)

* reorganized files

* reorganized files

* added engagement serializer

* fixes for date parsers

* serialized launch data

* fixed form render

* Typeahead customer select (#181)

* typeahead customer select with tests

* typeahead customer select with tests

* updated failing snapshot

* renamed components to clarify the private nature of _CustomerSelectDropdown

* add cards for different engagements: upcoming, active, past

* rerun the tests

* removed unused dependencies (#186)

* trying to pass the test

* updating the summary-card to format dates differently - to pass the tests

* remove unused test file

* remove old snapshots and unused files

* add tests for card details

* add more tests - test coverage

* Feature/edit modals (#183)

* edit modals

* added 'hosting environment' tab

* added redirect to tab view to handle navigating to root status page

* fixed tests. reorganized the relationship between cards and modals

* spacing on save button

* renaming and cleanup

* link the engagement cards to engagement page (#188)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* Feature/engagement list item (#189)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* update the test

* engagement form field separation (#187)

* engagement form field separation

* merged develop

* Feature/design conformity (#190)

* modified to match spec

* modified to match spec

* minor tweaks, wrenches, changes, etc

* updated failing snapshots

* added isValid catch to date

* null check

* fixed failing tes

* notification feature

* add notification content

* update tests

* Feature/user card (#192)

* user card initial

* user card initial

* engagement user modal

* fixes failing tests

* shows 0 if engagement dates are incorrect

* make the dashboard cards responsive

* make the dashboard card titles clickable

* make tooltips appear quicker

* show syatem status only if the engagement is launched

* modals with no messages shows empty state

* make engagement cards responsive - Make the card title look like link

* description field reorganization (#243)

* description field reorganization

* added responsive UI to system details

* updated dashboard spec

* updated snapshots

* make the cards look the same and not strech based on the content

* remove console warning - pass the test

* remove the view-all link from cards

* Develop (#251)

* fixed infinite state loop from dates (#247)

* first name/last name swap, remove system status card for upcoming (#249)

* first name/last name swap, remove system status card for upcoming

* updated snapshot

* removed default start date. Removed default user role. Moved required fields to depend on saved engagement fields. Moved cards depending on currentEngagementChanges to currentEngagement

* updated failing snapshot

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

Co-authored-by: donal <[email protected]>
Co-authored-by: Venus <[email protected]>

* Little fixes (#253)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* Little fixes (#255)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* update the add new user icon

* add empty message when no users available

* update the empty states for Activity history and no user

* rewording

* e2e - update the readme file

* refactor the component versions

* refactor/redesign about page

* update the about page

* update the snap test

* applying feedback

* add need-help section and modify links in about page

* update read me file to have more generic variables

* make the links only visible if the config is set

* merge master into develop (#270)

* Develop (#260)

* [Spencer/Venus] add engagemnt-routing

* [Spencer/Venus] Add Drawer to the page

* refactoring teh component - pass the component as a props

* [Spencer/Venus] adding tests

* add tests for main template, drawer and engagement navigation

* [Spencer/Venus] add tests for drawer behaviour

* lodestar rename (#163) (#164)

* add header nav

* Feature/engagement shell (#165)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* Feature/create engagement popup (#167)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* fixed tests for new engagements

* engagement list view created (#168)

* engagement list view created

* updated snapshots

* updated gitignore (#169)

* add Red Hat font - add About page

* refactor admin to about page

* update tests

* Fixed page headers to match designs (#170)

* add notification beahviour

* add tests

* bumped packages

* bumped packages

* updated failing snapshots from patternfly/react-scripts upgrade

* fixes for engagement list route placeholder

* fix the error

* update the notification

* update the notification look, remove the caret icon next to it

* update the header based on new upgrade of patternfly

* refactor: rename the files and folders to be easier to find

* Feature/tabbed engagement view (#174)

* engagement view wrapper

* engagement view wrapper

* initial wrapper for content and engagement view template

* tabs

* placed form view in tabs

* mock overview page

* refactored faked engagement

* updated unused import int he router

* Feature/tabbed view enhancements (#175)

* updated folder structure

* updated folder structure

* added snapshot test for tab view

* fixes for cluster user view

* updated failing snapshot

* Initial implementation of informational card designs (#176)

* fixes for patternfly upgrade

* added basic cards with available information

* added tests, static faked engagement item

* updated tests"

* Card view improvements and save/launch buttons (#177)

* null coalescing operator

* added save button

* fixes for failing tests

* Convenient urls (#178)

* null coalescing operator

* added save button

* fixes for failing tests

* added convenient urls to enable direct navigation to specific tabs

* updated tests

* actually resolved merge conflicts

* updated failing test from bad merge with develop

* Engagement improvements (#179)

* reorganized files

* reorganized files

* added engagement serializer

* fixes for date parsers

* serialized launch data

* fixed form render

* Typeahead customer select (#181)

* typeahead customer select with tests

* typeahead customer select with tests

* updated failing snapshot

* renamed components to clarify the private nature of _CustomerSelectDropdown

* add cards for different engagements: upcoming, active, past

* rerun the tests

* removed unused dependencies (#186)

* trying to pass the test

* updating the summary-card to format dates differently - to pass the tests

* remove unused test file

* remove old snapshots and unused files

* add tests for card details

* add more tests - test coverage

* Feature/edit modals (#183)

* edit modals

* added 'hosting environment' tab

* added redirect to tab view to handle navigating to root status page

* fixed tests. reorganized the relationship between cards and modals

* spacing on save button

* renaming and cleanup

* link the engagement cards to engagement page (#188)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* Feature/engagement list item (#189)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* update the test

* engagement form field separation (#187)

* engagement form field separation

* merged develop

* Feature/design conformity (#190)

* modified to match spec

* modified to match spec

* minor tweaks, wrenches, changes, etc

* updated failing snapshots

* added isValid catch to date

* null check

* fixed failing tes

* notification feature

* add notification content

* update tests

* Feature/user card (#192)

* user card initial

* user card initial

* engagement user modal

* fixes failing tests

* shows 0 if engagement dates are incorrect

* make the dashboard cards responsive

* make the dashboard card titles clickable

* make tooltips appear quicker

* show syatem status only if the engagement is launched

* modals with no messages shows empty state

* make engagement cards responsive - Make the card title look like link

* description field reorganization (#243)

* description field reorganization

* added responsive UI to system details

* updated dashboard spec

* updated snapshots

* make the cards look the same and not strech based on the content

* remove console warning - pass the test

* remove the view-all link from cards

* Develop (#251)

* fixed infinite state loop from dates (#247)

* first name/last name swap, remove system status card for upcoming (#249)

* first name/last name swap, remove system status card for upcoming

* updated snapshot

* removed default start date. Removed default user role. Moved required fields to depend on saved engagement fields. Moved cards depending on currentEngagementChanges to currentEngagement

* updated failing snapshot

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

Co-authored-by: donal <[email protected]>
Co-authored-by: Venus <[email protected]>

* Little fixes (#253)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* Little fixes (#255)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* update the add new user icon

* add empty message when no users available

* update the empty states for Activity history and no user

* rewording

Co-authored-by: Venus Izadi <[email protected]>
Co-authored-by: Venus <[email protected]>
Co-authored-by: donal <[email protected]>

* System status card null state (#261)

* fixed infinite state loop from dates

* proposal for wording

* added italics

* e2e  (#256)

* [Spencer/Venus] add engagemnt-routing

* [Spencer/Venus] Add Drawer to the page

* refactoring teh component - pass the component as a props

* [Spencer/Venus] adding tests

* add tests for main template, drawer and engagement navigation

* [Spencer/Venus] add tests for drawer behaviour

* lodestar rename (#163) (#164)

* add header nav

* Feature/engagement shell (#165)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* Feature/create engagement popup (#167)

* engagement shell init commit

* set zindex of engagement footer, finished up engagement shell

* fixed tests for new engagements

* engagement list view created (#168)

* engagement list view created

* updated snapshots

* updated gitignore (#169)

* add Red Hat font - add About page

* refactor admin to about page

* update tests

* Fixed page headers to match designs (#170)

* add notification beahviour

* add tests

* bumped packages

* bumped packages

* updated failing snapshots from patternfly/react-scripts upgrade

* fixes for engagement list route placeholder

* fix the error

* update the notification

* update the notification look, remove the caret icon next to it

* update the header based on new upgrade of patternfly

* refactor: rename the files and folders to be easier to find

* Feature/tabbed engagement view (#174)

* engagement view wrapper

* engagement view wrapper

* initial wrapper for content and engagement view template

* tabs

* placed form view in tabs

* mock overview page

* refactored faked engagement

* updated unused import int he router

* Feature/tabbed view enhancements (#175)

* updated folder structure

* updated folder structure

* added snapshot test for tab view

* fixes for cluster user view

* updated failing snapshot

* Initial implementation of informational card designs (#176)

* fixes for patternfly upgrade

* added basic cards with available information

* added tests, static faked engagement item

* updated tests"

* Card view improvements and save/launch buttons (#177)

* null coalescing operator

* added save button

* fixes for failing tests

* Convenient urls (#178)

* null coalescing operator

* added save button

* fixes for failing tests

* added convenient urls to enable direct navigation to specific tabs

* updated tests

* actually resolved merge conflicts

* updated failing test from bad merge with develop

* Engagement improvements (#179)

* reorganized files

* reorganized files

* added engagement serializer

* fixes for date parsers

* serialized launch data

* fixed form render

* Typeahead customer select (#181)

* typeahead customer select with tests

* typeahead customer select with tests

* updated failing snapshot

* renamed components to clarify the private nature of _CustomerSelectDropdown

* add cards for different engagements: upcoming, active, past

* rerun the tests

* removed unused dependencies (#186)

* trying to pass the test

* updating the summary-card to format dates differently - to pass the tests

* remove unused test file

* remove old snapshots and unused files

* add tests for card details

* add more tests - test coverage

* Feature/edit modals (#183)

* edit modals

* added 'hosting environment' tab

* added redirect to tab view to handle navigating to root status page

* fixed tests. reorganized the relationship between cards and modals

* spacing on save button

* renaming and cleanup

* link the engagement cards to engagement page (#188)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* Feature/engagement list item (#189)

* link the engagement cards to engagement page

* update snap test

* update the snap test

* fix lint

* make the header clickable

* change the time format

* update the test

* engagement form field separation (#187)

* engagement form field separation

* merged develop

* Feature/design conformity (#190)

* modified to match spec

* modified to match spec

* minor tweaks, wrenches, changes, etc

* updated failing snapshots

* added isValid catch to date

* null check

* fixed failing tes

* notification feature

* add notification content

* update tests

* Feature/user card (#192)

* user card initial

* user card initial

* engagement user modal

* fixes failing tests

* shows 0 if engagement dates are incorrect

* make the dashboard cards responsive

* make the dashboard card titles clickable

* make tooltips appear quicker

* show syatem status only if the engagement is launched

* modals with no messages shows empty state

* make engagement cards responsive - Make the card title look like link

* description field reorganization (#243)

* description field reorganization

* added responsive UI to system details

* updated dashboard spec

* updated snapshots

* make the cards look the same and not strech based on the content

* remove console warning - pass the test

* remove the view-all link from cards

* Develop (#251)

* fixed infinite state loop from dates (#247)

* first name/last name swap, remove system status card for upcoming (#249)

* first name/last name swap, remove system status card for upcoming

* updated snapshot

* removed default start date. Removed default user role. Moved required fields to depend on saved engagement fields. Moved cards depending on currentEngagementChanges to currentEngagement

* updated failing snapshot

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

* 🙈 FIX - li rendering on dom 🤩

Co-authored-by: donal <[email protected]>
Co-authored-by: Venus <[email protected]>

* Little fixes (#253)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* Little fixes (#255)

* close the drawer automatically by resizing the screen

* make search/sort bars respoinsive

* make the description field to be aligned with other fields on summary card

* for very long titles, wrap the text

* fix test

* update the add new user icon

* add empty message when no users available

* update the empty states for Activity history and no user

* rewording

* e2e create a new engagement

* e2e - create a new engagement

* e2e - edit engagement summary

* e2e - edit points of contact

* e2e - edit hosting environment

* e2e - add users

* e2e - complete flow of creating new engagement, editing the engagement and launching the engagement

* little changes

* e2e - Flow: Create, edit and launch a new engageemnt

* update snap tests

* remove the hard coded url

* e2e - existing engagements, search, filter, sort, create a new engagment from the page

* e2e - navigations and links

Co-authored-by: Spencer Stolworthy <[email protected]>
Co-authored-by: donal <[email protected]>

* Feature/409 conflicts (#262)

* initial progress on 409 conflict

* working refresh function

* fixed newline for linting

* renaming variables

* added profiler

* changed message for conflict

* Auth errors (#263)

* potential fix for authentication errors

* refactor how authentication errors are handled

* proposal for changing how the authentication check is handled

* proposal for changing how the authentication check is handled

* authenticationerror

* file renames

* renamed duplicated filename

* updated specs

* added preflight auth check

* fixes for preflight auth check

* removed console logs

* fixes for request circles

* fixed type in engagement poll interface

* added ref for validateAuth function to allow for auth checking in setInterval

* Reorganizing Contexts for easier testing; File organization fixes for non-conforming files (#265)

* reorganizing of non-conforming files

* created unimportedrc

* removed unused files

* removed unused test file

* added trim in project/customer name serializer (#267)

Co-authored-by: Spencer Stolworthy <[email protected]>
Co-authored-by: donal <[email protected]>

* unit tests for status card

* progress on auth context tests

* additional coverage for auth_context

* auth context coverage

* changed function to accept one argument object

* fixed broken tests

Co-authored-by: Venus Izadi <[email protected]>
Co-authored-by: Venus <[email protected]>
Co-authored-by: donal <[email protected]>
  • Loading branch information
4 people authored Aug 6, 2020
1 parent 983b31d commit ae6e5b6
Show file tree
Hide file tree
Showing 20 changed files with 805 additions and 338 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export CYPRESS_BASE_URL=fe-env-url
export CYPRESS_SSO_USER=e2e
export CYPRESS_SSO_PASSWORD=****
export CYPRESS_SSO_URL=sso_url
export CYPRESS_SSO_CLIENT_ID=client_id
npm run e2e
```
For running the e2e test locally:
Expand All @@ -195,6 +196,7 @@ export CYPRESS_BASE_URL=http://localhost:3000
export CYPRESS_SSO_USER=<<e2e>>
export CYPRESS_SSO_PASSWORD=****
export CYPRESS_SSO_URL=<<https://sso_host >>/auth/realms/<< realm name>>/protocol/openid-connect/token
export CYPRESS_SSO_CLIENT_ID=<<client_id>>
npm run e2e
```

Expand Down
174 changes: 85 additions & 89 deletions cypress/integration/1_new_engagement_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,152 +3,148 @@
describe('new engagement', () => {

beforeEach('Login', () => {
cy.login(
Cypress.env('SSO_URL'),
Cypress.env('SSO_USER'),
Cypress.env('SSO_PASSWORD')
);
cy.login();
});

it('creates a new engagement', () => {
cy.server();
cy.route({method: 'POST', url: 'engagements'}).as('createEngagement');
cy.route({ method: 'POST', url: 'engagements' }).as('createEngagement');

cy.visit('/');
cy.request('/app');

cy.get('[data-cy=get_started_button]')
.click();
.click();

cy.request('/app/dashboard');

cy.get('#nav-toggle')
.click();
.click();

cy.contains('Engagements');
cy.contains('Create New').click();

cy.get('#customer_dropdown')
.click()
.get('[data-testid=e2e]')
.click();
.click()
.get('[data-testid=e2e]')
.click();

const uuid = () => Cypress._.random(0, 1e6);
const id = uuid();
const testEngagementName = `cypressio_${id}`;

cy.get('[data-cy=new_engagement_name]')
.type(testEngagementName)
.get('[data-cy=createNewEngagement]')
.click();
.type(testEngagementName)
.get('[data-cy=createNewEngagement]')
.click();

cy.wait('@createEngagement').should('have.property', 'status', 201);

cy.get('li > .pf-c-alert')
.contains('Your engagement has been successfully created');
.contains('Your engagement has been successfully created');

cy.get('[data-cy=launch_button]').should('be.disabled');

cy.get('.pf-c-alert__action > .pf-c-button')
.click();
.click();
});

it('Edit engagement summary', () => {
cy.get('[data-cy=edit_summary_card]')
.click();
.click();

cy.get('textarea[data-cy=description_field]')
.clear()
.type('Test description')
.get('input[data-cy=location_field]')
.clear()
.type('Katmandu, Nepal')
.get('input[data-cy=start_date_input]')
.type('2020-10-25')
.should('have.value', '2020-10-25')
.get('input[data-cy=end_date_input]')
.type('2020-12-25')
.should('have.value', '2020-12-25');
.clear()
.type('Test description')
.get('input[data-cy=location_field]')
.clear()
.type('Katmandu, Nepal')
.get('input[data-cy=start_date_input]')
.type('2020-10-25')
.should('have.value', '2020-10-25')
.get('input[data-cy=end_date_input]')
.type('2020-12-25')
.should('have.value', '2020-12-25');

cy.get('textarea[data-cy=description_field]')
.click('bottomLeft');
.click('bottomLeft');

cy.get('[data-cy=retirement_date_input]')
.should('have.value', '2021-01-24');
.should('have.value', '2021-01-24');

cy.get('button[data-cy=save_summary_card]')
.click();
.click();

cy.get('[data-cy=launch_button]').should('be.disabled');

// cy.get('li > .pf-c-alert')
// .contains('Your updates have been successfully saved.');

cy.get('.pf-c-alert__action > .pf-c-button')
.click();
.click();
});

it('Edit points of contact', () => {
cy.get('[data-cy="points_of_contact"]')
.click();
.click();

cy.get('[data-cy="engagement_lead_name"]')
.clear()
.type('Test EL')
.get('[data-cy=engagement_lead_email]')
.clear()
.type('[email protected]')
.get('[data-cy=tech_lead_name]')
.clear()
.type('Test tech')
.get('[data-cy=tech_lead_email]')
.clear()
.type('[email protected]')
.get('[data-cy=customer_contact_name]')
.clear()
.type('Test Customer')
.get('[data-cy=customer_contact_email]')
.clear()
.type('[email protected]');
.clear()
.type('Test EL')
.get('[data-cy=engagement_lead_email]')
.clear()
.type('[email protected]')
.get('[data-cy=tech_lead_name]')
.clear()
.type('Test tech')
.get('[data-cy=tech_lead_email]')
.clear()
.type('[email protected]')
.get('[data-cy=customer_contact_name]')
.clear()
.type('Test Customer')
.get('[data-cy=customer_contact_email]')
.clear()
.type('[email protected]');

cy.get('[data-cy=save_point_of_contact]')
.click();
.click();

cy.get('[data-cy=launch_button]').should('be.disabled');

cy.get('.pf-c-alert__action > .pf-c-button')
.click();
.click();
});


it('Edit hosting environment', () => {
cy.get('[data-cy="hosting_env_button"]')
.click();
.click();

cy.get('#cloud_provider_dropdown')
.select('AWS',{ force: true })
.should('have.value', 'ec2')
.get('#cloud_provider_region_dropdown')
.select('eu-west-3',{ force: true })
.should('have.value', 'eu-west-3')
.get('#oc_version_dropdown')
.select('v4.1',{ force: true })
.should('have.value', '4.1.41')
.get('[data-cy=desired_subdomain_input]')
.clear()
.type('cypress_test')
.get('#persistent_storage_dropdown')
.select('50G',{ force: true })
.should('have.value', '50G')
.get('#cluster_size_dropdown')
.select('Small', { force: true })
.should('have.value', 'small');
.select('AWS', { force: true })
.should('have.value', 'ec2')
.get('#cloud_provider_region_dropdown')
.select('eu-west-3', { force: true })
.should('have.value', 'eu-west-3')
.get('#oc_version_dropdown')
.select('v4.1', { force: true })
.should('have.value', '4.1.41')
.get('[data-cy=desired_subdomain_input]')
.clear()
.type('cypress_test')
.get('#persistent_storage_dropdown')
.select('50G', { force: true })
.should('have.value', '50G')
.get('#cluster_size_dropdown')
.select('Small', { force: true })
.should('have.value', 'small');

cy.get('[data-cy=hosting_env_save]')
.click();
.click();

cy.get('.pf-c-alert__action > .pf-c-button')
.click();
.click();
});

it('Edit engagement users', () => {
Expand All @@ -159,27 +155,27 @@ describe('new engagement', () => {
}).as('saveCheck');

cy.get('button[data-cy=edit_user_button]')
.click();
.click();
cy.get('button[data-cy=add_new_user]')
.click();
.click();

cy.get('[data-cy=input_user_firstname]')
.clear()
.type('Sara')
.get('input[data-cy=input_user_lastname]')
.clear()
.type('Kim')
.get('input[data-cy=input_user_email]')
.type('[email protected]')
.get('#user_role_dropdown')
.select('developer', { force: true })
.should('have.value', 'developer');
.clear()
.type('Sara')
.get('input[data-cy=input_user_lastname]')
.clear()
.type('Kim')
.get('input[data-cy=input_user_email]')
.type('[email protected]')
.get('#user_role_dropdown')
.select('developer', { force: true })
.should('have.value', 'developer');

cy.get('button[data-cy=save_users]')
.click();
.click();

cy.get('.pf-c-alert__action > .pf-c-button')
.click();
.click();
});

it('Launch engagement', () => {
Expand All @@ -191,14 +187,14 @@ describe('new engagement', () => {
cy.route({ method: 'PUT', url: 'engagements/launch' }).as('launchEngagement');

cy.get('#nav-toggle')
.click();
.click();

cy.get('[data-cy=launch_button]')
.click();
.click();

cy.wait('@launchEngagement').should('have.property', 'status', 200);

cy.get('li > .pf-c-alert > .pf-c-alert__title')
.contains('You have successfully launched your engagement!')
.contains('You have successfully launched your engagement!')
});
});
Loading

0 comments on commit ae6e5b6

Please sign in to comment.