Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure logged out starting state for tests that need it #59322

Merged
merged 3 commits into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion x-pack/test/functional/apps/spaces/enter_space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export default function enterSpaceFunctonalTests({

describe('Enter Space', function() {
this.tags('smoke');
before(async () => await esArchiver.load('spaces/enter_space'));
before(async () => {
await esArchiver.load('spaces/enter_space');
await PageObjects.security.forceLogout();
});
after(async () => await esArchiver.unload('spaces/enter_space'));

afterEach(async () => {
Expand Down
5 changes: 4 additions & 1 deletion x-pack/test/functional/apps/spaces/spaces_selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default function spaceSelectorFunctonalTests({
describe('Spaces', function() {
this.tags('smoke');
describe('Space Selector', () => {
before(async () => await esArchiver.load('spaces/selector'));
before(async () => {
await esArchiver.load('spaces/selector');
await PageObjects.security.forceLogout();
});
after(async () => await esArchiver.unload('spaces/selector'));

afterEach(async () => {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/page_objects/monitoring_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

export function MonitoringPageProvider({ getPageObjects, getService }) {
const PageObjects = getPageObjects(['common', 'header', 'shield', 'spaceSelector']);
const PageObjects = getPageObjects(['common', 'header', 'security', 'shield', 'spaceSelector']);
const testSubjects = getService('testSubjects');
const security = getService('security');

Expand All @@ -19,7 +19,7 @@ export function MonitoringPageProvider({ getPageObjects, getService }) {
});

if (!useSuperUser) {
await PageObjects.common.navigateToApp('login');
await PageObjects.security.forceLogout();
await PageObjects.shield.login('basic_monitoring_user', 'monitoring_user_password');
}
await PageObjects.common.navigateToApp('monitoring');
Expand Down