update to 1.28.1, touch up selectors

pull/195/head
Marcus Felling 2022-12-13 16:15:55 -06:00
parent 5770732b2b
commit c210dd8040
No known key found for this signature in database
GPG Key ID: 89EBCF55B58D842F
8 changed files with 26 additions and 28 deletions

View File

@ -43,7 +43,7 @@ jobs:
if: ${{ always() }}
timeout-minutes: 60
runs-on: ubuntu-latest
container: mcr.microsoft.com/playwright:v1.27.1-focal
container: mcr.microsoft.com/playwright:v1.28.1-focal
env:
BASEURL: https://${{secrets.WEBAPP_NAME}}.azurewebsites.net # sets value for URL to test
defaults:

View File

@ -9,17 +9,17 @@
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.27.1"
"@playwright/test": "^1.28.1"
}
},
"node_modules/@playwright/test": {
"version": "1.27.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.1.tgz",
"integrity": "sha512-mrL2q0an/7tVqniQQF6RBL2saskjljXzqNcCOVMUjRIgE6Y38nCNaP+Dc2FBW06bcpD3tqIws/HT9qiMHbNU0A==",
"version": "1.28.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz",
"integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==",
"dev": true,
"dependencies": {
"@types/node": "*",
"playwright-core": "1.27.1"
"playwright-core": "1.28.1"
},
"bin": {
"playwright": "cli.js"
@ -35,9 +35,9 @@
"dev": true
},
"node_modules/playwright-core": {
"version": "1.27.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz",
"integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==",
"version": "1.28.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz",
"integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==",
"dev": true,
"bin": {
"playwright": "cli.js"
@ -49,13 +49,13 @@
},
"dependencies": {
"@playwright/test": {
"version": "1.27.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.1.tgz",
"integrity": "sha512-mrL2q0an/7tVqniQQF6RBL2saskjljXzqNcCOVMUjRIgE6Y38nCNaP+Dc2FBW06bcpD3tqIws/HT9qiMHbNU0A==",
"version": "1.28.1",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz",
"integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==",
"dev": true,
"requires": {
"@types/node": "*",
"playwright-core": "1.27.1"
"playwright-core": "1.28.1"
}
},
"@types/node": {
@ -65,9 +65,9 @@
"dev": true
},
"playwright-core": {
"version": "1.27.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz",
"integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==",
"version": "1.28.1",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz",
"integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==",
"dev": true
}
}

View File

@ -19,6 +19,6 @@
},
"homepage": "https://github.com/Microsoft/dotnet-podcasts#readme",
"devDependencies": {
"@playwright/test": "^1.27.1"
"@playwright/test": "^1.28.1"
}
}

View File

@ -10,7 +10,7 @@ test.describe('Discover', () => {
for (const category of categories) {
test(`should allow me to browse category ${category}`, async ({ page }) => {
// click on the category
await page.locator('.tags-item').getByText(category).click();
await page.getByRole('list').getByRole('link', { name: category }).click();
// assert category is selected
await expect(page.locator('.titlePage')).toHaveText(category);
});

View File

@ -8,9 +8,9 @@ test.describe('Listen Later', () => {
// click first listen later button
await page.locator('button.buttonIcon.episode-actions-later').first().click();
// view listen later tab
await page.locator('.navbarApp-item >> text=ListenLater').click();
await page.getByRole('link', { name: 'Listen Later' }).click();
await expect(page).toHaveURL('/listen-later');
// assert no results page isn't shown
await expect(page.locator('main')).not.toContainText('no results');
await expect(page.locator('main')).not.toContainText('no results');
});
});

View File

@ -8,16 +8,14 @@ test.describe('Listen Together', () => {
// click play
await page.locator('.icon-play').first().click();
// click go to listen together page
await page.locator('text=ListenTogether').click();
await page.getByRole('link', { name: 'Listen Together' }).click();
await expect(page).toHaveURL('/listen-together');
// assert Create new room button isn't disabled
await expect(page.locator('.buttonApp.primary >> text=Create new room')).toBeEnabled()
// create new room
await page.locator('.buttonApp.primary >> text=Create new room').click();
await page.getByRole('button', { name: 'Create new room' }).click();
await page.getByPlaceholder('Your name').fill('test');
// open room
await page.locator('button:has-text("Open room")').click();
await page.getByRole('button', { name: 'Open room' }).click();
// leave the room
await page.getByRole('button', { name: 'Leave the room' }).click();
await page.getByRole('button', { name: 'Leave the room' }).click();
});
});

View File

@ -4,7 +4,7 @@ test.describe('Login', () => {
test('should allow me to login', async ({ page }) => {
await page.goto('');
// click sign in
await page.locator('text=Sign In').click();
await page.getByRole('link', { name: 'Sign In' }).click();
// assert discover page is shown
await expect(page).toHaveURL('/discover');
await expect(page).toHaveTitle('.NET Podcasts')

View File

@ -6,7 +6,7 @@ test.describe('Subscriptions', () => {
// click first podcast in list
await page.locator('.item-primary-action').first().click();
// click subscribe
await page.getByRole('button', { name: 'Subscribe' }).click();
await page.getByRole('button', { name: 'Subscribe' }).click();
// view subscriptions
await page.getByRole('link', { name: 'Subscriptions' }).click();
await expect(page).toHaveURL('/subscriptions');