-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross cluster replication a11y tests (#135514)
* Added CCR a11y tests covering all screens. * Fixed test that broke after update. Returned a method that was removed. * Switched order of remote clusters a11y and ccr. * Switched orders of ccr, snapshot and restore and remote cluster tets. They need to be ran in a certain order. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Bhavya RM <bhavya@elastic.co>
- Loading branch information
1 parent
78a03e3
commit b52ff2a
Showing
4 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
100 changes: 100 additions & 0 deletions
100
x-pack/test/accessibility/apps/cross_cluster_replication.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,100 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { FtrProviderContext } from '../ftr_provider_context'; | ||
|
||
export default function ({ getService, getPageObjects }: FtrProviderContext) { | ||
const PageObjects = getPageObjects([ | ||
'common', | ||
'settings', | ||
'header', | ||
'remoteClusters', | ||
'crossClusterReplication', | ||
]); | ||
const a11y = getService('a11y'); | ||
const testSubjects = getService('testSubjects'); | ||
const find = getService('find'); | ||
const es = getService('es'); | ||
const retry = getService('retry'); | ||
|
||
describe('cross cluster replication - a11y tests', async () => { | ||
before(async () => { | ||
await PageObjects.common.navigateToApp('crossClusterReplication'); | ||
}); | ||
|
||
describe('follower index tab', async () => { | ||
const remoteName = `testremote${Date.now().toString()}`; | ||
const testIndex = `testindex${Date.now().toString()}`; | ||
const testFollower = `follower${Date.now().toString()}`; | ||
const testLeader = `leader${Date.now().toString()}`; | ||
const autoFollower = `autofollow${Date.now().toString()}`; | ||
it('empty follower index table', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
describe('follower index tab', async () => { | ||
describe('follower index form', async () => { | ||
before(async () => { | ||
await PageObjects.common.navigateToApp('remoteClusters'); | ||
await PageObjects.remoteClusters.createNewRemoteCluster(remoteName, 'localhost:9300'); | ||
await es.indices.create({ index: testIndex }); | ||
await es.indices.create({ index: testLeader }); | ||
}); | ||
it('create follow index form', async () => { | ||
await PageObjects.common.navigateToApp('crossClusterReplication'); | ||
await PageObjects.crossClusterReplication.clickCreateFollowerIndexButton(); | ||
await a11y.testAppSnapshot(); | ||
await PageObjects.crossClusterReplication.createFollowerIndex(testLeader, testFollower); | ||
}); | ||
it('follower index flyout', async () => { | ||
// https://github.com/elastic/kibana/issues/135503 | ||
// Skipping this snapshot because there is an existing a11y violation. | ||
// await a11y.testAppSnapshot(); | ||
await testSubjects.click('closeFlyoutButton'); | ||
await retry.waitFor('follower index table to be visible', async () => { | ||
return await (await find.byCssSelector('table')).isDisplayed(); | ||
}); | ||
}); | ||
it('follower index table', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
after(async () => { | ||
await es.indices.delete({ index: testIndex }); | ||
}); | ||
}); | ||
}); | ||
describe('auto-follower patterns', async () => { | ||
describe('auto follower index form', async () => { | ||
before(async () => { | ||
await PageObjects.crossClusterReplication.clickAutoFollowerTab(); | ||
}); | ||
it('empty auto follower home screen', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
it('auto follower index page ', async () => { | ||
await PageObjects.crossClusterReplication.clickAutoFollowerPatternButton(); | ||
await a11y.testAppSnapshot(); | ||
await PageObjects.crossClusterReplication.createAutoFollowerPattern( | ||
autoFollower, | ||
'logstash*' | ||
); | ||
}); | ||
it('auto follower index flyout', async () => { | ||
// https://github.com/elastic/kibana/issues/135506 | ||
// Skipping this snapshot because there is an existing a11y violation. | ||
// await a11y.testAppSnapshot(); | ||
await testSubjects.click('closeFlyoutButton'); | ||
await retry.waitFor('auto follower index table to be visible', async () => { | ||
return await (await find.byCssSelector('table')).isDisplayed(); | ||
}); | ||
}); | ||
it('auto follow index table with data', async () => { | ||
await a11y.testAppSnapshot(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
} |
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