我在Jasmine中有以下的测试,需要在2个不同的URL上执行,这2个URL是同一产品的不同版本:
describe('TEST ',function(){
var basePage = new BasePage();
var page1 = new Page1();
describe('TEST',function(){
beforeEach(function(){
browser.get('URL-1.html');
});
it('REUSE THIS TEST' , function (){
browser.wait(EC.visibilityOf(viewerWidgetPage.videoPlayer));
page1.videoControls.click();
expect(basePage.hasClass(page1.videoPlayer, 'vjs-playing')).toBeTruthy();
page1.audioControl.click();
//Verify that the video property is muted.
browser.executeAsyncScript_(function(callback){
callback(window.player.muted());
}).then(function(isMuted){
expect(isMuted).toBeFalsy();
});
page1.audioControl.click();
//Verify that the video property is muted.
browser.executeAsyncScript_(function(callback){
callback(window.player.muted());
}).then(function(isMuted){
expect(isMuted).toBeTruthy();
});
});
});
有没有任何方法可以在另一个测试中以任何方式使用“REUSE THIS TEST”这个'it'呢?