Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-4864

Make 'Check the project files were imported' test in Che test framework not use view section name

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Is your task related to a problem? Please describe

      Because of new UI changies in Che Code editor we should fix tests which checks if project section created and files imported.

      Describe the solution you'd like

      The existing code should be replaced for fix in all related test specs

              const projectSection: ViewSection = await new SideBarView().getContent().getSection(projectName);
              await projectSection.findItem(BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME);
      

      Fix:

              async getProjectViewSession(): Promise<ViewSection> {
      		Logger.debug();
      
      		const viewContent: ViewContent = new SideBarView().getContent();
                      // ADD WAITER FOR ALL PROJECT TREE WILL BE LOADED
      		const [projectSection]: ViewSection[] = await viewContent.getSections();
      		return projectSection;
      	}
      
              test('Check the project files were imported', async function (): Promise<void> {
      		const projectSection: ViewSection = await projectAndFileTests.getProjectViewSection();
      		expect(await projectSection.findItem(BASE_TEST_CONSTANTS.TS_SELENIUM_PROJECT_ROOT_FILE_NAME), 'Files not imported').not.undefined;
      	});
      

      Affected tests:

      1. Factory test
      2. Quarkus.spec.ts - https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/12047/console
      3. CreateWorkspaceWithExistedName.spec.ts - https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/12046/
      4. https://github.com/eclipse/che/blob/e862bb5bd316ae8ca9f1a62a47b33ceb0c4f5ce2/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts#L69
      5. https://github.com/eclipse/che/blob/e862bb5bd316ae8ca9f1a62a47b33ceb0c4f5ce2/tests/e2e/specs/devconsole-intergration/DevConsoleIntegration.spec.ts#L92
      6. https://github.com/eclipse/che/blob/e862bb5bd316ae8ca9f1a62a47b33ceb0c4f5ce2/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts#L66
      7. https://github.com/eclipse/che/blob/e862bb5bd316ae8ca9f1a62a47b33ceb0c4f5ce2/SmokeTest.spec.ts#L54

              rh-ee-mdolhalo Maryna Dolhalova (Inactive)
              rh-ee-mdolhalo Maryna Dolhalova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: