Skip to content

Commit

Permalink
Fix up and clear
Browse files Browse the repository at this point in the history
  • Loading branch information
artaleks9 committed Mar 4, 2024
1 parent 063acb8 commit da79ec0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
12 changes: 3 additions & 9 deletions tests/e2e/specs/factory/Factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ suite(
const timeToRefresh: number = 1500;
const changesToCommit: string = new Date().getTime().toString();
const fileToChange: string = 'Date.txt';
/*const commitChangesButtonLabel: string = `Commit Changes on "${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}"`;*/
const refreshButtonLabel: string = 'Refresh';
const pushItemLabel: string = 'Push';
let testRepoProjectName: string;
Expand Down Expand Up @@ -141,7 +140,7 @@ suite(
test('Check if the changes are displayed in the source control manager', async function (): Promise<void> {
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click on: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
// wait while changes counter will be refreshed
await driverHelper.wait(timeToRefresh);
Expand All @@ -164,7 +163,7 @@ suite(
await scmProvider.commitChanges('Commit ' + changesToCommit);
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click on: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
// wait while changes counter will be refreshed
await driverHelper.wait(timeToRefresh);
Expand All @@ -174,11 +173,6 @@ suite(
});

test('Push the changes', async function (): Promise<void> {
/* await driverHelper.waitVisibility(
webCheCodeLocators.ScmView.actionConstructor(
`Push 1 commits to origin/${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_BRANCH}`
)
);*/
await driverHelper.waitVisibility(webCheCodeLocators.Notification.action);
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
Logger.debug('scmProvider.openMoreActions');
Expand All @@ -191,7 +185,7 @@ suite(
test('Check if the changes were pushed', async function (): Promise<void> {
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click on: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
const isCommitButtonDisabled: string = await driverHelper.waitAndGetElementAttribute(
webCheCodeLocators.Notification.action,
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ suite(
test('Check if the changes are displayed in the source control manager', async function (): Promise<void> {
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click on: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
// wait while changes counter will be refreshed
await driverHelper.wait(timeToRefresh);
Expand All @@ -181,7 +181,7 @@ suite(
await scmProvider.commitChanges('Commit ' + changesToCommit);
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click on: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
// wait while changes counter will be refreshed
await driverHelper.wait(timeToRefresh);
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ suite(
await scmProvider.commitChanges('Commit ' + changesToCommit);
await driverHelper.waitVisibility(webCheCodeLocators.ScmView.more);
await driverHelper.wait(timeToRefresh);
/* logger.debug(`scmProvider.takeAction: "${refreshButtonLabel}"`);*/
Logger.debug(`wait and click: "${refreshButtonLabel}"`);
await driverHelper.waitAndClick(webCheCodeLocators.ScmView.actionConstructor(refreshButtonLabel));
// wait while changes counter will be refreshed
await driverHelper.wait(timeToRefresh);
Expand Down

0 comments on commit da79ec0

Please sign in to comment.