Minor: Fixed AUT test for DQ and testSuiteMultiPipeline (#17385)

This commit is contained in:
Shailesh Parmar 2024-08-11 18:01:12 +05:30 committed by GitHub
parent 0596c2e59b
commit eb3cddae4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 5 deletions

View File

@ -10,6 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getCurrentMillis } from '../../../src/utils/date-time/DateTimeUtils';
import { uuid } from '../../constants/constants';
import { EntityType } from '../../constants/Entity.interface';
import {
@ -217,6 +218,30 @@ const prepareDataQualityTestCasesViaREST = ({
testDefinition: 'tableColumnCountToBeBetween',
testSuite: testSuite.name,
},
}).then((response) => {
const testCaseFqn = response.body.fullyQualifiedName;
cy.request({
method: 'PUT',
url: `/api/v1/dataQuality/testCases/${testCaseFqn}/testCaseResult`,
headers: { Authorization: `Bearer ${token}` },
body: {
result:
'Found min=10001, max=27809 vs. the expected min=90001, max=96162.',
testCaseStatus: 'Failed',
testResultValue: [
{
name: 'minValueForMaxInCol',
value: '10001',
},
{
name: 'maxValueForMaxInCol',
value: '27809',
},
],
timestamp: getCurrentMillis(),
},
});
});
});
cy.request({
@ -246,11 +271,6 @@ const prepareDataQualityTestCasesViaREST = ({
})
);
});
triggerTestCasePipeline({
serviceName: serviceName,
tableName: tableName,
});
};
export const prepareDataQualityTestCases = (token: string) => {

View File

@ -30,6 +30,11 @@ test('TestSuite multi pipeline support', async ({ page }) => {
await test.step('Create a new pipeline', async () => {
await page.getByText('Profiler & Data Quality').click();
await page
.getByRole('menuitem', {
name: 'Table Profile',
})
.click();
await page.getByTestId('profiler-add-table-test-btn').click();
await page.getByTestId('test-case').click();
await page.getByTestId('test-case-name').clear();