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 app takes a while to launch, and without these rendering checks within each test file the tests can get flakey because of long
58
+
load times so these are here to ensure the app launches as expect before continuing, all test files have these tests in them
59
+
consider refactoring by moving them into the testSuite.js main file */
60
+
describe('Window rendering',()=>{
61
+
it('Electron app should launch',async()=>{
62
+
expect(electronApp).to.be.ok;
63
+
});
64
+
65
+
it('Electron app should be a visible window',async()=>{
66
+
constwindow=awaitelectronApp.firstWindow();
67
+
pwTest.expect(window).toBeVisible();
68
+
});
69
+
70
+
it('App should only have 1 window (i.e. confirm devTools is not open)',async()=>{
71
+
expect(electronApp.windows().length).to.equal(1);
72
+
});
73
+
});
74
+
75
+
/* test case 1: browser controller should add two http tests to the workspace, select "Send Collection", and receive valid responses for both tests
76
+
this test inconsistently works in isolation and fails when incorporated into the test suite, this is likely caused by an issue with the async functionality
77
+
I've commented out the collectionTest suite in testSuite.js file until this issue is resolved */
78
+
describe('http collection tests',()=>{
79
+
before(async()=>{
80
+
page=electronApp.windows()[0];// In case there is more than one window
81
+
awaitpage.waitForLoadState(`domcontentloaded`);
82
+
});
83
+
84
+
it('should GET information from two public APIs',async()=>{
85
+
consturl1='https://swapi.dev/api/people/1';
86
+
consturl2='https://swapi.dev/api/people/2';
87
+
constmethod='GET';
88
+
89
+
try{
90
+
awaitfillRestRequest(page,url1,method);
91
+
awaitpage.locator('button >> text=Add to Workspace').click();
92
+
awaitfillRestRequest(page,url2,method);
93
+
awaitpage.locator('button >> text=Add to Workspace').click();
/* test case 2: browser controller should add two graphQL tests to the workspace, select "Send Collection", and receive valid responses for both tests */
122
+
/* test case 3: browser controller should add two grpc tests to the workspace, select "Send Collection", and receive valid responses for both tests */
123
+
/* test case 4: browser controller should add two websocket tests to the workspace, select "Send Collection", and receive valid responses for both tests */
124
+
/* test case 5: browser controller should add 4 tests to the workspace of each API type, select "Send Collection", and receive valid responses for all tests */
0 commit comments