You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current method of opening a new tab to display inner .tt documents cannot be tested using testcafe. Somehow the test runs on firefox, firefox:headless and chrome but fails on chrome:headless when trying to detect the child iframe.
This is because at present, TestCafe doesn't support work with sites whose code contains the window.open call for the main browser window. The issue can be found here.
Following the discussion, an issue was added to TestCafe and is still open at the moment.
Current testcode
test("New tabs ",async(t)=>{awaituploadDocument("./fixture/doc-inner-tt-json-ropsten.json");constTabDefault=Selector("[data-testid='default']");constTabAttachment=Selector("[data-testid='tab-attachment']");constAttachmentNumber=Selector("[data-testid='attachment-number']");constAttachmentDownloadLink=Selector("[data-testid='attachment-download-link']");constOpenLink=Selector("[data-testid='attachment-open-link']");constAttachmentLink0OpenLink=Selector("[data-testid='attachment-open-link']").nth(0);constAttachmentLink1OpenLink=Selector("[data-testid='attachment-open-link']").nth(1);// tabs number should tallyawaitTabDefault.with({visibilityCheck: true})();awaitt.expect(TabAttachment.textContent).contains("Attachments");awaitt.expect(AttachmentNumber.textContent).contains("3");// pdf tabs content should render (pdf rendering is slow on ci causing flaky test, await specifically for pdf spans to render before text validation checks)awaitt.click(TabAttachment);awaitTabAttachment.with({visibilityCheck: true})();// check file downloadawaitt.expect(AttachmentDownloadLink.count).eql(3);//open-link only for .tt and .json OA filesawaitt.expect(OpenLink.count).eql(2);awaitt.click(AttachmentLink0OpenLink);constcurrWindow=awaitt.getCurrentWindow();awaitvalidateIframeTexts(["INVOICE"]);//failing here possibly due to iframe not being detected in new tab//close new tab and go back to parent windowawaitt.closeWindow(currWindow);awaitt.click(AttachmentLink1OpenLink);awaitvalidateIframeTexts(["INVOICE"]);});
The text was updated successfully, but these errors were encountered:
Description:
The current method of opening a new tab to display inner .tt documents cannot be tested using testcafe. Somehow the test runs on firefox, firefox:headless and chrome but fails on chrome:headless when trying to detect the child iframe.
![photo6210994504039771004](https://user-images.githubusercontent.com/38589870/100825345-c6cb1680-3492-11eb-9e7e-e1380a7f04cb.jpg)
This is because at present, TestCafe doesn't support work with sites whose code contains the
window.open
call for the main browser window. The issue can be found here.Following the discussion, an issue was added to TestCafe and is still open at the moment.
Current testcode
The text was updated successfully, but these errors were encountered: