Skip to content

Commit f94064f

Browse files
committed
separate constatns to constant file
1 parent 1f45f33 commit f94064f

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS,
8+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
* See the License for the specific language governing permissions and
10+
* limitations under the License.
11+
*/
12+
13+
export const E2E_TEST_FOLDER = 'E2E_TEST_FOLDER';
14+
export const BASE_URL = 'http://localhost:4200';
15+
16+
export const NOTEBOOK_PATTERNS = {
17+
URL_REGEX: /\/notebook\/[^\/\?]+/,
18+
URL_EXTRACT_NOTEBOOK_ID_REGEX: /\/notebook\/([^\/\?]+)/
19+
} as const;

zeppelin-web-angular/e2e/models/base-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import { Locator, Page } from '@playwright/test';
14-
import { E2E_TEST_FOLDER } from 'e2e/utils';
14+
import { E2E_TEST_FOLDER } from '../constants';
1515

1616
export class BasePage {
1717
readonly page: Page;

zeppelin-web-angular/e2e/utils.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import { test, Page, TestInfo } from '@playwright/test';
1414
import { LoginTestUtil } from './models/login-page.util';
1515
import { NotebookUtil } from './models/notebook.util';
16+
import { E2E_TEST_FOLDER, NOTEBOOK_PATTERNS } from './constants';
1617

1718
export const PAGES = {
1819
// Main App
@@ -98,14 +99,6 @@ export const PAGES = {
9899
}
99100
} as const;
100101

101-
export const NOTEBOOK_PATTERNS = {
102-
URL_REGEX: /\/notebook\/[^\/\?]+/,
103-
URL_EXTRACT_NOTEBOOK_ID_REGEX: /\/notebook\/([^\/\?]+)/
104-
} as const;
105-
106-
export const E2E_TEST_FOLDER = 'E2E_TEST_FOLDER';
107-
export const BASE_URL = 'http://localhost:4200';
108-
109102
export const addPageAnnotation = (pageName: string, testInfo: TestInfo) => {
110103
testInfo.annotations.push({
111104
type: 'page',

0 commit comments

Comments
 (0)