@eclipse-che/che-e2e 7.81.0-next-07ed023 → 7.81.0-next-f7a4289

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,8 @@ const CLASSES: any = {
49
49
  ShellExecutor: 'ShellExecutor',
50
50
  ContainerTerminal: 'ContainerTerminal',
51
51
  UserPreferences: 'UserPreferences',
52
- WebTerminalPage: 'WebTerminalPage'
52
+ WebTerminalPage: 'WebTerminalPage',
53
+ RevokeOauthPage: 'RevokeOauthPage'
53
54
  };
54
55
 
55
56
  const EXTERNAL_CLASSES: any = {
@@ -51,7 +51,8 @@ const CLASSES = {
51
51
  ShellExecutor: 'ShellExecutor',
52
52
  ContainerTerminal: 'ContainerTerminal',
53
53
  UserPreferences: 'UserPreferences',
54
- WebTerminalPage: 'WebTerminalPage'
54
+ WebTerminalPage: 'WebTerminalPage',
55
+ RevokeOauthPage: 'RevokeOauthPage'
55
56
  };
56
57
  exports.CLASSES = CLASSES;
57
58
  const EXTERNAL_CLASSES = {
@@ -1 +1 @@
1
- {"version":3,"file":"inversify.types.js","sourceRoot":"","sources":["../../configs/inversify.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;wEAQwE;;;AAExE,MAAM,KAAK,GAAQ;IAClB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,2BAA2B,EAAE,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC;IACtE,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC;IAC1C,mCAAmC,EAAE,MAAM,CAAC,GAAG,CAAC,qCAAqC,CAAC;IACtF,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC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AAE,iBAAiB;CAClC,CAAC;AAOc,0BAAO;AALvB,MAAM,gBAAgB,GAAQ;IAC7B,SAAS,EAAE,WAAW;IACtB,aAAa,EAAE,eAAe;CAC9B,CAAC;AAEuB,4CAAgB"}
@@ -29,6 +29,7 @@ const inversify_types_1 = require("../../configs/inversify.types");
29
29
  const selenium_webdriver_1 = require("selenium-webdriver");
30
30
  const DriverHelper_1 = require("../../utils/DriverHelper");
31
31
  const Logger_1 = require("../../utils/Logger");
32
+ const FACTORY_TEST_CONSTANTS_1 = require("../../constants/FACTORY_TEST_CONSTANTS");
32
33
  let UserPreferences = UserPreferences_1 = class UserPreferences {
33
34
  constructor(driverHelper) {
34
35
  this.driverHelper = driverHelper;
@@ -55,6 +56,19 @@ let UserPreferences = UserPreferences_1 = class UserPreferences {
55
56
  Logger_1.Logger.debug();
56
57
  await this.driverHelper.waitAndClick(UserPreferences_1.GIT_SERVICES_TAB);
57
58
  }
59
+ async revokeGitService(servicesName) {
60
+ Logger_1.Logger.debug();
61
+ await this.selectListItem(servicesName);
62
+ await this.driverHelper.waitAndClick(UserPreferences_1.GIT_SERVICES_REVOKE_BUTTON);
63
+ await this.driverHelper.waitVisibility(UserPreferences_1.CONFIRMATION_WINDOW);
64
+ await this.driverHelper.waitAndClick(UserPreferences_1.DELETE_CONFIRMATION_CHECKBOX);
65
+ await this.driverHelper.waitAndClick(UserPreferences_1.DELETE_ITEM_BUTTON_ENABLED);
66
+ await this.driverHelper.waitDisappearance(this.getServicesListItemLocator(servicesName));
67
+ }
68
+ async selectListItem(servicesName) {
69
+ Logger_1.Logger.debug(`of the '${servicesName}' list item`);
70
+ await this.driverHelper.waitAndClick(this.getServicesListItemLocator(servicesName));
71
+ }
58
72
  async openPatTab() {
59
73
  Logger_1.Logger.debug();
60
74
  await this.driverHelper.waitAndClick(UserPreferences_1.PAT_TAB);
@@ -69,17 +83,35 @@ let UserPreferences = UserPreferences_1 = class UserPreferences {
69
83
  await this.driverHelper.waitAndClick(UserPreferences_1.SSH_KEY_TAB);
70
84
  await this.driverHelper.waitVisibility(UserPreferences_1.ADD_NEW_SSH_KEY_BUTTON);
71
85
  }
86
+ getServiceConfig(service) {
87
+ const gitService = {
88
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.GITHUB]: 'GitHub',
89
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.GITLAB]: 'GitLab',
90
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.AZURE_DEVOPS]: 'Microsoft Azure DevOps',
91
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_CLOUD_OAUTH2]: 'Bitbucket Cloud',
92
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_SERVER_OAUTH1]: 'Bitbucket Server',
93
+ [FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_SERVER_OAUTH2]: 'Bitbucket Server'
94
+ };
95
+ return gitService[service];
96
+ }
97
+ getServicesListItemLocator(servicesName) {
98
+ return selenium_webdriver_1.By.xpath(`//tr[td[text()='${servicesName}']]//input`);
99
+ }
72
100
  };
