내가 각도기를 사용하고 취급. 사용자가 객체를 생성하기위한 중복 값을 입력 즉 때 나는 그것이 만들어지지한다 그것으로 부정적인 시나리오를 테스트하기 위해 노력하고있어, 사용자 2 ~ 3 초 후에 사라 모달 상자에 오류 메시지 (얻어야한다). 그러나 클릭시 모달 상자의 가시성을 테스트하는 동안 분도기에서 오류가 발생합니다. 여기응용 프로그램의 E2E 테스트 (오이 JS 포함) (오이 JS와) 각도기에서 모달 팝업
Scenario: User sets in a duplicate logical object name
If a user enters a name which is the duplicate of an existing logical object, they should not be able
to create the logical object
When the user clicks on the "New" button
Then the "New Logical Object" panel should be displayed
Given the user enters "Part" in the "Name" field in the form
And the user enters "Part Description" in the "Description" textarea in the form
And the user uploads the "ProjectManagement.png" file
When the user clicks on the "Create" button in the form
Then there should be an error message in the form of a popup
stepdef 파일은 다음과 같습니다 :
@Then(/^there should be an error message in the form of a popup$/)
public assertPopUpError() {
return StepDefUtil.executeInIFrame<BladePanelPage>(BladePanelPage, (page: BladePanelPage) => {
page.assertPopUpErrorMessage();
});
}
페이지 파일 (BladePanelPage.ts)
/**
* Asserts presence of popup message- for a step which fails .
*
*
* @return Promise.
*/
public assertPopUpErrorMessage(): Chai.PromisedAssertion {
let xpathString = '//aw-pop-up-message//div[contains(@class, 'aw-modal-content')]';
return expect(element(by.xpath(xpathString)).isPresent()).to.eventually.equal(true, 'The Element with xpath "' + xpath + '" is not displayed');
}
여기 내 코드는AW-팝업 메시지
사용자 정의 Angular2입니다 구성 요소.
각도기에서 오는 오류 메시지는 다음과 같습니다
E/실행 - 요소가 XPath는 에 "// 아 - 팝업 메시지 // DIV [포함 (@class,"아 -modal 콘텐츠는 ")]" 표시되지 :
사실 같게 오류 예상은 I 및 herehere 나타낸 방법을 시도했지만 작동되지 않는다. protractor.config.js 파일에서 애니메이션을 비활성화해도 작동하지 않는 것 같습니다. 도움이 될 것입니다.