Skip to content

Commit

Permalink
tests: fix resources selector
Browse files Browse the repository at this point in the history
  • Loading branch information
sleeping-h committed Feb 27, 2024
1 parent a40f8a4 commit ed9b197
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions playwright/ci-test/tests/02-download-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ test('download page', async ({ page }) => {
await expect(page.locator('#sidebar').getByRole('link', { name: 'Resources', exact: true })).toBeVisible();
await expect(page.locator('#sidebar div').filter({ hasText: 'Resources' }).locator('span')).toBeVisible();
await page.locator('#sidebar div').filter({ hasText: 'Resources' }).locator('span').click();
await expect(page.locator('#ul-32').getByRole('link', { name: 'QGIS resources' })).toBeVisible();
await expect(page.locator('#ul-26').getByRole('link', { name: 'QGIS resources' })).toBeVisible();
await page.getByRole('button', { name: 'Skip it and go to download' }).click();
await expect(page.getByRole('heading', { name: 'Download QGIS for your' })).toBeVisible();
await page.getByRole('heading', { name: 'Other platforms' }).click();
await expect(page.getByRole('heading', { name: 'Other platforms' })).toBeVisible();
});
});
34 changes: 17 additions & 17 deletions playwright/ci-test/tests/06-resources-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ test('resources pages', async ({ page }) => {
await expect(page.getByRole('link', { name: 'HTML zip of the manuals' })).toBeVisible();
await expect(page.getByText('Support ¶ The QGIS community')).toBeVisible();
await expect(page.getByRole('link', { name: 'View support options' })).toBeVisible();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Installation guide' })).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Installation guide' }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Installation guide' })).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Installation guide' }).click();
await expect(page.getByText('QGIS Installers ¶ How to')).toBeVisible();
await expect(page.locator('#qgis-installers')).toContainText('QGIS Installers');
await expect(page.getByText('How to obtain QGIS?')).toBeVisible();
Expand Down Expand Up @@ -186,10 +186,10 @@ test('resources pages', async ({ page }) => {
await expect(page.getByText('Warning ¶ QGIS testing')).toBeVisible();
await expect(page.locator('#installing-from-source')).toContainText('Installing from Source');
await expect(page.getByText('Refer to INSTALL on how to')).toBeVisible();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Documentation' })).toBeVisible();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Releases', exact: true })).toBeVisible();
await expect(page.locator('#ul-32 div').filter({ hasText: 'Releases' }).locator('span')).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Releases', exact: true }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Documentation' })).toBeVisible();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Releases', exact: true })).toBeVisible();
await expect(page.locator('#ul-26 div').filter({ hasText: 'Releases' }).locator('span')).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Releases', exact: true }).click();
await expect(page.locator('#list-of-releases')).toContainText('List of Releases');
await expect(page.getByText('Previous releases of QGIS are')).toBeVisible();
await expect(page.getByText('More older releases are')).toBeVisible();
Expand All @@ -203,8 +203,8 @@ test('resources pages', async ({ page }) => {
await expect(page.getByRole('link', { name: 'List of releases' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Tests' })).toBeVisible();
await page.getByRole('link', { name: 'Tests' }).click();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Roadmap' })).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Roadmap' }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Roadmap' })).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Roadmap' }).click();
await expect(page.locator('#road-map')).toContainText('Road Map');
await expect(page.locator('#development-phase')).toContainText('Development phase');
await expect(page.locator('#feature-freeze')).toContainText('Feature freeze');
Expand Down Expand Up @@ -235,9 +235,9 @@ test('resources pages', async ({ page }) => {
await expect(page.getByRole('cell', { name: 'Debian/Ubuntu' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'MacOS' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Mac OS' })).toBeVisible();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Reports' })).toBeVisible();
await expect(page.locator('#ul-32 div').filter({ hasText: 'Reports' }).locator('span')).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Reports' }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Reports' })).toBeVisible();
await expect(page.locator('#ul-26 div').filter({ hasText: 'Reports' }).locator('span')).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Reports' }).click();
await expect(page.locator('#daily-reports')).toContainText('Daily Reports');
await expect(page.locator('#ogc-certification')).toContainText('OGC Certification');
await expect(page.getByText('QGIS Server').first()).toBeVisible();
Expand All @@ -254,8 +254,8 @@ test('resources pages', async ({ page }) => {
await expect(page.getByRole('link', { name: 'OGC Certification' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Performance' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Security' })).toBeVisible();
await expect(page.locator('#ul-32').getByRole('link', { name: 'Books' })).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Books' }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Books' })).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Books' }).click();
await expect(page.getByText('Books ¶ This page lists books')).toBeVisible();
await expect(page.locator('#books')).toContainText('Books');
await expect(page.getByText('This page lists books')).toBeVisible();
Expand All @@ -275,9 +275,9 @@ test('resources pages', async ({ page }) => {
await expect(page.locator('#japanese')).toContainText('Japanese');
await expect(page.locator('#polish')).toContainText('Polish');
await expect(page.locator('#turkish')).toContainText('Turkish');
await expect(page.locator('#ul-32').getByRole('link', { name: 'Support', exact: true })).toBeVisible();
await expect(page.locator('#ul-32 div').filter({ hasText: 'Support' }).locator('span')).toBeVisible();
await page.locator('#ul-32').getByRole('link', { name: 'Support', exact: true }).click();
await expect(page.locator('#ul-26').getByRole('link', { name: 'Support', exact: true })).toBeVisible();
await expect(page.locator('#ul-26 div').filter({ hasText: 'Support' }).locator('span')).toBeVisible();
await page.locator('#ul-26').getByRole('link', { name: 'Support', exact: true }).click();
await expect(page.locator('#support')).toContainText('Support');
await expect(page.locator('#mailing-lists')).toContainText('Mailing Lists');
await expect(page.getByText('QGIS has a bunch of mailing')).toBeVisible();
Expand Down Expand Up @@ -422,4 +422,4 @@ test('resources pages', async ({ page }) => {
await page.getByRole('link', { name: 'StackExchange' }).click();
await expect(page.getByRole('link', { name: 'Website Creation' })).toBeVisible();
await page.getByRole('link', { name: 'Website Creation' }).click();
});
});

0 comments on commit ed9b197

Please sign in to comment.