pally-ci: Ignore version update element (#42249)

* pa11y-ci: Ignore update version element

* Add hideElements to pa11yci-pr.conf.js
This commit is contained in:
Ashley Harrison 2021-11-25 09:51:21 +00:00 committed by GitHub
parent 2863af3bc3
commit a897154017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -6,6 +6,7 @@ var config = {
chromeLaunchConfig: { chromeLaunchConfig: {
args: ['--no-sandbox'], args: ['--no-sandbox'],
}, },
hideElements: '#updateVersion',
}, },
urls: [ urls: [
@ -13,7 +14,7 @@ var config = {
url: '${HOST}/login', url: '${HOST}/login',
wait: 500, wait: 500,
rootElement: '.main-view', rootElement: '.main-view',
threshold: 13, threshold: 12,
}, },
{ {
url: '${HOST}/login', url: '${HOST}/login',
@ -25,7 +26,7 @@ var config = {
"click element button[aria-label='Login button']", "click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible", "wait for element [aria-label='Skip change password button'] to be visible",
], ],
threshold: 14, threshold: 13,
rootElement: '.main-view', rootElement: '.main-view',
}, },
{ {

View File

@ -6,6 +6,7 @@ var config = {
chromeLaunchConfig: { chromeLaunchConfig: {
args: ['--no-sandbox'], args: ['--no-sandbox'],
}, },
hideElements: '#updateVersion',
}, },
urls: [ urls: [

View File

@ -4,6 +4,7 @@ import { Icon, IconName } from '@grafana/ui';
export interface FooterLink { export interface FooterLink {
text: string; text: string;
id?: string;
icon?: string; icon?: string;
url?: string; url?: string;
target?: string; target?: string;
@ -47,6 +48,7 @@ export let getVersionLinks = (): FooterLink[] => {
if (buildInfo.hasUpdate) { if (buildInfo.hasUpdate) {
links.push({ links.push({
id: 'updateVersion',
text: `New version available!`, text: `New version available!`,
icon: 'download-alt', icon: 'download-alt',
url: 'https://grafana.com/grafana/download?utm_source=grafana_footer', url: 'https://grafana.com/grafana/download?utm_source=grafana_footer',
@ -74,7 +76,7 @@ export const Footer: FC = React.memo(() => {
<ul> <ul>
{links.map((link) => ( {links.map((link) => (
<li key={link.text}> <li key={link.text}>
<a href={link.url} target={link.target} rel="noopener"> <a href={link.url} target={link.target} rel="noopener" id={link.id}>
{link.icon && <Icon name={link.icon as IconName} />} {link.text} {link.icon && <Icon name={link.icon as IconName} />} {link.text}
</a> </a>
</li> </li>