Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into check_anal_id
- Loading branch information
Showing
79 changed files
with
1 addition
and
278 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,8 @@ | ||
import type { TestInfo } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
import path from 'node:path'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
// setupSnapshot is a helper that creates handles the necessary boilerplate | ||
// for snapshot testing. It returns a function that can be called after the | ||
// snapshot test has executed. | ||
// | ||
// See: | ||
// https://github.com/microsoft/playwright/issues/14527#issuecomment-1143352769 | ||
export function setupSnapshot(testInfo: TestInfo) { | ||
const snapshotDir = testInfo.snapshotDir; | ||
const snapshotSuffix = testInfo.snapshotSuffix; | ||
const projectName = testInfo.project.name; | ||
|
||
testInfo.snapshotDir = path.resolve(snapshotDir, '..', 'screenshots'); | ||
testInfo.snapshotSuffix = ''; | ||
testInfo.project.name = ''; | ||
|
||
return { | ||
data: { projectName }, | ||
cleanupSnapshot() { | ||
testInfo.snapshotDir = snapshotDir; | ||
testInfo.snapshotSuffix = snapshotSuffix; | ||
testInfo.project.name = projectName; | ||
}, | ||
}; | ||
} | ||
|
||
test('about page has expected h1', async ({ page }) => { | ||
await page.goto('/about'); | ||
expect(await page.textContent('h1')).toBe('About us'); | ||
}); | ||
|
||
test('about page matches screenshot', async ({ page }, testInfo) => { | ||
const { cleanupSnapshot, data } = setupSnapshot(testInfo); | ||
|
||
if (testInfo.project.use.viewport) { | ||
await page.setViewportSize(testInfo.project.use.viewport); | ||
} | ||
|
||
if (testInfo.project.use.colorScheme) { | ||
await page.emulateMedia({ | ||
colorScheme: testInfo.project.use.colorScheme, | ||
}); | ||
} | ||
|
||
await page.goto('/about', { waitUntil: 'networkidle' }); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({ | ||
name: `page-${data.projectName}.png`, | ||
maxDiffPixelRatio: 0.1, | ||
threshold: 1, | ||
}); | ||
|
||
cleanupSnapshot(); | ||
}); |
Binary file removed
BIN
-1.81 MB
src/routes/(site)/about/screenshots/page-dark-desktop-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-1.81 MB
src/routes/(site)/about/screenshots/page-dark-desktop-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-1.06 MB
src/routes/(site)/about/screenshots/page-dark-mobile-jsdisabled.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.28 MB
src/routes/(site)/about/screenshots/page-dark-tablet-jsdisabled.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.83 MB
src/routes/(site)/about/screenshots/page-light-desktop-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-1.83 MB
src/routes/(site)/about/screenshots/page-light-desktop-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-1.09 MB
src/routes/(site)/about/screenshots/page-light-mobile-jsdisabled.png
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.3 MB
src/routes/(site)/about/screenshots/page-light-tablet-jsdisabled.png
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-108 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-desktop-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-109 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-desktop-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-86.2 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-mobile-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-87.1 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-mobile-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-93.4 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-tablet-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-94.5 KB
src/routes/(site)/blog/[id]/screenshots/page-dark-tablet-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-114 KB
src/routes/(site)/blog/[id]/screenshots/page-light-desktop-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-115 KB
src/routes/(site)/blog/[id]/screenshots/page-light-desktop-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-89.9 KB
src/routes/(site)/blog/[id]/screenshots/page-light-mobile-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-91.1 KB
src/routes/(site)/blog/[id]/screenshots/page-light-mobile-jsenabled.png
Binary file not shown.
Binary file removed
BIN
-99.5 KB
src/routes/(site)/blog/[id]/screenshots/page-light-tablet-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-100 KB
src/routes/(site)/blog/[id]/screenshots/page-light-tablet-jsenabled.png
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,8 @@ | ||
import type { TestInfo } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
import path from 'node:path'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
// setupSnapshot is a helper that creates handles the necessary boilerplate | ||
// for snapshot testing. It returns a function that can be called after the | ||
// snapshot test has executed. | ||
// | ||
// See: | ||
// https://github.com/microsoft/playwright/issues/14527#issuecomment-1143352769 | ||
export function setupSnapshot(testInfo: TestInfo) { | ||
const snapshotDir = testInfo.snapshotDir; | ||
const snapshotSuffix = testInfo.snapshotSuffix; | ||
const projectName = testInfo.project.name; | ||
|
||
testInfo.snapshotDir = path.resolve(snapshotDir, '..', 'screenshots'); | ||
testInfo.snapshotSuffix = ''; | ||
testInfo.project.name = ''; | ||
|
||
return { | ||
data: { projectName }, | ||
cleanupSnapshot() { | ||
testInfo.snapshotDir = snapshotDir; | ||
testInfo.snapshotSuffix = snapshotSuffix; | ||
testInfo.project.name = projectName; | ||
}, | ||
}; | ||
} | ||
|
||
test('nodebuds page has expected h1', async ({ page }) => { | ||
await page.goto('/nodebuds'); | ||
expect(await page.textContent('h1')).toBe('Personalized for your success'); | ||
}); | ||
|
||
test('nodebuds page matches screenshot', async ({ page }, testInfo) => { | ||
const { cleanupSnapshot, data } = setupSnapshot(testInfo); | ||
|
||
if (testInfo.project.use.viewport) { | ||
await page.setViewportSize(testInfo.project.use.viewport); | ||
} | ||
|
||
if (testInfo.project.use.colorScheme) { | ||
await page.emulateMedia({ | ||
colorScheme: testInfo.project.use.colorScheme, | ||
}); | ||
} | ||
|
||
await page.goto('/nodebuds', { waitUntil: 'networkidle' }); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({ | ||
name: `page-${data.projectName}.png`, | ||
maxDiffPixelRatio: 0.1, | ||
threshold: 1, | ||
}); | ||
|
||
cleanupSnapshot(); | ||
}); |
Binary file removed
BIN
-143 KB
src/routes/(site)/nodebuds/screenshots/page-dark-desktop-jsdisabled.png
Binary file not shown.
Binary file removed
BIN
-144 KB
src/routes/(site)/nodebuds/screenshots/page-dark-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-90.2 KB
src/routes/(site)/nodebuds/screenshots/page-dark-mobile-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-91.2 KB
src/routes/(site)/nodebuds/screenshots/page-dark-mobile-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-102 KB
src/routes/(site)/nodebuds/screenshots/page-dark-tablet-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-103 KB
src/routes/(site)/nodebuds/screenshots/page-dark-tablet-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-147 KB
src/routes/(site)/nodebuds/screenshots/page-light-desktop-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-148 KB
src/routes/(site)/nodebuds/screenshots/page-light-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-93.6 KB
src/routes/(site)/nodebuds/screenshots/page-light-mobile-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-94.8 KB
src/routes/(site)/nodebuds/screenshots/page-light-mobile-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-104 KB
src/routes/(site)/nodebuds/screenshots/page-light-tablet-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-105 KB
src/routes/(site)/nodebuds/screenshots/page-light-tablet-jsenabled.png
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,8 @@ | ||
import type { TestInfo } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
import path from 'node:path'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
// setupSnapshot is a helper that creates handles the necessary boilerplate | ||
// for snapshot testing. It returns a function that can be called after the | ||
// snapshot test has executed. | ||
// | ||
// See: | ||
// https://github.com/microsoft/playwright/issues/14527#issuecomment-1143352769 | ||
export function setupSnapshot(testInfo: TestInfo) { | ||
const snapshotDir = testInfo.snapshotDir; | ||
const snapshotSuffix = testInfo.snapshotSuffix; | ||
const projectName = testInfo.project.name; | ||
|
||
testInfo.snapshotDir = path.resolve(snapshotDir, '..', 'screenshots'); | ||
testInfo.snapshotSuffix = ''; | ||
testInfo.project.name = ''; | ||
|
||
return { | ||
data: { projectName }, | ||
cleanupSnapshot() { | ||
testInfo.snapshotDir = snapshotDir; | ||
testInfo.snapshotSuffix = snapshotSuffix; | ||
testInfo.project.name = projectName; | ||
}, | ||
}; | ||
} | ||
|
||
test('privacy page has expected h1', async ({ page }) => { | ||
await page.goto('/privacy'); | ||
expect(await page.textContent('h1')).toBe('Privacy Policy'); | ||
}); | ||
|
||
test('events page matches screenshot', async ({ page }, testInfo) => { | ||
const { cleanupSnapshot, data } = setupSnapshot(testInfo); | ||
|
||
if (testInfo.project.use.viewport) { | ||
await page.setViewportSize(testInfo.project.use.viewport); | ||
} | ||
|
||
if (testInfo.project.use.colorScheme) { | ||
await page.emulateMedia({ | ||
colorScheme: testInfo.project.use.colorScheme, | ||
}); | ||
} | ||
|
||
await page.goto('/privacy', { waitUntil: 'networkidle' }); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({ | ||
name: `page-${data.projectName}.png`, | ||
maxDiffPixelRatio: 0.1, | ||
threshold: 1, | ||
}); | ||
|
||
cleanupSnapshot(); | ||
}); |
Binary file removed
BIN
-276 KB
src/routes/(site)/privacy/screenshots/page-dark-desktop-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-277 KB
src/routes/(site)/privacy/screenshots/page-dark-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-298 KB
src/routes/(site)/privacy/screenshots/page-dark-mobile-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-299 KB
src/routes/(site)/privacy/screenshots/page-dark-mobile-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-263 KB
src/routes/(site)/privacy/screenshots/page-dark-tablet-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-265 KB
src/routes/(site)/privacy/screenshots/page-dark-tablet-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-278 KB
src/routes/(site)/privacy/screenshots/page-light-desktop-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-278 KB
src/routes/(site)/privacy/screenshots/page-light-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-296 KB
src/routes/(site)/privacy/screenshots/page-light-mobile-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-297 KB
src/routes/(site)/privacy/screenshots/page-light-mobile-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-263 KB
src/routes/(site)/privacy/screenshots/page-light-tablet-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-264 KB
src/routes/(site)/privacy/screenshots/page-light-tablet-jsenabled.png
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,7 @@ | ||
import type { TestInfo } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
import path from 'node:path'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
// setupSnapshot is a helper that creates handles the necessary boilerplate | ||
// for snapshot testing. It returns a function that can be called after the | ||
// snapshot test has executed. | ||
// | ||
// See: | ||
// https://github.com/microsoft/playwright/issues/14527#issuecomment-1143352769 | ||
export function setupSnapshot(testInfo: TestInfo) { | ||
const snapshotDir = testInfo.snapshotDir; | ||
const snapshotSuffix = testInfo.snapshotSuffix; | ||
const projectName = testInfo.project.name; | ||
|
||
testInfo.snapshotDir = path.resolve(snapshotDir, '..', 'screenshots'); | ||
testInfo.snapshotSuffix = ''; | ||
testInfo.project.name = ''; | ||
|
||
return { | ||
data: { projectName }, | ||
cleanupSnapshot() { | ||
testInfo.snapshotDir = snapshotDir; | ||
testInfo.snapshotSuffix = snapshotSuffix; | ||
testInfo.project.name = projectName; | ||
}, | ||
}; | ||
} | ||
|
||
test('teams page has expected h1', async ({ page }) => { | ||
await page.goto('/quiz'); | ||
expect(await page.textContent('h1')).toBe('ACM TEAM QUIZ'); | ||
}); | ||
|
||
test('quiz page matches screenshot', async ({ page }, testInfo) => { | ||
const { cleanupSnapshot, data } = setupSnapshot(testInfo); | ||
|
||
if (testInfo.project.use.viewport) { | ||
await page.setViewportSize(testInfo.project.use.viewport); | ||
} | ||
|
||
if (testInfo.project.use.colorScheme) { | ||
await page.emulateMedia({ | ||
colorScheme: testInfo.project.use.colorScheme, | ||
}); | ||
} | ||
|
||
await page.goto('/quiz', { waitUntil: 'networkidle' }); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({ | ||
name: `page-${data.projectName}.png`, | ||
maxDiffPixelRatio: 0.1, | ||
threshold: 1, | ||
}); | ||
|
||
cleanupSnapshot(); | ||
}); |
Binary file removed
BIN
-78.2 KB
src/routes/(site)/quiz/screenshots/page-dark-desktop-jsdisabled.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-77.6 KB
src/routes/(site)/quiz/screenshots/page-light-desktop-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-78.6 KB
src/routes/(site)/quiz/screenshots/page-light-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-57.8 KB
src/routes/(site)/quiz/screenshots/page-light-mobile-jsdisabled.png
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-65.8 KB
src/routes/(site)/quiz/screenshots/page-light-tablet-jsdisabled.png
Diff not rendered.
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,8 @@ | ||
import type { TestInfo } from '@playwright/test'; | ||
import { expect, test } from '@playwright/test'; | ||
import path from 'node:path'; | ||
|
||
test.describe.configure({ mode: 'parallel' }); | ||
|
||
// setupSnapshot is a helper that creates handles the necessary boilerplate | ||
// for snapshot testing. It returns a function that can be called after the | ||
// snapshot test has executed. | ||
// | ||
// See: | ||
// https://github.com/microsoft/playwright/issues/14527#issuecomment-1143352769 | ||
export function setupSnapshot(testInfo: TestInfo) { | ||
const snapshotDir = testInfo.snapshotDir; | ||
const snapshotSuffix = testInfo.snapshotSuffix; | ||
const projectName = testInfo.project.name; | ||
|
||
testInfo.snapshotDir = path.resolve(snapshotDir, '..', 'screenshots'); | ||
testInfo.snapshotSuffix = ''; | ||
testInfo.project.name = ''; | ||
|
||
return { | ||
data: { projectName }, | ||
cleanupSnapshot() { | ||
testInfo.snapshotDir = snapshotDir; | ||
testInfo.snapshotSuffix = snapshotSuffix; | ||
testInfo.project.name = projectName; | ||
}, | ||
}; | ||
} | ||
|
||
test('teams page has expected h1', async ({ page }) => { | ||
await page.goto('/teams'); | ||
expect(await page.textContent('h1')).toBe('Meet the Teams'); | ||
}); | ||
|
||
test('teams page matches screenshot', async ({ page }, testInfo) => { | ||
const { cleanupSnapshot, data } = setupSnapshot(testInfo); | ||
|
||
if (testInfo.project.use.viewport) { | ||
await page.setViewportSize(testInfo.project.use.viewport); | ||
} | ||
|
||
if (testInfo.project.use.colorScheme) { | ||
await page.emulateMedia({ | ||
colorScheme: testInfo.project.use.colorScheme, | ||
}); | ||
} | ||
|
||
await page.goto('/teams', { waitUntil: 'networkidle' }); | ||
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot({ | ||
name: `page-${data.projectName}.png`, | ||
maxDiffPixelRatio: 0.1, | ||
threshold: 1, | ||
}); | ||
|
||
cleanupSnapshot(); | ||
}); |
Binary file removed
BIN
-283 KB
src/routes/(site)/teams/screenshots/page-dark-desktop-jsdisabled.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-282 KB
src/routes/(site)/teams/screenshots/page-light-desktop-jsdisabled.png
Diff not rendered.
Binary file removed
BIN
-282 KB
src/routes/(site)/teams/screenshots/page-light-desktop-jsenabled.png
Diff not rendered.
Binary file removed
BIN
-200 KB
src/routes/(site)/teams/screenshots/page-light-mobile-jsdisabled.png
Diff not rendered.
Diff not rendered.
Binary file removed
BIN
-199 KB
src/routes/(site)/teams/screenshots/page-light-tablet-jsdisabled.png
Diff not rendered.
Diff not rendered.