Merge branch 'feature/Digital/CASH-205' of https://github.com/Safelite/DigitalConsumer.FixMyGlass into feature/Digital/CASH-205
This commit is contained in:
commit
9251dedc38
6 changed files with 29 additions and 25 deletions
|
|
@ -4,9 +4,13 @@
|
|||
# Environment type
|
||||
NODE_ENV="qa"
|
||||
|
||||
SKIP_CONTENT_SITE=false
|
||||
|
||||
# Base URLs by environment (uncomment the one you need)
|
||||
# qa
|
||||
BASE_URL="https://www-qa2.safelite.com/"
|
||||
# qa with skipToInsurance Turned Off
|
||||
# BASE_URL="https://fixmyglassqa.safelite.com/?cns=all&experiments=ConceptFunnel=ConceptFunnel_V1=ConceptFunnel_VinAndEmailOptional=true,NextGen_IGQSkipToInsurance=NextGen_IGQSkipToInsurance_V1=NextGen_IGQSkipToInsurance_CONTROL=true"
|
||||
# sys
|
||||
# BASE_URL="https://www-test2.safelite.com/fmg/?fmgPage=vehicle"
|
||||
# dev
|
||||
|
|
|
|||
|
|
@ -1,11 +1,3 @@
|
|||
schedules:
|
||||
- cron: 0 9 * * MON-FRI
|
||||
always: true
|
||||
displayName: Daily Test Automation Run for FMG-NextGen
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
|
||||
pool: 'AmazonLinuxPool'
|
||||
|
||||
variables:
|
||||
|
|
@ -50,10 +42,10 @@ stages:
|
|||
container_id=$(docker create \
|
||||
--ipc=host \
|
||||
-e CCIS_API_AUTH=$(CCIS_API_AUTH) \
|
||||
-e BASE_URL=$(BASE_URL) \
|
||||
-e BASE_URL="$(BASE_URL)" \
|
||||
-e CCIS_API_URL=$(CCIS_API_URL) \
|
||||
-e ADMIN_SERVICE_API_URL=$(ADMIN_SERVICE_API_URL) \
|
||||
-e SHARD=$(shardNumber) \
|
||||
-e SKIP_CONTENT_SITE=$(SKIP_CONTENT_SITE) \
|
||||
-e CI=true \
|
||||
-e NODE_ENV=$(NODE_ENV) \
|
||||
$(dockerImageName):$(imageTag) \
|
||||
|
|
@ -131,6 +123,7 @@ stages:
|
|||
-e REPORT_NAME="$report_name" \
|
||||
-e CURRENT_DAY="$current_day" \
|
||||
-e NUMERIC_DATE="$numeric_date" \
|
||||
-e NODE_ENV=$(NODE_ENV) \
|
||||
$(dockerImageName):$(imageTag) \
|
||||
bash -c "chmod +x devops/scripts/jira_writeback.sh
|
||||
echo \"Moving Playwright reports out of subfolders...\"
|
||||
|
|
@ -151,7 +144,7 @@ stages:
|
|||
fi
|
||||
|
||||
echo \"Writing report to Jira card '$jira_card_number'...\"
|
||||
/app/devops/scripts/jira_writeback.sh add_comment \"$jira_card_number\" /app/ortoni-report/\${REPORT_NAME} \"AUTOMATED TEST RUN: $(date) - \${CURRENT_DAY} (\${NUMERIC_DATE})\" ")
|
||||
/app/devops/scripts/jira_writeback.sh add_comment \"$jira_card_number\" /app/ortoni-report/\${REPORT_NAME} \"AUTOMATED TEST RUN: $(date) - \${CURRENT_DAY} (\${NUMERIC_DATE}) - Environment: \${NODE_ENV}\" ")
|
||||
|
||||
# Start container and stream logs
|
||||
echo "Starting merge"
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export function getCustomerDetails(): ICustomerDetails {
|
|||
street: faker.location.streetAddress(),
|
||||
city: 'Columbus',
|
||||
state: 'Ohio',
|
||||
postalCode: '43215',
|
||||
postalCode: '21237',
|
||||
country: 'United States'
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export class ServiceLocationPage extends BasePage {
|
|||
|
||||
// For in-shop and drop off
|
||||
this.selectAShopOptions = this.page.locator('[class="shop-question"]');
|
||||
this.firstAppointmentButton = this.page.locator('div').filter({ hasText: /Appts/}).first();
|
||||
this.firstAppointmentButton = this.page.locator('fieldset:has(legend#chooseShop)').locator('label').first();
|
||||
this.changeZipButton = this.page.locator('a:has(span.sr-only:has-text("edit zip code"))');
|
||||
this.updateZipTextBox = this.page.locator('#serviceZipCode');
|
||||
this.saveZipButton = this.page.getByText('Save ZIP code', { exact: true });
|
||||
|
|
@ -71,7 +71,7 @@ export class ServiceLocationPage extends BasePage {
|
|||
this.vehicleProtectedYesButton = this.page.locator('label').filter({ hasText: 'Yes' }).locator('div');
|
||||
this.vehicleProtectedNoButton = this.page.locator('label').filter({ hasText: 'No' }).locator('div');
|
||||
this.saveAddressButton = this.page.getByRole('button', { name: 'Continue' })
|
||||
this.repeatedClicksModalCloseButton = this.page.getByRole('img').nth(1);
|
||||
this.repeatedClicksModalCloseButton = this.page.locator('.QSISlider').locator('img[src*=\'close\']');
|
||||
}
|
||||
|
||||
async selectLocation(appointmentDetails: IAppointmentDetails){
|
||||
|
|
@ -103,9 +103,14 @@ export class ServiceLocationPage extends BasePage {
|
|||
await this.saveZipButton.click();
|
||||
}
|
||||
await this.inShopButton.click();
|
||||
await this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).check();
|
||||
await this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).scrollIntoViewIfNeeded().then(() => this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).click());
|
||||
} else {
|
||||
await this.firstAppointmentButton.click();
|
||||
await this.firstAppointmentButton.scrollIntoViewIfNeeded().then(async () => {
|
||||
await this.firstAppointmentButton.click();
|
||||
if (appointmentDetails) {
|
||||
appointmentDetails.shopAddress = await this.firstAppointmentButton.locator('.row-two').innerText();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -114,9 +119,6 @@ export class ServiceLocationPage extends BasePage {
|
|||
await this.mobileButton.click();
|
||||
await this.enterServiceAddressButton.click();
|
||||
await this.addressForm.populateAddress({ address: appointmentDetails.serviceAddress! });
|
||||
if (await this.repeatedClicksModalCloseButton.isVisible()) {
|
||||
await this.repeatedClicksModalCloseButton.click();
|
||||
}
|
||||
if (faker.datatype.boolean()) {
|
||||
await this.vehicleProtectedYesButton.check();
|
||||
} else {
|
||||
|
|
@ -133,8 +135,13 @@ export class ServiceLocationPage extends BasePage {
|
|||
if (appointmentDetails && appointmentDetails.shopAddress) {
|
||||
await this.selectAShopOptions.locator(`[buttonbodycopy="${appointmentDetails.shopAddress}"]`).check();
|
||||
} else {
|
||||
// await this.firstAppointmentButton.click();
|
||||
await this.clickWithRetry(this.firstAppointmentButton, this.page);
|
||||
/// await this.clickWithRetry(this.firstAppointmentButton, this.page);
|
||||
await this.firstAppointmentButton.scrollIntoViewIfNeeded().then(async () => {
|
||||
await this.firstAppointmentButton.click();
|
||||
if (appointmentDetails) {
|
||||
appointmentDetails.shopAddress = await this.firstAppointmentButton.locator('.row-two').innerText();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export class ServicePackagesPage extends BasePage {
|
|||
this.closeButton = this.page. getByRole('dialog').locator('button').filter({ hasText: 'Close' });
|
||||
this.promoCodeTextbox = this.page.getByLabel('Enter a promo code');
|
||||
this.applyPromoButton = this.page.getByRole('button', { name: 'Apply promo code' });
|
||||
this.repeatedClicksModalCloseButton = this.page.getByRole('img').nth(1);
|
||||
this.repeatedClicksModalCloseButton = this.page.locator('.QSISlider').locator('img[src*=\'close\']');
|
||||
|
||||
// this.validateURL(this.url);
|
||||
}
|
||||
|
|
@ -76,8 +76,8 @@ export class ServicePackagesPage extends BasePage {
|
|||
if (await this.repeatedClicksModalCloseButton.isVisible()) {
|
||||
await this.repeatedClicksModalCloseButton.click();
|
||||
}
|
||||
await this.page.waitForTimeout(3000);
|
||||
await this.closeButton.click();
|
||||
|
||||
} else {
|
||||
await this.skipQuoteEmailButton.click();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ async function runWorkflow(page: Page, testCase: TestCase) {
|
|||
|
||||
//============================= TEST WORKFLOW STEPS =============================
|
||||
|
||||
// Execute home page for qa and dev environments (skip for sys)
|
||||
if (process.env.NODE_ENV !== 'sys') {
|
||||
// Use Environment Variable to decide whether or not we want to skip content site aka home page
|
||||
if (process.env.SKIP_CONTENT_SITE == "false") {
|
||||
await test.step('HomePage >> Lets Get Started', async () => {
|
||||
let homePage = testCase.pages.homePage;
|
||||
console.log(`Customer for this test: ${customerDetails?.firstName} ${customerDetails?.lastName}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue