Ensure logged out starting state for tests that need it (#59322)
This commit is contained in:
parent
45fb6f38b8
commit
8fa9962641
|
@ -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 () => {
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue