-
Notifications
You must be signed in to change notification settings - Fork 754
/
ui-remote-debug.js
28 lines (28 loc) · 1.33 KB
/
ui-remote-debug.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
describe('UI', function () {
context('Remote Debugger', function () {
it('adds an element, in the way the UI does', function () {
cy.visit(Cypress.env('BS_URL'));
cy.get('#__bs_notify__').should('have.length', 1);
cy.request('POST', `${Cypress.env('BS_URL')}/__browser_sync__`,
JSON.stringify(["ui:element:add",
{
"src": "/browser-sync/pesticide.css",
"active": true,
"hidden": "",
"name": "pesticide",
"tagline": "Add simple CSS outlines to all elements. (powered by <a href=\"http://pesticide.io\" target=\"_blank\">Pesticide.io</a>)",
"context": "remote-debug",
"served": true,
"title": "CSS Outlining",
"type": "css",
"id": "__browser-sync-pesticide__",
"file": "/Users/shakyshane/sites/oss/browser-sync/node_modules/browser-sync-ui/lib/plugins/remote-debug/css/pesticide.min.css"
}
])
).then(res => {
console.log(res);
});
cy.get('[id="__browser-sync-pesticide__"]').should('have.length', 1);
});
});
});