Skip to content

Commit

Permalink
fix: added container image test
Browse files Browse the repository at this point in the history
  • Loading branch information
mortadarefd committed Oct 20, 2023
1 parent e9ab59d commit 75709e6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/e2e-tests/pages/ExecutorGeneralSettingsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ export class ExecutorGeneralSettingsPage {
expect(executorTypeLocator.isVisible()).toBeTruthy();
}

public async selectContainerImageTab(): Promise<void> {
await this.page.click('div[data-test="sidebar-navigation-link:container-image"]');
}

public async validateContainerImageSettings(containerImage: string): Promise<void> {
const containerImageLocator = this.page.locator(
`//input[@id="container-image-settings-name-type_container_image" and @value="${containerImage}"]`
);
expect(containerImageLocator.isVisible()).toBeTruthy();
}

public async deleteExecutor(executorName: string): Promise<void> {
await this.page.click('button[data-testid="configuration-card-confirm-button"]');
await this.page.getByTestId('delete-entity-input').fill(executorName);
Expand Down
25 changes: 24 additions & 1 deletion packages/e2e-tests/tests/executors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,30 @@ test(`Custom container executor - delete executor`, async ({page}) => {
expect(isDeleted).toBeTruthy();
});

test.skip(`Custom container executor - container image`, async ({page}) => {});
test(`Custom container executor - container image`, async ({page}) => {
const executorName = 'container-executor-curl-1';
const executorData = testDataHandler.getExecutor(executorName);
const realExecutorName = executorData.name;
await api.assureExecutorCreated(executorData);

const mainPage = new MainPage(page);
await mainPage.visitMainPage();

const navigationSiderPage = new NavigationSiderPage(page);
await navigationSiderPage.openMenuItem('executors');

const executorsPage = new ExecutorsPage(page);
await executorsPage.openExecutorSettings(realExecutorName);

const executorGeneralSettingsPage = new ExecutorGeneralSettingsPage(page);

await executorGeneralSettingsPage.selectContainerImageTab();

await executorGeneralSettingsPage.validateContainerImageSettings(executorData.image);

// Cleanup
await api.removeExecutor(realExecutorName);
});

test.skip(`Custom container executor - command and arguments`, async ({page}) => {});

Expand Down

0 comments on commit 75709e6

Please sign in to comment.