Skip to content

Commit

Permalink
updates to failing text
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh committed Aug 21, 2024
1 parent 48752e3 commit 6240774
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions cypress/e2e/awx/infrastructure/instances/instances.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,14 @@ cyLabel(['upstream'], () => {
cy.getByDataCy('associate-peer').click();
cy.get('[data-ouia-component-type="PF5/ModalContent"]').within(() => {
cy.get('header').contains('Select Peer Addresses');
cy.get('button').contains('Associate peer(s)').should('have.attr', 'aria-disabled', 'true');
cy.get('button').contains('Associate peers').should('have.attr', 'aria-disabled', 'true');
cy.filterTableBySingleText(instanceToAssociate.hostname, true);
cy.intercept('GET', awxAPI`/instances/${instanceToAssociate.id.toString()}/`).as(
'instanceA'
);
cy.getByDataCy('checkbox-column-cell').find('input').click();
cy.wait('@instanceA');
cy.get('button').contains('Associate peer(s)').click();
cy.get('button').contains('Associate peers').click();
cy.get('button').contains('Close').click();
});
cy.wait('@associatePeer')
Expand Down Expand Up @@ -379,11 +379,13 @@ cyLabel(['upstream'], () => {
cy.intercept('PATCH', awxAPI`/instances/*/`).as('disassociatePeer');
cy.get('[data-ouia-component-type="PF5/ModalContent"]').within(() => {
cy.get('header').contains('Disassociate peers');
cy.get('button').contains('Disassociate peer').should('have.attr', 'aria-disabled', 'true');
cy.get('button')
.contains('Disassociate peers')
.should('have.attr', 'aria-disabled', 'true');
cy.getByDataCy('address-column-cell').should('have.text', instanceToAssociate.hostname);
cy.get('input[id="confirm"]').click();
cy.get('button')
.contains('Disassociate peer')
.contains('Disassociate peers')
.should('have.attr', 'aria-disabled', 'false')
.click();
});
Expand Down
8 changes: 4 additions & 4 deletions frontend/awx/administration/instances/InstancePeers.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ButtonVariant } from '@patternfly/react-core';
import { MinusCircleIcon, PlusCircleIcon, PlusIcon } from '@patternfly/react-icons';
import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons';
import { useTranslation } from 'react-i18next';
import { useParams } from 'react-router-dom';
import { IPageAction, PageActionSelection, PageActionType, PageTable } from '../../../../framework';
Expand Down Expand Up @@ -61,8 +61,8 @@ export function ResourcePeersList(props: { url: string }) {
selection: PageActionSelection.None,
variant: ButtonVariant.primary,
isPinned: true,
icon: PlusIcon,
label: t('Associate'),
icon: PlusCircleIcon,
label: t('Associate peers'),
onClick: () =>
openPeerInstanceModal({ onPeer: associatePeerToInstance, instanceId: id ?? '' }),
},
Expand All @@ -72,7 +72,7 @@ export function ResourcePeersList(props: { url: string }) {
selection: PageActionSelection.Multiple,
variant: ButtonVariant.primary,
icon: MinusCircleIcon,
label: t('Disassociate'),
label: t('Disassociate peers'),
onClick: (peers: Peer[]) => disassociatePeer(peers),
isDanger: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function useDisassociatePeer(onComplete: (peers: Peer[]) => void, instanc
: t('Yes, I confirm that I want to disassociate these {{count}} peers.', {
count: peersToRemove.length,
}),
actionButtonText: t('Disassociate peer', { count: peersToRemove.length }),
actionButtonText: t('Disassociate peers', { count: peersToRemove.length }),
items: peersToRemove.sort((l, r) => compareStrings(l.name, r.name)),
keyFn: getItemKey,
isDanger: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function PeerInstanceModal(props: PeerInstanceModalProps) {
toolbarFilters={toolbarFilters}
tableColumns={tableColumns}
view={view}
confirmText={t('Associate peer(s)')}
confirmText={t('Associate peers')}
/>
);
}
Expand Down

0 comments on commit 6240774

Please sign in to comment.