73
101
  UserPreferences.USER_SETTINGS_DROPDOWN = selenium_webdriver_1.By.xpath('//header//button/span[text()!=""]//parent::button');
74
102
  UserPreferences.USER_PREFERENCES_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="User Preferences"]');
75
103
  UserPreferences.USER_PREFERENCES_PAGE = selenium_webdriver_1.By.xpath('//h1[text()="User Preferences"]');
76
104
  UserPreferences.CONTAINER_REGISTRIES_TAB = selenium_webdriver_1.By.xpath('//button[text()="Container Registries"]');
77
105
  UserPreferences.GIT_SERVICES_TAB = selenium_webdriver_1.By.xpath('//button[text()="Git Services"]');
106
+ UserPreferences.GIT_SERVICES_REVOKE_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Revoke"]');
78
107
  UserPreferences.PAT_TAB = selenium_webdriver_1.By.xpath('//button[text()="Personal Access Tokens"]');
79
108
  UserPreferences.ADD_NEW_PAT_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Add Personal Access Token"]');
80
109
  UserPreferences.GIT_CONFIG_PAGE = selenium_webdriver_1.By.xpath('//button[text()="Gitconfig"]');
81
110
  UserPreferences.SSH_KEY_TAB = selenium_webdriver_1.By.xpath('//button[text()="SSH Keys"]');
82
111
  UserPreferences.ADD_NEW_SSH_KEY_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Add SSH Key"]');
