Skip to content

Commit

Permalink
Addresses nits to make tests more robust
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Mar 29, 2024
1 parent 2f7e07d commit 93721c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion public/apps/configuration/utils/display-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ export function renderCustomization(reserved: boolean, props: UIProps) {
<EuiIcon type={reserved ? 'lock' : 'pencil'} />
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiText className={props.cssClassName}>{reserved ? 'Reserved' : 'Custom'}</EuiText>
<EuiText
className={props.cssClassName}
data-test-subj={
reserved ? 'filter-reserved-action-groups' : 'filter-custom-action-groups'
}
>
{reserved ? 'Reserved' : 'Custom'}
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('Multi-datasources enabled', () => {
// Remote cluster auth
cy.get('[data-test-subj="dataSourceSelectableContextMenuHeaderLink"]').click();
cy.get('[title="9202"]').click();
cy.get('.panel-header-count').first().invoke('text').should('contain', '(2)');
cy.get('.panel-header-count').first().invoke('text').should('contain', '(6)');
});

it('Checks Users Tab', () => {
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('Multi-datasources enabled', () => {

// Create an action group
cy.get('[id="Create action group"]').click();
cy.contains('div.euiFlexItem > button', 'Create from blank').click();
cy.get('[id="create-from-blank"]').click();
cy.get('[data-test-subj="name-text"]')

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (macos-latest)

Do not use force on click and type calls

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (ubuntu-latest)

Do not use force on click and type calls

Check warning on line 161 in test/cypress/e2e/multi-datasources/multi_datasources_enabled.spec.js

View workflow job for this annotation

GitHub Actions / Run unit tests (windows-latest)

Do not use force on click and type calls
.focus()
.type('test_permission_ag', { force: true })
Expand All @@ -167,7 +167,7 @@ describe('Multi-datasources enabled', () => {

// Permission exists on the remote data source
cy.get('[data-text="Customization"]').click();
cy.contains('div.euiFilterSelect__items > button', 'Custom').click();
cy.get('[data-test-subj="filter-custom-action-groups"]').click();
cy.get('[data-test-subj="checkboxSelectRow-test_permission_ag"]').should('exist');

// Permission doesn't exist on local cluster
Expand Down

0 comments on commit 93721c8

Please sign in to comment.