Skip to content

Commit

Permalink
fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosampler committed Oct 3, 2024
1 parent 5c6d201 commit b40f0e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/website/cypress/step-definitions/stage-txns-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { When, Then } from '@badeball/cypress-cucumber-preprocessor';
When('User types and select the safe {string}', (text: string) => {
cy.get('input[role="combobox"]').type(text);
cy.get('input[role="combobox"]').type('{enter}');

const chainId = text.split(':')[0];
const address = text.split(':')[1];

cy.get('#selected-safe-container').should(($container) => {
expect($container).to.exist;
expect($container).to.contain(address.slice(0, 6));
expect($container).to.contain(address.slice(-4));
expect($container).to.contain(chainId);
});
});

When('User closes the queue txns drawer', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/features/Deploy/SafeAddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function SelectedOption({
}: SingleValueProps<SafeOption> & { selectProps?: { onDeleteOption?: any } }) {
return (
<chakraComponents.SingleValue {...props}>
<Flex justifyContent="space-between">
<Flex justifyContent="space-between" id="selected-safe-container">
{/* @notice: Tooltip is not working for this component */}
<Tooltip
label={props.data.value}
Expand Down

0 comments on commit b40f0e9

Please sign in to comment.