112
+ UserPreferences.CONFIRMATION_WINDOW = selenium_webdriver_1.By.xpath('//span[text()="Revoke Git Services"]');
113
+ UserPreferences.DELETE_CONFIRMATION_CHECKBOX = selenium_webdriver_1.By.xpath('//input[@data-testid="warning-info-checkbox"]');
114
+ UserPreferences.DELETE_ITEM_BUTTON_ENABLED = selenium_webdriver_1.By.xpath('//button[@data-testid="revoke-button" and not(@disabled)]');
83
115
  UserPreferences = UserPreferences_1 = __decorate([
84
116
  (0, inversify_1.injectable)(),
85
117
  __param(0, (0, inversify_1.inject)(inversify_types_1.CLASSES.DriverHelper)),
@@ -1 +1 @@
1
- {"version":3,"file":"UserPreferences.js","sourceRoot":"","sources":["../../../pageobjects/dashboard/UserPreferences.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;wEAQwE;AACxE,yCAA+C;AAC/C,4BAA0B;AAC1B,mEAAwD;AACxD,2DAAwC;AACxC,2DAAwD;AACxD,+CAA4C;AAGrC,IAAM,eAAe,uBAArB,MAAM,eAAe;IAgB3B,YAEU,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IACjC,CAAC;IAEJ,KAAK,CAAC,uBAAuB;QAC5B,eAAM,CAAC,KAAK,EAAE,CAAC;QAEf,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAe,CAAC,sBAAsB,CAAC,CAAC;QAC7E,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAe,CAAC,uBAAuB,CAAC,CAAC;QAE9E,MAAM,IAAI,CAAC,YAAY,CAAC,cAA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KAAK,CAAC,+CAA+C,CAAC,CAAC;AAC7F,0CAA0B,GAAO,uBAAE,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;AApBnH,eAAe;IAD3B,IAAA,sBAAU,GAAE;IAwBV,WAAA,IAAA,kBAAM,EAAC,yBAAO,CAAC,YAAY,CAAC,CAAA;qCACN,2BAAY;GAxBxB,eAAe,CAgH3B;AAhHY,0CAAe"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /** *******************************************************************
4
+ * copyright (c) 2020-2024 Red Hat, Inc.
5
+ *
6
+ * This program and the accompanying materials are made
7
+ * available under the terms of the Eclipse Public License 2.0
8
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
9
+ *
10
+ * SPDX-License-Identifier: EPL-2.0
11
+ **********************************************************************/
12
+ const inversify_config_1 = require("../../configs/inversify.config");
13
+ const inversify_types_1 = require("../../configs/inversify.types");
14
+ const FACTORY_TEST_CONSTANTS_1 = require("../../constants/FACTORY_TEST_CONSTANTS");
15
+ suite('"Revoke OAuth" test', function () {
16
+ const loginTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.LoginTests);
17
+ const userPreferences = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.UserPreferences);
18
+ const gitService = FACTORY_TEST_CONSTANTS_1.FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER || 'github';
19
+ suiteSetup('Login', async function () {
20
+ await loginTests.loginIntoChe();
21
+ });
22
+ test('Revoke OAuth test', async function () {
23
+ await userPreferences.openUserPreferencesPage();
24
+ await userPreferences.openGitServicesTab();
25
+ const selectedService = userPreferences.getServiceConfig(gitService);
26
+ await userPreferences.revokeGitService(selectedService);
27
+ });
28
+ });
29
+ //# sourceMappingURL=RevokeOauth.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevokeOauth.spec.js","sourceRoot":"","sources":["../../../specs/miscellaneous/RevokeOauth.spec.ts"],"names":[],"mappings":";;AAAA;;;;;;;;wEAQwE;AACxE,qEAA8D;AAC9D,mEAAwD;AAGxD,mFAAgF;AAEhF,KAAK,CAAC,qBAAqB,EAAE;IAC5B,MAAM,UAAU,GAAe,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,UAAU,CAAC,CAAC;IACpE,MAAM,eAAe,GAAoB,+BAAY,CAAC,GAAG,CAAC,yBAAO,CAAC,eAAe,CAAC,CAAC;IACnF,MAAM,UAAU,GAAW,+CAAsB,CAAC,gCAAgC,IAAI,QAAQ,CAAC;IAE/F,UAAU,CAAC,OAAO,EAAE,KAAK;QACxB,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mBAAmB,EAAE,KAAK;QAC9B,MAAM,eAAe,CAAC,uBAAuB,EAAE,CAAC;QAChD,MAAM,eAAe,CAAC,kBAAkB,EAAE,CAAC;QAE3C,MAAM,eAAe,GAAW,eAAe,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC7E,MAAM,eAAe,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -18,7 +18,7 @@ suite(`"Check User Preferences page" test ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONS
18
18
  suiteSetup('Login', async function () {
19
19
  await loginTests.loginIntoChe();
20
20
  });
21
- test(`Check user preferences page`, async function () {
21
+ test('Check user preferences page', async function () {
22
22
  await userPreferences.openUserPreferencesPage();
23
23
  await userPreferences.checkTabsAvailability();
24
24
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-che/che-e2e",
3
- "version": "7.81.0-next-07ed023",
3
+ "version": "7.81.0-next-f7a4289",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,6 +13,7 @@ import { CLASSES } from '../../configs/inversify.types';
13
13
  import { By } from 'selenium-webdriver';
14
14
  import { DriverHelper } from '../../utils/DriverHelper';
15
15
  import { Logger } from '../../utils/Logger';
16
+ import { GitProviderType } from '../../constants/FACTORY_TEST_CONSTANTS';
16
17
 
17
18
  @injectable()
18
19
  export class UserPreferences {
@@ -21,7 +22,9 @@ export class UserPreferences {
21
22
  private static readonly USER_PREFERENCES_PAGE: By = By.xpath('//h1[text()="User Preferences"]');
22
23
 
23
24
  private static readonly CONTAINER_REGISTRIES_TAB: By = By.xpath('//button[text()="Container Registries"]');
25
+
24
26
  private static readonly GIT_SERVICES_TAB: By = By.xpath('//button[text()="Git Services"]');
27
+ private static readonly GIT_SERVICES_REVOKE_BUTTON: By = By.xpath('//button[text()="Revoke"]');
25
28
 
26
29
  private static readonly PAT_TAB: By = By.xpath('//button[text()="Personal Access Tokens"]');
27
30
  private static readonly ADD_NEW_PAT_BUTTON: By = By.xpath('//button[text()="Add Personal Access Token"]');
@@ -31,6 +34,10 @@ export class UserPreferences {
31
34
  private static readonly SSH_KEY_TAB: By = By.xpath('//button[text()="SSH Keys"]');
32
35
  private static readonly ADD_NEW_SSH_KEY_BUTTON: By = By.xpath('//button[text()="Add SSH Key"]');
33
36
 
37
+ private static readonly CONFIRMATION_WINDOW: By = By.xpath('//span[text()="Revoke Git Services"]');
38
+ private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.xpath('//input[@data-testid="warning-info-checkbox"]');
39
+ private static readonly DELETE_ITEM_BUTTON_ENABLED: By = By.xpath('//button[@data-testid="revoke-button" and not(@disabled)]');
40
+
34
41
  constructor(
35
42
  @inject(CLASSES.DriverHelper)
36
43
  readonly driverHelper: DriverHelper
@@ -67,6 +74,24 @@ export class UserPreferences {
67
74
  await this.driverHelper.waitAndClick(UserPreferences.GIT_SERVICES_TAB);
68
75
  }
69
76
 
77
+ async revokeGitService(servicesName: string): Promise<void> {
78
+ Logger.debug();
79
+
80
+ await this.selectListItem(servicesName);
81
+ await this.driverHelper.waitAndClick(UserPreferences.GIT_SERVICES_REVOKE_BUTTON);
82
+
83
+ await this.driverHelper.waitVisibility(UserPreferences.CONFIRMATION_WINDOW);
84
+ await this.driverHelper.waitAndClick(UserPreferences.DELETE_CONFIRMATION_CHECKBOX);
85
+ await this.driverHelper.waitAndClick(UserPreferences.DELETE_ITEM_BUTTON_ENABLED);
86
+ await this.driverHelper.waitDisappearance(this.getServicesListItemLocator(servicesName));
87
+ }
88
+
89
+ async selectListItem(servicesName: string): Promise<void> {
90
+ Logger.debug(`of the '${servicesName}' list item`);
91
+
92
+ await this.driverHelper.waitAndClick(this.getServicesListItemLocator(servicesName));
93
+ }
94
+
70
95
  async openPatTab(): Promise<void> {
71
96
  Logger.debug();
72
97
 
@@ -86,4 +111,21 @@ export class UserPreferences {
86
111
  await this.driverHelper.waitAndClick(UserPreferences.SSH_KEY_TAB);
87
112
  await this.driverHelper.waitVisibility(UserPreferences.ADD_NEW_SSH_KEY_BUTTON);
88
113
  }
114
+
115
+ getServiceConfig(service: string): string {
116
+ const gitService: { [key: string]: string } = {
117
+ [GitProviderType.GITHUB]: 'GitHub',
118
+ [GitProviderType.GITLAB]: 'GitLab',
119
+ [GitProviderType.AZURE_DEVOPS]: 'Microsoft Azure DevOps',
120
+ [GitProviderType.BITBUCKET_CLOUD_OAUTH2]: 'Bitbucket Cloud',
121
+ [GitProviderType.BITBUCKET_SERVER_OAUTH1]: 'Bitbucket Server',
122
+ [GitProviderType.BITBUCKET_SERVER_OAUTH2]: 'Bitbucket Server'
123
+ };
124
+
125
+ return gitService[service];
126
+ }
127
+
128
+ private getServicesListItemLocator(servicesName: string): By {
129
+ return By.xpath(`//tr[td[text()='${servicesName}']]//input`);
130
+ }
89
131
  }
@@ -0,0 +1,32 @@
1
+ /** *******************************************************************
2
+ * copyright (c) 2020-2024 Red Hat, Inc.
3
+ *
4
+ * This program and the accompanying materials are made
5
+ * available under the terms of the Eclipse Public License 2.0
6
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
7
+ *
8
+ * SPDX-License-Identifier: EPL-2.0
9
+ **********************************************************************/
10
+ import { e2eContainer } from '../../configs/inversify.config';
11
+ import { CLASSES } from '../../configs/inversify.types';
12
+ import { LoginTests } from '../../tests-library/LoginTests';
13
+ import { UserPreferences } from '../../pageobjects/dashboard/UserPreferences';
14
+ import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS';
15
+
16
+ suite('"Revoke OAuth" test', function (): void {
17
+ const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests);
18
+ const userPreferences: UserPreferences = e2eContainer.get(CLASSES.UserPreferences);
19
+ const gitService: string = FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER || 'github';
20
+
21
+ suiteSetup('Login', async function (): Promise<void> {
22
+ await loginTests.loginIntoChe();
23
+ });
24
+
25
+ test('Revoke OAuth test', async function (): Promise<void> {
26
+ await userPreferences.openUserPreferencesPage();
27
+ await userPreferences.openGitServicesTab();
28
+
29
+ const selectedService: string = userPreferences.getServiceConfig(gitService);
30
+ await userPreferences.revokeGitService(selectedService);
31
+ });
32
+ });
@@ -21,7 +21,7 @@ suite(`"Check User Preferences page" test ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT
21
21
  await loginTests.loginIntoChe();
22
22
  });
23
23
 
24
- test(`Check user preferences page`, async function (): Promise<void> {
24
+ test('Check user preferences page', async function (): Promise<void> {
25
25
  await userPreferences.openUserPreferencesPage();
26
26
  await userPreferences.checkTabsAvailability();
27
27
  });