From daa19939587ac1d7941a48c2b60adc62d5468b2f Mon Sep 17 00:00:00 2001 From: Aleksandr Shmaraiev Date: Tue, 10 Oct 2023 19:16:56 +0300 Subject: [PATCH] Fix 'factory' tests according to review --- tests/e2e/specs/factory/Factory.spec.ts | 3 ++- tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts | 3 ++- tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/e2e/specs/factory/Factory.spec.ts b/tests/e2e/specs/factory/Factory.spec.ts index fa41666883c..fda655ff467 100644 --- a/tests/e2e/specs/factory/Factory.spec.ts +++ b/tests/e2e/specs/factory/Factory.spec.ts @@ -46,7 +46,8 @@ suite( const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); - const webCheCodeLocators: Locators = new CheCodeLocatorLoader().webCheCodeLocators; + const cheCodeLocatorLoader: CheCodeLocatorLoader = e2eContainer.get(CLASSES.CheCodeLocatorLoader); + const webCheCodeLocators: Locators = cheCodeLocatorLoader.webCheCodeLocators; const oauthPage: OauthPage = e2eContainer.get(CLASSES.OauthPage); let projectSection: ViewSection; diff --git a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts index 47178bf66a2..21d943327be 100644 --- a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts +++ b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts @@ -46,7 +46,8 @@ suite( const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); - const webCheCodeLocators: Locators = new CheCodeLocatorLoader().webCheCodeLocators; + const cheCodeLocatorLoader: CheCodeLocatorLoader = e2eContainer.get(CLASSES.CheCodeLocatorLoader); + const webCheCodeLocators: Locators = cheCodeLocatorLoader.webCheCodeLocators; const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); const workspaces: Workspaces = e2eContainer.get(CLASSES.Workspaces); diff --git a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts index f8c0cf2b874..27967ce3f67 100644 --- a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts +++ b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts @@ -45,7 +45,8 @@ suite( const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests); const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); - const webCheCodeLocators: Locators = new CheCodeLocatorLoader().webCheCodeLocators; + const cheCodeLocatorLoader: CheCodeLocatorLoader = e2eContainer.get(CLASSES.CheCodeLocatorLoader); + const webCheCodeLocators: Locators = cheCodeLocatorLoader.webCheCodeLocators; const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); const oauthPage: OauthPage = e2eContainer.get(CLASSES.OauthPage);