Baoyuantop commented on code in PR #3250: URL: https://github.com/apache/apisix-dashboard/pull/3250#discussion_r2532522863
########## e2e/tests/consumer_groups.crud-required-fields.spec.ts: ########## @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { consumerGroupsPom } from '@e2e/pom/consumer_groups'; +import { e2eReq } from '@e2e/utils/req'; +import { test } from '@e2e/utils/test'; +import { expect } from '@playwright/test'; + +import { + deleteAllConsumerGroups, + putConsumerGroupReq, +} from '@/apis/consumer_groups'; +import type { APISIXType } from '@/types/schema/apisix'; + +test.beforeAll(async () => { + await deleteAllConsumerGroups(e2eReq); +}); + +test('should CRUD Consumer Group with required fields', async ({ page }) => { + const testId = 'test-consumer-group-required'; + const consumerGroupData: APISIXType['ConsumerGroupPut'] = { + id: testId, + plugins: {}, // plugins is required but can be empty object + }; + + await test.step('create consumer group via API', async () => { + // Create via API since UI requires manual plugin selection + await putConsumerGroupReq(e2eReq, consumerGroupData); Review Comment: Requires creation via the UI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
