Skip to content

Commit

Permalink
Fix testBuild tests
Browse files Browse the repository at this point in the history
Tests were failing after the recent changes in main

See: #13604
  • Loading branch information
radoslawkrzemien committed Jul 3, 2023
1 parent e0e7a63 commit f3865a4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 58 deletions.
16 changes: 2 additions & 14 deletions workflow_tests/assertions/testBuildAssertions.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
const utils = require('../utils/utils');

const assertValidateActorJobExecuted = (workflowResult, actor = 'Dummy Actor', pullRequestNumber = '1234', didExecute = true) => {
const assertValidateActorJobExecuted = (workflowResult, pullRequestNumber = '1234', didExecute = true) => {
const steps = [
utils.createStepAssertion(
'Is team member',
true,
null,
'VALIDATEACTOR',
'Is team member',
[
{key: 'GITHUB_TOKEN', value: '***'},
{key: 'username', value: actor},
{key: 'team', value: 'Expensify/expensify'},
],
[],
),
utils.createStepAssertion('Is Expensify employee', true, null, 'VALIDATEACTOR', 'Is Expensify employee', [], [{key: 'GITHUB_TOKEN', value: '***'}]),
utils.createStepAssertion(
'Set HAS_READY_TO_BUILD_LABEL flag',
true,
Expand Down
8 changes: 4 additions & 4 deletions workflow_tests/mocks/testBuildMocks.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const utils = require('../utils/utils');

// validateactor
const TESTBUILD__VALIDATEACTOR__IS_TEAM_MEMBER__TRUE__STEP_MOCK = utils.createMockStep('Is team member', 'Is team member', 'VALIDATEACTOR', ['GITHUB_TOKEN', 'username', 'team'], [], {
isTeamMember: true,
const TESTBUILD__VALIDATEACTOR__IS_TEAM_MEMBER__TRUE__STEP_MOCK = utils.createMockStep('Is Expensify employee', 'Is Expensify employee', 'VALIDATEACTOR', [], ['GITHUB_TOKEN'], {
IS_EXPENSIFY_EMPLOYEE: true,
});
const TESTBUILD__VALIDATEACTOR__IS_TEAM_MEMBER__FALSE__STEP_MOCK = utils.createMockStep('Is team member', 'Is team member', 'VALIDATEACTOR', ['GITHUB_TOKEN', 'username', 'team'], [], {
isTeamMember: false,
const TESTBUILD__VALIDATEACTOR__IS_TEAM_MEMBER__FALSE__STEP_MOCK = utils.createMockStep('Is Expensify employee', 'Is Expensify employee', 'VALIDATEACTOR', [], ['GITHUB_TOKEN'], {
IS_EXPENSIFY_EMPLOYEE: false,
});
const TESTBUILD__VALIDATEACTOR__SET_HAS_READY_TO_BUILD_LABEL_FLAG__TRUE__STEP_MOCK = utils.createMockStep(
'Set HAS_READY_TO_BUILD_LABEL flag',
Expand Down
Loading

0 comments on commit f3865a4

Please sign in to comment.