cypress: fix failing cypress test (#10953)

This commit is contained in:
Shailesh Parmar 2023-04-06 17:52:11 +05:30 committed by GitHub
parent 059f53b0da
commit c45d889d5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -215,12 +215,12 @@ export const NEW_ADMIN = {
};
export const NEW_TAG_CATEGORY = {
name: 'TestCategory',
description: 'This is the TestCategory',
name: 'CypressClassification',
description: 'This is the CypressClassification',
};
export const NEW_TAG = {
name: 'test',
description: 'This is the Test tag',
name: 'CypressTag',
description: 'This is the CypressTag',
};
export const NEW_GLOSSARY = {

View File

@ -297,7 +297,7 @@ describe('Policy page should work properly', () => {
.click();
verifyResponseStatusCode('@updateRule', 200);
cy.reload();
verifyResponseStatusCode('@getSelectedPolicy', 200);
cy.url().should('include', policyName);

View File

@ -351,7 +351,9 @@ describe('Tags page should work', () => {
.contains(`#${NEW_TAG_CATEGORY.name}.${NEW_TAG.name}`)
.should('be.visible');
cy.get('[data-testid="filter-container-TestCategory.test"]')
cy.get(
`[data-testid="filter-container-${NEW_TAG_CATEGORY.name}.${NEW_TAG.name}"]`
)
.should('be.visible')
.find('[data-testid="checkbox"]')
.should('be.visible')