This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VIconButton default variant (#1255)
* Fix VIconButton default variant * Undo unnecessary code changes * Update POT * Fix close button position and color * Increase timeout to prevent flakiness
- Loading branch information
1 parent
46d58db
commit cca06e9
Showing
18 changed files
with
1,240 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { | ||
ExtractPropTypes, | ||
ExtractDefaultPropTypes, | ||
} from '@nuxtjs/composition-api' | ||
|
||
/** | ||
* Correctly extracts optional prop types. | ||
* | ||
* I think this is fixed in the Vue 3 types but hasn't been | ||
* ported back to `@vue/composition-api` so for now we have | ||
* to suffer this ugly type. | ||
*/ | ||
export type ProperlyExtractPropTypes<P> = Omit< | ||
ExtractPropTypes<P>, | ||
keyof ExtractDefaultPropTypes<P> | ||
> & | ||
Partial<ExtractDefaultPropTypes<P>> |
26 changes: 26 additions & 0 deletions
26
test/playwright/visual-regression/content-report-form.spec.ts
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { test, expect } from '@playwright/test' | ||
|
||
test.describe('content report form', () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/image/feb91b13-422d-46fa-8ef4-cbf1e6ddee9b') | ||
}) | ||
|
||
test('unfocused close button', async ({ page }) => { | ||
await page.click('button:has-text("report")', { timeout: 500 }) | ||
const form = page.locator('[data-testid="content-report-popover"]') | ||
|
||
expect(await form.screenshot({ timeout: 500 })).toMatchSnapshot({ | ||
name: 'content-report-unfocused.png', | ||
}) | ||
}) | ||
|
||
test('focused close button', async ({ page }) => { | ||
await page.click('button:has-text("report")', { timeout: 500 }) | ||
const form = page.locator('[data-testid="content-report-popover"]') | ||
|
||
await form.locator('[aria-label="Close"]').focus({ timeout: 500 }) | ||
expect(await form.screenshot()).toMatchSnapshot({ | ||
name: 'content-report-focused.png', | ||
}) | ||
}) | ||
}) |
Binary file added
BIN
+34.9 KB
...gression/content-report-form.spec.ts-snapshots/content-report-focused-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...ession/content-report-form.spec.ts-snapshots/content-report-unfocused-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions
114
test/tapes/detail_images_feb91b13-422d-46fa-8ef4-cbf1e6ddee9b_close.json5
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
meta: { | ||
createdAt: '2022-04-11T12:31:19.362Z', | ||
host: 'https://api.openverse.engineering', | ||
resHumanReadable: true, | ||
}, | ||
req: { | ||
headers: { | ||
accept: 'application/json, text/plain, */*', | ||
connection: 'close', | ||
}, | ||
url: '/v1/images/feb91b13-422d-46fa-8ef4-cbf1e6ddee9b/', | ||
method: 'GET', | ||
body: '', | ||
}, | ||
res: { | ||
status: 200, | ||
headers: { | ||
date: [ | ||
'Mon, 11 Apr 2022 12:31:19 GMT', | ||
], | ||
'content-type': [ | ||
'application/json', | ||
], | ||
'transfer-encoding': [ | ||
'chunked', | ||
], | ||
connection: [ | ||
'close', | ||
], | ||
vary: [ | ||
'Accept-Encoding, Accept, Authorization, Origin', | ||
], | ||
allow: [ | ||
'GET, HEAD, OPTIONS', | ||
], | ||
'x-frame-options': [ | ||
'DENY', | ||
], | ||
'x-content-type-options': [ | ||
'nosniff', | ||
], | ||
'referrer-policy': [ | ||
'same-origin', | ||
], | ||
'cross-origin-opener-policy': [ | ||
'same-origin', | ||
], | ||
'cache-control': [ | ||
'max-age=14400', | ||
], | ||
'cf-cache-status': [ | ||
'HIT', | ||
], | ||
age: [ | ||
'533', | ||
], | ||
'last-modified': [ | ||
'Mon, 11 Apr 2022 12:22:26 GMT', | ||
], | ||
'expect-ct': [ | ||
'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', | ||
], | ||
'strict-transport-security': [ | ||
'max-age=15552000; includeSubDomains; preload', | ||
], | ||
server: [ | ||
'cloudflare', | ||
], | ||
'cf-ray': [ | ||
'6fa3bd128beb0e12-MXP', | ||
], | ||
'alt-svc': [ | ||
'h3=":443"; ma=86400, h3-29=":443"; ma=86400', | ||
], | ||
}, | ||
body: { | ||
id: 'feb91b13-422d-46fa-8ef4-cbf1e6ddee9b', | ||
title: 'Galah in Darwin (Eolophus roseicapilla)', | ||
foreign_landing_url: 'https://www.flickr.com/photos/126953422@N04/40593461235', | ||
creator: 'Graham Winterflood', | ||
creator_url: 'https://www.flickr.com/photos/126953422@N04', | ||
url: 'https://live.staticflickr.com/894/40593461235_b72593df28_b.jpg', | ||
filesize: null, | ||
filetype: null, | ||
license: 'by-sa', | ||
license_version: '2.0', | ||
license_url: 'https://creativecommons.org/licenses/by-sa/2.0/', | ||
provider: 'flickr', | ||
source: 'flickr', | ||
category: null, | ||
tags: [ | ||
{ | ||
name: 'bird', | ||
}, | ||
{ | ||
name: 'canoneos7d', | ||
}, | ||
{ | ||
name: 'eolophusroseicapilla', | ||
}, | ||
{ | ||
name: 'galah', | ||
}, | ||
], | ||
attribution: '"Galah in Darwin (Eolophus roseicapilla)" by Graham Winterflood is licensed under CC-BY-SA 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by-sa/2.0/.', | ||
height: 683, | ||
width: 1024, | ||
thumbnail: 'http://localhost:49153/v1/images/feb91b13-422d-46fa-8ef4-cbf1e6ddee9b/thumb/', | ||
detail_url: 'http://localhost:49153/v1/images/feb91b13-422d-46fa-8ef4-cbf1e6ddee9b/', | ||
related_url: 'http://localhost:49153/v1/images/feb91b13-422d-46fa-8ef4-cbf1e6ddee9b/related/', | ||
}, | ||
}, | ||
} |
Oops, something went wrong.