Skip to content

Commit

Permalink
fix: resolve various browser test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast authored Oct 16, 2023
1 parent 4fd815e commit ccdce19
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
34 changes: 18 additions & 16 deletions azure-pipelines/helsinkilisa-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
trigger: none

# Pull request (PR) triggers cause a pipeline to run whenever a pull request is
# opened with one of the specified target branches, or when updates are made to
# opened with one of the specified target branches, or when updates are made to
# such a pull request.
#
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# GitHub creates a new ref when a pull request is created. The ref points to a
# merge commit, which is the merged code between the source and target branches
# of the pull request.
#
# Opt out of pull request validation
# Opt out of pull request validation
pr:
# PR target branch
branches:
include:
- main
- main
paths:
include:
- azure-pipelines/helsinkilisa-review.yml
Expand All @@ -44,22 +44,24 @@ pool: Default

resources:
repositories:
# Azure DevOps repository
- repository: yjdh-helsinkilisa-pipelines
type: git
# Azure DevOps project/repository
name: yjdh-helsinkilisa/yjdh-helsinkilisa-pipelines
# Azure DevOps repository
- repository: yjdh-helsinkilisa-pipelines
type: git
# Azure DevOps project/repository
name: yjdh-helsinkilisa/yjdh-helsinkilisa-pipelines

extends:
# Filename in Azure DevOps Repository (note possible -ui or -api)
# Django example: azure-pipelines-PROJECTNAME-api-release.yml
# Drupal example: azure-pipelines-drupal-release.yml
template: azure-pipelines-helsinkilisa-review.yml@yjdh-helsinkilisa-pipelines
template:
azure-pipelines-helsinkilisa-review.yml@yjdh-helsinkilisa-pipelines
# Application build arguments and config map values as key value pairs.
# The values here will override the values defined in the yjdh-benefit-pipelines repository.
# for example
# parameters:
# buildArgs:
# NEXT_PUBLIC_DEBUG: 0
# configMap: # pod environment variables
# DEBUG: 0
parameters:
configMap: # pod environment variables
LOAD_DEFAULT_TERMS: 1
LOAD_FIXTURES: 1
# buildArgs:
# NEXT_PUBLIC_DEBUG: 0
20 changes: 9 additions & 11 deletions frontend/benefit/applicant/browser-tests/pages/company.testcafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,13 @@ test('New application', async () => {
const step5 = new Step5(form);
await step5.isLoaded();

/*
* TODO: CI crashes on these, have to see
* what's up on the specific testbuild
*/
// await step5.fieldsExistFor('company');
// await step5.clickSubmit();

// const step6 = new Step6();
// await step6.checkApplicantTerms();
// await step6.clickSubmit();
// await step6.isShowingSubmitSuccess();
await step5.fieldsExistFor('company');
await step5.clickSubmit();

const step6 = new Step6();
await step6.isLoaded();

await step6.checkApplicantTerms();
await step6.clickSubmit();
await step6.isShowingSubmitSuccess();
});
3 changes: 0 additions & 3 deletions frontend/benefit/applicant/browser-tests/utils/fieldMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ const formatFloatToCurrency = (
export const mapRequiredForm = (
form: ApplicationFormData
): ApplicationField[] => [
{ testId: 'application-field-companyName', value: 'Demo I. Haanpää Oy' },
{ testId: 'application-field-companyBusinessId', value: '0877830-0' },
{ testId: 'application-field-companyAddress', value: 'Vasaratie 4 A 3' },
{
testId: 'application-field-companyBankAccountNumber',
value: friendlyFormatIBAN(`FI${form.organization.iban}`),
Expand Down

0 comments on commit ccdce19

Please sign in to comment.