Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/e2e/parallel/registration_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,11 @@ func TestUIConfig(t *testing.T) {
workatoWebHookURL, ok := response["workatoWebHookURL"].(string)
require.True(t, ok)
assert.Equal(t, "https://webhooks.testwebhook", workatoWebHookURL)

// verify that disabledIntegrations is present and is an array
disabledIntegrations, ok := response["disabledIntegrations"]
require.True(t, ok, "disabledIntegrations field should be present in uiconfig response")
require.IsType(t, []interface{}{}, disabledIntegrations, "disabledIntegrations should be an array")
Comment on lines +1019 to +1022
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Also assert that disabledIntegrations is empty.

The PR description states the test should verify both that the field is present and that it is empty (since E2E tests shouldn't have any integrations disabled). The current assertions only check presence and type — consider adding an emptiness check to match the stated intent and catch regressions where an integration gets inadvertently disabled in the E2E config.

Proposed change
 		// verify that disabledIntegrations is present and is an array
 		disabledIntegrations, ok := response["disabledIntegrations"]
 		require.True(t, ok, "disabledIntegrations field should be present in uiconfig response")
 		require.IsType(t, []interface{}{}, disabledIntegrations, "disabledIntegrations should be an array")
+		assert.Empty(t, disabledIntegrations.([]interface{}), "E2E tests should not have any disabled integrations")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// verify that disabledIntegrations is present and is an array
disabledIntegrations, ok := response["disabledIntegrations"]
require.True(t, ok, "disabledIntegrations field should be present in uiconfig response")
require.IsType(t, []interface{}{}, disabledIntegrations, "disabledIntegrations should be an array")
// verify that disabledIntegrations is present and is an array
disabledIntegrations, ok := response["disabledIntegrations"]
require.True(t, ok, "disabledIntegrations field should be present in uiconfig response")
require.IsType(t, []interface{}{}, disabledIntegrations, "disabledIntegrations should be an array")
assert.Empty(t, disabledIntegrations.([]interface{}), "E2E tests should not have any disabled integrations")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/e2e/parallel/registration_service_test.go` around lines 1019 - 1022, The
test currently checks that the uiconfig response contains "disabledIntegrations"
and that it's an array (variable disabledIntegrations); add an assertion that
this array is empty to match the test intent. Update the assertions after the
IsType check (e.g., use require.Empty(t, disabledIntegrations) or require.Len(t,
disabledIntegrations, 0)) so the test fails if any integration is unexpectedly
disabled.

})
}

Expand Down
Loading