Skip to content

Commit 8367c82

Browse files
committed
Experimental fixes for automation failures.
Signed-off-by: Simon Viénot <simon.vienot@icloud.com>
1 parent 58bbe9e commit 8367c82

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/test-frontend.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,16 @@ jobs:
282282
283283
# Solo binds its localnet services to localhost on the runner.
284284
# Docker containers reach the host via the bridge gateway, so expose the ports there first.
285-
for port in 35211 38081; do
286-
sudo bash -c "nohup socat TCP-LISTEN:${port},bind=${DOCKER_HOST_GATEWAY},fork,reuseaddr TCP:127.0.0.1:${port} >/tmp/socat-${port}.log 2>&1 &"
287-
done
285+
sudo bash -c "nohup socat TCP-LISTEN:50211,bind=${DOCKER_HOST_GATEWAY},fork,reuseaddr TCP:127.0.0.1:35211 >/tmp/socat-50211.log 2>&1 &"
286+
sudo bash -c "nohup socat TCP-LISTEN:38081,bind=${DOCKER_HOST_GATEWAY},fork,reuseaddr TCP:127.0.0.1:38081 >/tmp/socat-38081.log 2>&1 &"
288287
289288
sleep 2
290289
291290
if ! curl -fsS "http://${DOCKER_HOST_GATEWAY}:38081/api/v1/network/nodes" >/dev/null 2>&1 || \
292-
! wait_for_tcp "${DOCKER_HOST_GATEWAY}" 35211; then
291+
! wait_for_tcp "${DOCKER_HOST_GATEWAY}" 50211; then
293292
echo "One or more Solo port proxies are not reachable on ${DOCKER_HOST_GATEWAY}" >&2
294293
ss -lnt || true
295-
sudo tail -n 50 /tmp/socat-35211.log || true
294+
sudo tail -n 50 /tmp/socat-50211.log || true
296295
sudo tail -n 50 /tmp/socat-38081.log || true
297296
exit 1
298297
fi

automation/pages/OrganizationPage.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class OrganizationPage extends BasePage {
102102
transactionHeaderSubmitButtonSelector = 'css=form button[type="submit"]';
103103
nextTransactionButtonSelector = 'button-next-org-transaction';
104104
cancelAddingOrganizationButtonSelector = 'button-cancel-adding-org';
105-
signAllTransactionsButtonSelector = 'button-sign-group';
105+
signAllTransactionsButtonSelector = '[data-testid="button-sign-group"] .main-button';
106106
confirmSignAllButtonSelector = 'button-sign-all-confirm';
107107
confirmCancelAllButtonSelector = 'button-cancel-all-confirm';
108108
confirmGroupActionButtonSelector = 'button-confirm-group-action';
@@ -1695,16 +1695,14 @@ export class OrganizationPage extends BasePage {
16951695
}
16961696

16971697
async clickOnSignAllTransactionsButton(holdTimeout: number = 600) {
1698-
// Experimental observation: Sign All button becomes visible but clicking is ineffective.
1699-
// => may be because button appears, disappears and re-appears
1700-
// => we wait a little bit before checking button visibility
1701-
// => to be revisited once button state computation has been re-worked in transaction group details.
1698+
// The group details page can re-render this button while its signable state settles.
17021699
await this.window.waitForTimeout(holdTimeout);
1703-
await this.waitForElementToBeVisible(
1700+
await this.clickWithRetryOnDetach(
17041701
this.signAllTransactionsButtonSelector,
1702+
null,
17051703
this.LONG_TIMEOUT * 2,
17061704
);
1707-
await this.click(this.signAllTransactionsButtonSelector);
1705+
await this.waitForElementToBeVisible(this.confirmSignAllButtonSelector, this.LONG_TIMEOUT);
17081706
}
17091707

17101708
private getConfirmGroupActionButtonSelector(modalTitle?: string) {

automation/tests/helpers/support/fileNetworkSupport.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export async function deleteFileFromNetwork(
3434
const operatorKey = PrivateKey.fromStringDer(LOCALNET_OPERATOR_PRIVATE_KEY_DER_HEX);
3535
const fileAdminKey = PrivateKey.fromStringDer(fileAdminPrivateKeyDerHex);
3636

37-
const client = Client.forLocalNode();
37+
const client = Client.forNetwork({
38+
'127.0.0.1:35211': '0.0.3',
39+
}).setLedgerId('3');
3840
client.setOperator(LOCALNET_OPERATOR_ACCOUNT_ID, operatorKey);
3941

4042
const signedTx = await new FileDeleteTransaction()

back-end/libs/common/src/utils/sdk/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export const LOCAL_NODE = 'local-node';
1010
export const getLocalClientNetwork = (env: string|undefined): Record<string, string> => {
1111
switch (env) {
1212
case 'test':
13-
return { '127.0.0.1:35211': '0.0.3' };
13+
return { '127.0.0.1:50211': '0.0.3' };
1414
default:
15-
return { 'host.docker.internal:35211': '0.0.3' };
15+
return { 'host.docker.internal:50211': '0.0.3' };
1616
}
1717
};
1818

0 commit comments

Comments
 (0)