Skip to content

Commit eb4f1b4

Browse files
Kfp 490 core tests pipeline (#29)
* KFP-490: core tests added to pipeline on dev * KFP-490: fix node version * KFP-490: added missing env * KFP-490: another env added * KFP-490: another env added2 * KFP-490: another env added3 * KFP-490: env variable sorted * KFP-490 local env hardcodes removed --------- Co-authored-by: Magdalena Kuziel-Radziwon <[email protected]>
1 parent b508055 commit eb4f1b4

File tree

52 files changed

+76
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+76
-76
lines changed

.github/workflows/deploy-to-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ jobs:
185185
working-directory: ./CoreDeployable
186186
env:
187187
TEST_ENVIRONMENT: dev
188-
TEST_BASE_URL: https://dev.core.giab.kainos-labs.com/
188+
TEST_URL: ${{ vars.TEST_BASE_URL }}
189189
TEST_HOME_PAGE_URL: https://www.kainos.com/
190190
TEST_API_URL: https://s4ucihjr0e.execute-api.eu-west-2.amazonaws.com
191-
191+
BUCKET_NAME: kainoscore-kfd-files-dev
192192

193193
run: |
194194
echo "Starting automated test execution against DEV environment..."

CoreDeployable/test/step_definitions/address_field_automated_tests/address_field_left_empty_tests.steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let formId: string;
77

88
When('The user has navigated to the address form service with an id {string}', async function (id: string) {
99
formId = id;
10-
await driver.get(`http://localhost:${port}/${formId}`);
10+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1111
});
1212

1313
When('I leave the {string} field empty on the address page', async function (field: string) {

CoreDeployable/test/step_definitions/backbutton_automated_tests/backbutton_automated_tests.steps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let page: string;
1010
When('I am on the {string} of the {string} form where a submit button is present', async function (pageId: string, id: string) {
1111
formId = id;
1212
page = pageId;
13-
await driver.get(`http://localhost:${port}/${formId}/${page}`);
13+
await driver.get(`${process.env.TEST_URL}/${formId}/${page}`);
1414
});
1515

1616
When('I press the submit button to go to the second page',async function(){
@@ -20,7 +20,7 @@ When('I press the submit button to go to the second page',async function(){
2020

2121
When('I confirm that i am on the next page of the form {string}',async function(pageId:string){
2222
page = pageId;
23-
let expectedUrl: string = `http://localhost:${port}/${formId}/${page}`;
23+
let expectedUrl: string = `${process.env.TEST_URL}/${formId}/${page}`;
2424
let actualUrl = await driver.getCurrentUrl();
2525
assert.equal(actualUrl, expectedUrl);
2626
});
@@ -31,7 +31,7 @@ When('I confirm that i am on the next page of the form {string}',async function(
3131

3232
Then('I am on the correct {string} page of the form', async function (pageId:string) {
3333
page = pageId;
34-
let expectedUrl: string = `http://localhost:${port}/${formId}/${page}`;
34+
let expectedUrl: string = `${process.env.TEST_URL}/${formId}/${page}`;
3535
let actualUrl = await driver.getCurrentUrl();
3636
assert.equal(actualUrl, expectedUrl);
3737
});

CoreDeployable/test/step_definitions/character_counter_automated_tests/character_counter_automated_tests.steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let formId: string;
88

99
When('I am currently on the {string} form with a text box', async function (id: string) {
1010
formId = id;
11-
await driver.get(`http://localhost:${port}/${formId}`);
11+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1212
},
1313
);
1414

CoreDeployable/test/step_definitions/conditional_logic_back_link_tests/conditional_logic_back_link_automated_test.steps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let formId: string;
88

99
Given('I am on the {string} service which has radio fields with conditional logic', async function (id: string) {
1010
formId = id;
11-
await driver.get(`http://localhost:${port}/${formId}`);
11+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1212
});
1313

1414
When('I select a {string} with conditional logic that is linked to a page', async function (radioField: string) {
@@ -28,7 +28,7 @@ When('I am on the next page and click the back link', async function () {
2828
});
2929

3030
Then('I should be taken back to the {string} page which is the first page of the service', async function (page:string) {
31-
let expectedUrl: string = `http://localhost:${port}/${formId}/${page}`;
31+
let expectedUrl: string = `${process.env.TEST_URL}/${formId}/${page}`;
3232
let actualUrl = await driver.getCurrentUrl();
3333
assert.equal(actualUrl, expectedUrl);
3434
});

CoreDeployable/test/step_definitions/conditional_logic_next_page_automated_tests/conditional_logic_radio_fields_happy_path.steps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let formId: string;
88

99
Given('The user is on the form with the ID {string} that has radio buttons with conditional logic', async function (id: string) {
1010
formId = id;
11-
await driver.get(`http://localhost:${port}/${formId}`);
11+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1212
});
1313

1414
When('I select a {string} radio field', async function (radioField: string) {
@@ -23,7 +23,7 @@ When('I select the save and continue button at the very bottom of the page to su
2323

2424

2525
Then('I should be taken to the right {string} of the form', async function (page:string) {
26-
let expectedUrl: string = `http://localhost:${port}/${formId}/${page}`;
26+
let expectedUrl: string = `${process.env.TEST_URL}/${formId}/${page}`;
2727
let actualUrl = await driver.getCurrentUrl();
2828
assert.equal(actualUrl, expectedUrl);
2929
});

CoreDeployable/test/step_definitions/creator.steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Given('I have a form service with id {string}', function (id: string) {
1111
});
1212

1313
When('I open the form page', async function () {
14-
await driver.get(`http://localhost:${port}/${formId}`);
14+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1515
});
1616

1717
When('I fill out the form', async function () {

CoreDeployable/test/step_definitions/date_input_automated_tests/date_input_invalid_input.steps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let formId: string;
77

88
Given('the user navigates to the form service with an id {string}', async function (id: string) {
99
formId = id;
10-
await driver.get(`http://localhost:${port}/${formId}`);
10+
await driver.get(`${process.env.TEST_URL}/${formId}`);
1111
});
1212

1313
When('I enter {string} into day, {string} into month and {string} into year field', async function (day: string, month: string, year: string) {

CoreDeployable/test/step_definitions/date_input_automated_tests/date_input_leaving_fields_blank_mandatory_false.steps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let formId: string;
77

88
When('I navigate in the {string} to the {string} of the form', async function (id: string, page: string) {
99
formId = id;
10-
await driver.get(`http://localhost:${port}/${formId}/${page}`);
10+
await driver.get(`${process.env.TEST_URL}/${formId}/${page}`);
1111
});
1212

1313
When('I use the button at the bottom of the page to submit without entering any values', async function () {
@@ -17,7 +17,7 @@ When('I use the button at the bottom of the page to submit without entering any
1717
});
1818

1919
Then('I should be brought to the {string} of the form', async function (nextPage: string) {
20-
const expectedUrl = `http://localhost:${port}/${formId}/${nextPage}`;
20+
const expectedUrl = `${process.env.TEST_URL}/${formId}/${nextPage}`;
2121
const actualUrl = await driver.getCurrentUrl();
2222
assert.equal(actualUrl, expectedUrl);
2323
});

CoreDeployable/test/step_definitions/dead_birds_form_automated_tests/dead_birds_form_backbutton_tests.steps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let page: string;
88

99
When('I am currently on the {string} of the system but I want to go back', async function (pageId: string) {
1010
page = pageId;
11-
await driver.get(`http://localhost:${port}/${formId}/${page}`);
11+
await driver.get(`${process.env.TEST_URL}/${formId}/${page}`);
1212
});
1313

1414
When('I click the back button on the fourth, third and second pages', async function () {
@@ -19,7 +19,7 @@ When('I click the back button on the fourth, third and second pages', async func
1919

2020
Then('I should be brought to the {string}', async function (pageId: string) {
2121
page = pageId;
22-
let expectedUrl: string = `http://localhost:${port}/${formId}/${page}`;
22+
let expectedUrl: string = `${process.env.TEST_URL}/${formId}/${page}`;
2323
let actualUrl = await driver.getCurrentUrl();
2424
assert.equal(actualUrl, expectedUrl);
2525
});

0 commit comments

Comments
 (0)