Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ This should be clean rancher if you want to run all the tests.
docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged -e CATTLE_BOOTSTRAP_PASSWORD=sa rancher/rancher:latest

# Run tests
export RANCHER_URL=https://127.0.0.1.nip.io/
# Tests can detect Rancher URL automatically if not set
# export RANCHER_URL=https://127.0.0.1.nip.io/
pw test --ui -x
```

Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/rancher/rancher-apps.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,15 @@ export class RancherAppsPage extends BasePage {

@step
async installChart(chart: Chart, options?: { questions?: () => Promise<void>, yamlPatch?: YAMLPatch, timeout?: number, navigate?: boolean }) {
// Apps grid was redesigned in Rancher 2.12
const card = this.page.locator('.grid > .item').or(this.page.locator('.app-chart-cards > .item-card'))
.filter({ has: this.page.getByRole('heading', { name: chart.title, exact: true }) })

// Select chart by title
if (options?.navigate !== false) {
await this.nav.explorer('Apps', 'Charts')
await expect(this.page.getByRole('heading', { name: 'Charts', exact: true })).toBeVisible()
await this.page.locator('.grid > .item').getByRole('heading', { name: chart.title, exact: true }).click()
await card.click()

if (chart.version) {
const versionPane = this.page.getByRole('heading', { name: 'Chart Versions', exact: true }).locator('..')
Expand Down