Skip to content
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
4 changes: 2 additions & 2 deletions x-pack/test/accessibility/apps/login_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
describe('Login Page', () => {
before(async () => {
await esArchiver.load('empty_kibana');
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

after(async () => {
await esArchiver.unload('empty_kibana');
});

afterEach(async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

it('meets a11y requirements', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login(
'global_advanced_settings_all_user',
'global_advanced_settings_all_user-password',
Expand All @@ -62,7 +62,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_advanced_settings_all_role'),
security.user.delete('global_advanced_settings_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login(
'global_canvas_all_user',
Expand All @@ -60,7 +60,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_canvas_all_role'),
security.user.delete('global_canvas_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ export default function ({ getService, getPageObjects }) {
});

after('logout', async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

it('shows only the dashboard app link', async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('dashuser', '123456');

const appLinks = await appsMenu.readLinks();
Expand Down Expand Up @@ -194,7 +194,7 @@ export default function ({ getService, getPageObjects }) {
});

it('is loaded for a user who is assigned a non-dashboard mode role', async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('mixeduser', '123456');

if (await appsMenu.linkExists('Management')) {
Expand All @@ -203,7 +203,7 @@ export default function ({ getService, getPageObjects }) {
});

it('is not loaded for a user who is assigned a superuser role', async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('mysuperuser', '123456');

if (!await appsMenu.linkExists('Management')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await esArchiver.loadIfNeeded('logstash_functional');

// ensure we're logged out so we can login as the appropriate users
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

after(async () => {
await esArchiver.unload('discover/feature_controls/security');

// logout, so the other tests don't accidentally run as the custom users we're testing below
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

describe('global discover all privileges', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login(
'global_index_patterns_all_user',
Expand All @@ -64,7 +64,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_index_patterns_all_role'),
security.user.delete('global_index_patterns_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
});

// ensure we're logged out so we can login as the appropriate users
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

after(async () => {
await esArchiver.unload('empty_kibana');
await security.role.delete('global_all_role');

// logout, so the other tests don't accidentally run as the custom users we're testing below
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

describe('machine_learning_user', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login('global_maps_all_user', 'global_maps_all_user-password', {
expectSpaceSelector: false,
Expand All @@ -60,7 +60,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_maps_all_role'),
security.user.delete('global_maps_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const getLifecycleMethods = (getService, getPageObjects) => {
},

async tearDown() {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await security.user.delete('basic_monitoring_user');
return esArchiver.unload(_archive);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
after(async () => {
await esArchiver.unload('empty_kibana');
await PageObjects.common.navigateToApp('home');
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

describe('space with no features disabled', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login('global_all_user', 'global_all_user-password', {
expectSpaceSelector: false,
Expand All @@ -55,7 +55,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_all_role'),
security.user.delete('global_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down Expand Up @@ -162,7 +162,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login('global_som_read_user', 'global_som_read_user-password', {
expectSpaceSelector: false,
Expand All @@ -173,7 +173,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_som_read_role'),
security.user.delete('global_som_read_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down Expand Up @@ -281,7 +281,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
full_name: 'test user',
});

await PageObjects.security.logout();
await PageObjects.security.forceLogout();

await PageObjects.security.login(
'global_visualize_all_user',
Expand All @@ -296,7 +296,7 @@ export default function({ getPageObjects, getService }: FtrProviderContext) {
await Promise.all([
security.role.delete('global_visualize_all_role'),
security.user.delete('global_visualize_all_user'),
PageObjects.security.logout(),
PageObjects.security.forceLogout(),
]);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function ({ getService, getPageObjects }) {
});

it('user East should only see EAST doc', async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('userEast', 'changeme');
await PageObjects.common.navigateToApp('discover');
await retry.try(async () => {
Expand All @@ -77,7 +77,7 @@ export default function ({ getService, getPageObjects }) {
expect(rowData).to.be('name:ABC Company region:EAST _id:doc1 _type: - _index:dlstest _score:0');
});
after('logout', async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});
});
}
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/security/field_level_security.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function ({ getService, getPageObjects }) {
});

it('user customer1 should see ssn', async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('customer1', 'changeme');
await PageObjects.common.navigateToApp('discover');
await retry.tryForTime(10000, async () => {
Expand All @@ -102,7 +102,7 @@ export default function ({ getService, getPageObjects }) {
});

it('user customer2 should not see ssn', async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('customer2', 'changeme');
await PageObjects.common.navigateToApp('discover');
await retry.tryForTime(10000, async () => {
Expand All @@ -114,7 +114,7 @@ export default function ({ getService, getPageObjects }) {
});

after(async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

});
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/security/rbac_phase1.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function ({ getService, getPageObjects }) {
expect(user.roles).to.eql(['rbac_read']);
expect(user.fullname).to.eql('kibanareadonlyFirst kibanareadonlyLast');
expect(user.reserved).to.be(false);
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});


Expand All @@ -100,11 +100,11 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.timePicker.setDefaultAbsoluteRange();
await PageObjects.visualize.waitForVisualization();
await PageObjects.visualize.saveVisualizationExpectSuccess(vizName1);
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

after(async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

});
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/security/secure_roles_perm.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function ({ getService, getPageObjects }) {
expect(users.Rashmi.roles).to.eql(['logstash_reader', 'kibana_user']);
expect(users.Rashmi.fullname).to.eql('RashmiFirst RashmiLast');
expect(users.Rashmi.reserved).to.be(false);
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
await PageObjects.security.login('Rashmi', 'changeme');
});

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

after(async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

});
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/security/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export default function ({ getService, getPageObjects }) {
describe('Login Page', () => {
before(async () => {
await esArchiver.load('empty_kibana');
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

after(async () => {
await esArchiver.unload('empty_kibana');
});

afterEach(async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

it('can login', async () => {
Expand Down
6 changes: 3 additions & 3 deletions x-pack/test/functional/apps/security/user_email.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) {
expect(users.newuser.fullname).to.eql('newuserFirst newuserLast');
expect(users.newuser.email).to.eql('[email protected]');
expect(users.newuser.reserved).to.be(false);
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

it('login as new user and verify email', async function () {
Expand All @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }) {
it('click changepassword link, change the password and re-login', async function () {
await PageObjects.accountSetting.verifyAccountSettings('[email protected]', 'newuser');
await PageObjects.accountSetting.changePassword('changeme', 'mechange');
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});


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

after(async function () {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});
});
}
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/spaces/enter_space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function enterSpaceFunctonalTests({
after(async () => await esArchiver.unload('spaces/enter_space'));

afterEach(async () => {
await PageObjects.security.logout();
await PageObjects.security.forceLogout();
});

it('allows user to navigate to different spaces, respecting the configured default route', async () => {
Expand Down
Loading