diff --git a/cypress/fixtures/attachments/organization_details/commercial-register-excerpt.pdf b/cypress/fixtures/attachments/organization_details/commercial-register-excerpt.pdf deleted file mode 100644 index 757bb1f36404ff475efeb6fda3350468de425004..0000000000000000000000000000000000000000 Binary files a/cypress/fixtures/attachments/organization_details/commercial-register-excerpt.pdf and /dev/null differ diff --git a/cypress/fixtures/attachments/organization_details/organization.json b/cypress/fixtures/attachments/organization_details/organization.json new file mode 100644 index 0000000000000000000000000000000000000000..6c6e9080a8a1b69783a7a35deafb0efe004273d8 --- /dev/null +++ b/cypress/fixtures/attachments/organization_details/organization.json @@ -0,0 +1,10 @@ +{ + "aisbl": true, + "city": "Berlin", + "country": "Germany", + "email": "chris.long@ultratendency.com", + "name": "Google Inc.", + "phone_number": "11223344", + "street_number": "Wall str. 12/3", + "zip": 334455 +} \ No newline at end of file diff --git a/cypress/fixtures/attachments/organization_details/organization2.json b/cypress/fixtures/attachments/organization_details/organization2.json new file mode 100644 index 0000000000000000000000000000000000000000..069197e5d08b7f5a72819cb9acffdce8434b0579 --- /dev/null +++ b/cypress/fixtures/attachments/organization_details/organization2.json @@ -0,0 +1,10 @@ +{ + "aisbl": true, + "city": "Berlin", + "country": "Germany", + "email": "chris.long2@ultratendency.com", + "name": "Google Inc.", + "phone_number": "11223344", + "street_number": "Wall str. 12/3", + "zip": 334455 +} \ No newline at end of file diff --git a/cypress/fixtures/attachments/organization_details/organization_invalid.json b/cypress/fixtures/attachments/organization_details/organization_invalid.json new file mode 100644 index 0000000000000000000000000000000000000000..7aac4f74b965ab70cce6c96cc07d32d9d2a72dfe --- /dev/null +++ b/cypress/fixtures/attachments/organization_details/organization_invalid.json @@ -0,0 +1,10 @@ +{ + "aisbl": true, + "city": "Berlin", + "country": "Germany", + "email": "chris.longultratendency.com", + "name": "Google Inc.", + "phone_number": "11223344", + "street_number": "Wall str. 12/3", + "zip": 334455 +} \ No newline at end of file diff --git a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration.feature b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration.feature index f77e45e916323afbeadabecd5d111effd230d9fb..b6d3ff857c83f049d74f2f9301457e93beaec08c 100644 --- a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration.feature +++ b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration.feature @@ -1,6 +1,6 @@ Feature: Anonymous user initiate the registration process -# Testsuite to test implementation of GAIAXPORTAL-22, GAIAXPORTAL-24, GAIAXPORTAL-25, GAIAXPORTAL-26 +# Testsuite to test implementation of GAIAXPORTAL-22, GAIAXPORTAL-24, GAIAXPORTAL-25 # GAIAXPORTAL-22 Scenario Outline: Step 1: Continue with checked Organization radio button @@ -48,23 +48,21 @@ Feature: Anonymous user initiate the registration process | cucumber | must | | have a | examples section | - # GAIAXPORTAL-24 + # GAIAXPORTAL-24, GAIAXPORTAL-25 Scenario Outline: Step 2: User uploads organization details Given User is at the home page When User clicks on Register link And User clicks on Organization radio button in overlay windows And User clicks Continue button - And User uploads organization details - And User completes organization field, '<organization>' - And User completes email field, '<email>' + And User uploads organization details, '<filePath>' And User clicks on checkbox for AISBL membership, '<isCheckBoxClicked>' And User clicks Continue button Then User is on Step 3 Examples: - | organization | email | isCheckBoxClicked | - | ExampleGmbH | info@exampleGmbh.de | true | - | AnotherGmbH | contact@anotherGmbh.org | false | + | isCheckBoxClicked | filePath | + | true | /attachments/organization_details/organization.json | + | false | /attachments/organization_details/organization2.json| # GAIAXPORTAL-24 Scenario Outline: Step 2: User uploads organization details with invalid email address @@ -73,14 +71,12 @@ Feature: Anonymous user initiate the registration process When User clicks on Register link And User clicks on Organization radio button in overlay windows And User clicks Continue button - And User uploads organization details - And User completes organization field, '<organization>' - And User completes email field, '<email>' + And User uploads organization details, '<filePath>' And User clicks on checkbox for AISBL membership, '<isCheckBoxClicked>' Then User is not able to click Continue button Examples: - | organization | email | isCheckBoxClicked | - | ExampleGmbH | infoexampleGmbh.de | true | + | isCheckBoxClicked | filePath | + | true | /attachments/organization_details/organization_invalid.json | # GAIAXPORTAL-24 Scenario Outline: Step 2: User uploads no organization details @@ -89,13 +85,13 @@ Feature: Anonymous user initiate the registration process When User clicks on Register link And User clicks on Organization radio button in overlay windows And User clicks Continue button - And User uploads organization details - And User completes email field, '<email>' + And User uploads organization details, '<filePath>' + And User clears organization field And User clicks on checkbox for AISBL membership, '<isCheckBoxClicked>' Then User is not able to click Continue button Examples: - | organization | email | isCheckBoxClicked | - | Example GmbH | info@exampleGmbh.de | true | + | isCheckBoxClicked | filePath | + | true | /attachments/organization_details/organization.json | # GAIAXPORTAL-24 Scenario Outline: TODO: Step 2: User selects express registration via DID diff --git a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration/organization_registration.js b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration/organization_registration.js index ae08ea5ff8d12caf0767123064a13bce57e8b642..14c82769cd828d9a053f2bbe89ece302f6e4648e 100644 --- a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration/organization_registration.js +++ b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.1 Registration process of an organization/organization_registration/organization_registration.js @@ -32,7 +32,7 @@ And('User clicks Continue button', () => { cy.get('.formButtons') .get('button:contains("Continue")') .should('be.enabled') - .should('be.visible', {timeout: 10000}) + .should('be.visible', {timeout: 60000}) .click() }) @@ -46,15 +46,13 @@ Then('User is on Step 2', () => { }) Then('User is on Step 3', () => { - cy.url().should('be.equal', `${hostUrl}/register/organization/confirm_registration`) + cy.url().should('be.equal', `${hostUrl}/register/email?formType=organization`) + cy.contains('...almost done: please check your email inbox now. We have sent you a message with a confirmation link.') }) -And('User uploads organization details', () => { - const filePath = '/attachments/organization_details/commercial-register-excerpt.pdf' +And('User uploads organization details, {string}', (filePath) => { cy.get('input[type="file"]') .attachFile(filePath, {allowEmpty: true}) - //cy.get('#file-submit').click() - //cy.get('#uploaded-files').contains('commercial-register-excerpt.pdf') }) And('User completes organization field, {string}', (organization) => { @@ -63,6 +61,12 @@ And('User completes organization field, {string}', (organization) => { .type(organization) }) +And('User clears organization field', () => { + cy.get('.registerInputs') + .get('input[name=name]') + .clear() +}) + And('User completes email field, {string}', (email) => { cy.get('.registerInputs') .get('input[name=email]') diff --git a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration.feature b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration.feature index aec301829c9de659a9a93e4b627fa4765555ec8e..0d9c90ba4ca77e5a7d74d33cd56e1449069f5b52 100644 --- a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration.feature +++ b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration.feature @@ -1,6 +1,6 @@ Feature: Anonymous user would like to register as normal user in the portal -# Testsuite to test implementation of GAIAXPORTAL-28 +# Testsuite to test implementation of GAIAXPORTAL-28, GAIAXPORTAL-29 # GAIAXPORTAL-28 Scenario Outline: Step 1: Continue with checked User radio button @@ -27,7 +27,7 @@ Feature: Anonymous user would like to register as normal user in the portal | cucumber | must | | have a | examples section | - # GAIAXPORTAL-28 + # GAIAXPORTAL-28, GAIAXPORTAL-29 Scenario Outline: Step 2: User completes fields with valid personal address informations Given User is at the home page @@ -44,14 +44,14 @@ Feature: Anonymous user would like to register as normal user in the portal | surname | lastname | email | phone | street | zip | city | country | | Hans | Franz | hfranz@google.net | 0391/87654321 | Mega-Ring 99a | 999-9999 | Göteborg | Sweden | | René | Schuster | schuster@google.de | 0394 07567234 | 89 Av. Jean Moulin | A9A 9A | Vendôme | France | - | François | Cézanne | fcez@yahoo.uk | (01525) 007550 | 1 Oakwood Cottages | 987653 | York | UK | + | François | Cézanne | fcez@yahoo.at | (01525) 007550 | 1 Oakwood Cottages | 987653 | York | UK | | Alex | Ander | hfranz@yahoo.ru | +380432699717 | Hliba Uspenskoho St, 69 | A99999 | Баранавічы | Belarus | | Tao | Xie | taotao@xiaomi.cn | 0086 135 16821234 | Fu Cheng Lu Nan Er Jie | AA67889 | 北京市 | ä¸åŽäººæ°‘共和国 | | Christian | Lang | c.lang@mail.com | 0176-12345678 | Ringstr. 3 | 39104 | Hamburg | Germany | # GAIAXPORTAL-28 - Scenario Outline: TODO: Step 2: User completes fields with invalid personal address informations - # What should happens when completed data are invalid? + Scenario Outline: Step 2: User completes fields with invalid personal address informations + Given User is at the home page When User clicks on Register link And User clicks on User radio button in overlay windows diff --git a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration/user_registration.js b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration/user_registration.js index 23c558baa7b92e5fd10228d1d1170b3892ec68b7..ac0670d1b720a409412f2ac75bc2076f898fcc24 100644 --- a/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration/user_registration.js +++ b/cypress/integration/2 User Interfaces/2.2 Registration process/2.2.2 Registration process of a natural person/user_registration/user_registration.js @@ -76,10 +76,7 @@ And('User clicks on Registration via DID button', () => { }) Then('User gets information about invalid data', () => { - // TODO: - cy.get('.registerInputs:invalid') - .invoke('prop', 'validationMessage') - .should('eq', 'Value must be less than or equal to 5.') + cy.get('input:invalid').should('have.length', 1) }) Then('User is on Step 2', () => { @@ -89,5 +86,6 @@ Then('User is on Step 2', () => { Then('User is on Step 3', () => { cy.url() - .should('be.equal', `${hostUrl}/register/user/finish_registration`) + .should('be.equal', `${hostUrl}/register/email?formType=user`) + cy.contains('...almost done: please check your email inbox now. We have sent you a message with a confirmation link.') })