Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FSADT1-842): full test external application #556

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
278b1a8
test: add initial client application form tests
fterra-encora Aug 7, 2023
26ec80d
test: add business name selection cases
fterra-encora Aug 9, 2023
3e5cc79
fix: redirect to the proper route based on the login type
fterra-encora Aug 9, 2023
57ca308
test: organize step code in a reusable way
fterra-encora Aug 9, 2023
cc6f174
test: houseclean tests code
fterra-encora Aug 10, 2023
771fa50
test: add abort application feature
fterra-encora Aug 10, 2023
8437a66
Merge branch 'main' into feat/cypress/FSADT1-842
paulushcgcj Aug 14, 2023
c160d14
fix: get the domain to be set in the cookie dynamically
fterra-encora Aug 14, 2023
6cf9559
Merge branch 'main' into feat/cypress/FSADT1-842
fterra-encora Aug 14, 2023
e48b979
fix: stub requests to the backend
fterra-encora Aug 14, 2023
4056bc4
chore: replace baseUrl on local tests to localhost
fterra-encora Aug 14, 2023
9d98382
test: allow some time to follow two redirections
fterra-encora Aug 14, 2023
f4fb44c
test: increase time for the logout
fterra-encora Aug 14, 2023
a87cae7
test: intercept and assert the logout route
fterra-encora Aug 15, 2023
818e347
test: use data from the real backend
fterra-encora Aug 18, 2023
d608202
Merge branch 'main' into feat/cypress/FSADT1-842
paulushcgcj Aug 22, 2023
f0bf4ee
test: move utility code to a new function
fterra-encora Aug 18, 2023
e56a890
test: add commands towards a complete flow test
fterra-encora Aug 23, 2023
f5ea51b
Merge branch 'main' into feat/cypress/FSADT1-842
fterra-encora Aug 23, 2023
ecb867c
test: complete contacts step
fterra-encora Aug 23, 2023
8cc47c0
test: check information in the review step
fterra-encora Aug 24, 2023
94f0e98
test: submit and intercept
fterra-encora Aug 25, 2023
f129dd0
test: check information sent to the backend
fterra-encora Aug 25, 2023
0e0f9ab
Merge branch 'main' into feat/cypress/FSADT1-842
paulushcgcj Aug 29, 2023
eb80ed1
test: assert submitted businessType
fterra-encora Aug 28, 2023
1bf52aa
test: use indexes for multi-value fields
fterra-encora Aug 29, 2023
93ec423
test: add typeWait command
fterra-encora Aug 29, 2023
0e296ec
test: update tests
fterra-encora Aug 29, 2023
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
3 changes: 2 additions & 1 deletion cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ export default defineConfig({
specPattern: "**/*.feature",
setupNodeEvents,
},
});
includeShadowDom: true,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Feature: Business Information: BC registered business: Abort application

Background: List of business names is presented
Given I navigate to the client application form
And the button Next is disabled
And I select the option that says I have a BC registered business

Scenario: Business which is not in good standing
Given I type in "bad" in the business name input
And I select "BAD HORSE INC" from the filtered list of businesses
Then a notification for the business being 'Not in good standing' is displayed
And the button 'End application and logout' is displayed
When I click the button 'End application and logout'
Then I am redirected to the logout route

Scenario: Business which already has a client number
Given I type in "dupp" in the business name input
And I select "DUPP MEDIA INC" from the filtered list of businesses
Then a notification saying that 'Client already exists' is displayed
And the button 'Receive email and logout' is displayed
When I click the button 'Receive email and logout'
Then I am redirected to the logout route
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/// <reference types="cypress-get-by-label" />
import "cypress-get-by-label/commands";
import "./common";
import "./business-information-bc-registered-business";
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Feature: Business Information: BC registered business

Background: List of business names is presented
Given I navigate to the client application form
And the button Next is disabled
And I select the option that says I have a BC registered business

# Scenario: Business in good standing
# When I type in "good soft" in the business name input
# And I select "GOOD SOFTWARE INC" from the filtered list of businesses
# Then the button Next is enabled

Scenario: Business data not found in the BC Registries
When I type in "missing link" in the business name input
And I select "MISSING LINK FENCE LTD" from the filtered list of businesses
Then the button Next is enabled
When I click the button Next
Then I get to the Address tab
And the button Next is disabled
When the list of countries finishes loading
And I type in "3219 34 Ave SE Calgary" in the Street address
And I select the Street address that contains "3219 34 Ave SE Calgary" from the list
Then the Street address gets updated to "3219 34 Ave SE"
And the City gets updated to "Calgary"
And the Province gets updated to "Alberta"
And the Postal code gets updated to "T2B2M6"
And the button Next is enabled
When I click the button Next
Then I get to the Contacts tab
And the button Next is disabled
When I select the Address name "Mailing Address"
And I select the Primary role "Billing"
And I type in "7804146040" as Phone number
Then the button Next is enabled
When I click the button Next
Then I get to the Review tab
And the displayed Business information match the provided information
And the displayed Address information match the provided information
And the displayed Contacts information match the provided information
And the button Submit application is enabled
When I click the button Submit application
Then the provided information is sent to the backend
And I get to the Application submitted page
Loading