aws-samples / pcluster-manager

Manage AWS ParallelCluster through an easy to use web interface
https://pcluster.cloud
Apache License 2.0
65 stars 27 forks source link

Fix wizard.spec.ts test to handle the case of an empty cluster list #410

Closed tmscarla closed 1 year ago

tmscarla commented 1 year ago

Description

The e2e test wizard.spec.ts is failing due to the fact that in case the cluster list is empty, two buttons named "Create Cluster" are shown, which leads the getByRole locator to resolve to two elements.

This PR aims to solve the disambiguation, by calling first() method on the locator before the click() operation takes place.

Furthermore, the actionTimeout parameter in Playwright config has been increased from 0 to 15s in order to avoid sporadic failures.

How Has This Been Tested?

References

PR Quality Checklist

In order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.