testcafe
testcafe copied to clipboard
Hammerhead request hangs on button click
What is your Test Scenario?
User is directed to multi-channel design styles after edit design with Creative Assistant.
What is the Current behavior?
The hammerhead request stays pending and the page never redirects after clicking Select Sizes button on the design edit page.
What is the Expected behavior?
Clicking Select Sizes button should redirect to the multichannel sizes page.
What is your web application and your TestCafe test code?
Your website URL (or attach your complete example):
https://mailchimp.com/
Your complete test code (or attach your test files):
import { Selector, t } from "testcafe";
export default new class LoginPage {
constructor() {
this.username = Selector("#username");
this.password = Selector("#password");
this.btnLogin = Selector("button[value='log in']");
}
async login(user, pwd) {
await t
.click(this.username)
.typeText(this.username, user)
.typeText(this.password, pwd)
.click(this.btnLogin);
}
}
import { Selector, t } from "testcafe";
export default new class ContentStudioPage {
constructor() {
this.loadingFrame = Selector("[class *= 'frame'] [class *= 'loading']");
this.fallback = Selector("#fallback:not([title *='Loading'])").with({
visibilityCheck: true,
timeout: 30000
});
this.urlField = Selector("input")
.withAttribute("name", "siteUrl")
.with({visibilityCheck: true, timeout: 10000});
this.showMeDesign = Selector("button")
.withText("Show Me Designs")
.with({visibilityCheck: true, timeout: 20000});
this.designHeading = Selector("h2")
.withAttribute("class", /heading/)
.with({visibilityCheck: true, timeout: 90000});
this.designSkeleton = Selector("div")
.withAttribute("class", /designSkeletonContainer/)
.with({visibilityCheck: true, timeout: 90000});
this.editDesignButton = Selector("button")
.withText("Edit Design")
.with({timeout: 20000, visibilityCheck: true});
this.designAssetAdTweaker = Selector("ad-tweaker")
.withAttribute("class", "hydrated")
.with({visibilityCheck: true});
this.selectSizesButton = Selector("button").withExactText("Select Sizes");
this.designCaption = Selector(
"[data-dojo-attach-point='autoDesigner'] [class *= 'design'] label"
);
this.fullWidthCheckbox = Selector("div")
.withExactText("Full Width")
.child("input[type = 'checkbox']")
.with({timeout: 15000});
}
async enterFallbackIframe() {
await t
.expect(this.loadingFrame.classNames)
.notMatch(/active/, "container loading frame active", {timeout: 60000})
.switchToIframe(this.fallback);
}
async createDesignFrom(url) {
await this.enterFallbackIframe();
await t.typeText(this.urlField, url);
await t.click(this.showMeDesign);
}
async waitForDesignLoad() {
await this.designHeading();
await this.designSkeleton();
await t
.expect(this.designSkeleton.exists)
.notOk("Designs finished loading", {timeout: 90000});
}
async selectEditDesign() {
await this.editDesignButton();
await t.click(this.editDesignButton);
await this.designAssetAdTweaker();
}
async clickSelectSizes() {
await t.click(this.selectSizesButton);
await t.debug();
}
}
import { Selector } from "testcafe";
import loginPage from "../../models/page_model/LoginPage";
import contentStudioPage from "../../models/page_model/ContentStudio";
fixture `Mailchimp`
.page('https://mailchimp.com/login')
.beforeEach(async t => {
await t.maximizeWindow();
await loginPage.login('******', '******'); // Supply own credentials
await t.click(Selector("li a").withAttribute("href", "/content"));
});
test("User is directed to multi-channel design styles after edit design with Creative Assistant", async () => {
await contentStudioPage.createDesignFrom("https://mailchi.mp/43743693146d/landing-page-for-creative-assistant");
await contentStudioPage.waitForDesignLoad();
await contentStudioPage.selectEditDesign();
await contentStudioPage.clickSelectSizes(); // Button continues to show it's loading hangs and hammerhead request remains pending indefinitely
});
Your complete configuration file (if any):
Your complete test report:
``` ```Screenshots:

Steps to Reproduce:
- Go to mailchimp.com
- Log in
- Navigate to Content Studio
- Enter a url and click "Show Me Designs"
- Select "Edit Design" button on one of the four designs
- Click "Select Style" button
Your Environment details:
- testcafe version: 1.14.2
- node.js version: 10.16.3
- command-line arguments:
testcafe chrome ./test.js - browser name and version:
Chrome 91.0.4472.77 - platform and version:
macOS 10.15.7
@kacy-weakley
Hello,
I reproduced this issue in Windows 10 and Chrome 91. The issue looks like a duplicate of https://github.com/DevExpress/testcafe/issues/6008. So, I'll close this thread. We will examine your case in the context of the following issue: https://github.com/DevExpress/testcafe/issues/6008.