-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-0.2.0' into feat/hamed-save-alt-email
- Loading branch information
Showing
25 changed files
with
349 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 14 additions & 3 deletions
17
frontend/cypress/e2e/Pages/ComplianceReport/ComplianceReportManagement.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
Feature: Compliance Report Management | ||
|
||
Scenario: Supplier saves a draft compliance report | ||
Given the supplier is on the login page | ||
When the supplier logs in with valid credentials | ||
And the supplier navigates to the compliance reports page | ||
Given the user is on the login page | ||
And the supplier logs in with valid credentials | ||
And they navigate to the compliance reports page | ||
And the supplier creates a new compliance report | ||
Then the compliance report introduction is shown | ||
When the supplier navigates to the fuel supply page | ||
And the supplier enters a valid fuel supply row | ||
And saves and returns to the report | ||
Then the compliance report summary includes the quantity | ||
When the supplier fills out line 6 | ||
Then it should round the amount to 25 | ||
When the supplier accepts the agreement | ||
And the supplier submits the report | ||
Then the status should change to Submitted | ||
|
||
Scenario: Analyst logs in to review a compliance report | ||
Given the user is on the login page | ||
And the analyst logs in with valid credentials | ||
And they navigate to the compliance reports page | ||
Then they see the previously submitted report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,39 +25,39 @@ When('the IDIR user logs in with valid credentials', () => { | |
}) | ||
|
||
When('the IDIR user navigates to the user creation page', () => { | ||
cy.get('a[href="/admin"]').click() | ||
cy.url().should('include', '/admin/users') | ||
cy.contains('New user').click() | ||
cy.url().should('include', '/admin/users/add-user') | ||
cy.get('a[href="/admin"]').click() | ||
cy.url().should('include', '/admin/users') | ||
cy.contains('New user').click() | ||
cy.url().should('include', '/admin/users/add-user') | ||
}) | ||
|
||
When('the IDIR user fills out the form with valid data', () => { | ||
cy.get('input[id="firstName"]').type('John') | ||
cy.get('input[id="lastName"]').type('Doe') | ||
cy.get('input[id="jobTitle"]').type('Senior Analyst') | ||
cy.get('input[id="userName"]').type('johndoe') | ||
cy.get('input[id="keycloakEmail"]').type('[email protected]') | ||
cy.get('input[id="phone"]').type('1234567890') | ||
cy.get('input[id="mobilePhone"]').type('0987654321') | ||
cy.get('input[id="firstName"]').type('John') | ||
cy.get('input[id="lastName"]').type('Doe') | ||
cy.get('input[id="jobTitle"]').type('Senior Analyst') | ||
cy.get('input[id="userName"]').type('johndoe') | ||
cy.get('input[id="keycloakEmail"]').type('[email protected]') | ||
cy.get('input[id="phone"]').type('1234567890') | ||
cy.get('input[id="mobilePhone"]').type('0987654321') | ||
|
||
// Select the Analyst role | ||
cy.get('input[type="radio"][value="analyst"]').check() | ||
// Select the Analyst role | ||
cy.get('input[type="radio"][value="analyst"]').check() | ||
}) | ||
|
||
When('the IDIR user submits the form', () => { | ||
cy.get('button[data-test="saveUser"]').click() | ||
cy.get('button[data-test="saveUser"]').click() | ||
}) | ||
|
||
Then('a success message is displayed', () => { | ||
cy.get("[data-test='alert-box'] .MuiBox-root").should( | ||
'contain', | ||
'User has been successfully saved.' | ||
) | ||
cy.get("[data-test='alert-box'] .MuiBox-root").should( | ||
'contain', | ||
'User has been successfully saved.' | ||
) | ||
}) | ||
|
||
Then('the new user appears in the user list', () => { | ||
cy.visit('/admin/users') | ||
cy.contains('a', Cypress.env('[email protected]')).should('be.visible') | ||
cy.visit('/admin/users') | ||
cy.contains('a', Cypress.env('[email protected]')).should('be.visible') | ||
}) | ||
|
||
// Test for validation error | ||
|
@@ -75,7 +75,7 @@ When('the IDIR user fills out the form with invalid data', () => { | |
}) | ||
|
||
Then('an error message is displayed for validation', () => { | ||
cy.get('#userName-helper-text').should('contain', 'User name is required') | ||
cy.get('#userName-helper-text').should('contain', 'User name is required') | ||
}) | ||
|
||
// Cleanup after the test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.