How to use full method in Cypress

Best JavaScript code snippet using cypress

op-copy.js

Source:op-copy.js Github

copy

Full Screen

1var testCases = [2 {3 name: 'CopyFileSimple',4 precondition: [5 {fullPath:'/a', isDirectory:true},6 {fullPath:'/a/b'}7 ],8 tests: [9 function(helper) { helper.copy('/a/b', '/a', 'c'); }10 ],11 postcondition: [12 {fullPath:'/a', isDirectory:true},13 {fullPath:'/a/b'},14 {fullPath:'/a/c'}15 ],16 },17 {18 name: 'CopyDirectorySimple',19 precondition: [20 {fullPath:'/a', isDirectory:true},21 {fullPath:'/a/b', isDirectory:true}22 ],23 tests: [24 function(helper) { helper.copy('/a/b', '/a', 'c'); },25 ],26 postcondition: [27 {fullPath:'/a', isDirectory:true},28 {fullPath:'/a/b', isDirectory:true},29 {fullPath:'/a/c', isDirectory:true}30 ],31 },32 {33 name: 'CopyFileToDifferentDirectory',34 precondition: [35 {fullPath:'/a', isDirectory:true},36 {fullPath:'/a/b'},37 {fullPath:'/c', isDirectory:true}38 ],39 tests: [40 function(helper) { helper.copy('/a/b', '/c', 'd'); },41 ],42 postcondition: [43 {fullPath:'/a', isDirectory:true},44 {fullPath:'/a/b'},45 {fullPath:'/c/d'}46 ],47 },48 {49 name: 'CopyFileWithEmptyName',50 precondition: [51 {fullPath:'/a', isDirectory:true},52 {fullPath:'/a/b'},53 {fullPath:'/c', isDirectory:true},54 ],55 tests: [56 function(helper) { helper.copy('/a/b', '/c', null); },57 ],58 postcondition: [59 {fullPath:'/a', isDirectory:true},60 {fullPath:'/a/b'},61 {fullPath:'/c/b'}62 ],63 },64 {65 name: 'CopyFileWithEmptyNameToSameDirectory',66 precondition: [67 {fullPath:'/a', isDirectory:true},68 {fullPath:'/a/b'},69 ],70 tests: [71 function(helper) { helper.copy('/a/b', '/a', null, FileError.INVALID_MODIFICATION_ERR); },72 ],73 postcondition: [74 {fullPath:'/a', isDirectory:true},75 {fullPath:'/a/b'},76 ],77 },78 {79 name: 'CopyFileWithSameName',80 precondition: [81 {fullPath:'/a', isDirectory:true},82 {fullPath:'/a/b'},83 ],84 tests: [85 function(helper) { helper.copy('/a/b', '/a', 'b', FileError.INVALID_MODIFICATION_ERR); },86 ],87 postcondition: [88 {fullPath:'/a', isDirectory:true},89 {fullPath:'/a/b'},90 ],91 },92 {93 name: 'CopyForNonExistentEntry',94 precondition: [95 {fullPath:'/a', isDirectory:true},96 {fullPath:'/a/b'},97 {fullPath:'/c', isDirectory:true},98 ],99 tests: [100 function(helper) { helper.remove('/a/b'); },101 function(helper) { helper.copy('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },102 ],103 postcondition: [104 {fullPath:'/a', isDirectory:true},105 {fullPath:'/c', isDirectory:true},106 ],107 },108 {109 name: 'CopyEntryToNonExistentDirectory',110 precondition: [111 {fullPath:'/a', isDirectory:true},112 {fullPath:'/a/b'},113 {fullPath:'/c', isDirectory:true},114 ],115 tests: [116 function(helper) { helper.remove('/c'); },117 function(helper) { helper.copy('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },118 ],119 postcondition: [120 {fullPath:'/a', isDirectory:true},121 {fullPath:'/a/b'},122 ],123 },124 {125 name: 'CopyEntryToItsChild',126 precondition: [127 {fullPath:'/a', isDirectory:true},128 {fullPath:'/a/b', isDirectory:true},129 {fullPath:'/a/b/c', isDirectory:true},130 ],131 tests: [132 function(helper) { helper.copy('/a', '/a/b', 'd', FileError.INVALID_MODIFICATION_ERR); },133 function(helper) { helper.copy('/a/b', '/a/b/c', 'd', FileError.INVALID_MODIFICATION_ERR); },134 ],135 postcondition: [136 {fullPath:'/a', isDirectory:true},137 {fullPath:'/a/b', isDirectory:true},138 {fullPath:'/a/b/c', isDirectory:true},139 ],140 },141 {142 name: 'CopyRecursive',143 precondition: [144 {fullPath:'/a', isDirectory:true},145 {fullPath:'/a/b', isDirectory:true},146 {fullPath:'/a/b/c'},147 {fullPath:'/a/b/d'},148 {fullPath:'/b', isDirectory:true},149 ],150 tests: [151 function(helper) { helper.copy('/a', '/b', 'a'); },152 ],153 postcondition: [154 {fullPath:'/a', isDirectory:true},155 {fullPath:'/a/b', isDirectory:true},156 {fullPath:'/a/b/c'},157 {fullPath:'/a/b/d'},158 {fullPath:'/b/a', isDirectory:true},159 {fullPath:'/b/a/b', isDirectory:true},160 {fullPath:'/b/a/b/c'},161 {fullPath:'/b/a/b/d'},162 ],163 },164 {165 name: "OverwritingCopyFileToFile",166 precondition: [167 {fullPath:"/a"},168 {fullPath:"/b"},169 ],170 tests: [171 function(helper) {helper.copy("/a","/","b");}172 ],173 postcondition: [174 {fullPath:"/a"},175 {fullPath:"/b"},176 ],177 },178 {179 name: "OverwritingCopyDirectoryToEmptyDirectory",180 precondition: [181 {fullPath:"/a", isDirectory:true},182 {fullPath:"/a/b"},183 {fullPath:"/c", isDirectory:true},184 ],185 tests: [186 function(helper) {helper.copy("/a","/","c");}187 ],188 postcondition: [189 {fullPath:"/a", isDirectory:true},190 {fullPath:"/a/b"},191 {fullPath:"/c", isDirectory:true},192 {fullPath:"/c/b"},193 ],194 },195 {196 name: "OverwritingCopyFileToDirectory",197 precondition: [198 {fullPath:"/a"},199 {fullPath:"/b", isDirectory: true},200 ],201 tests: [202 function(helper) {helper.copy("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}203 ],204 postcondition: [205 {fullPath:"/a"},206 {fullPath:"/b", isDirectory: true},207 ],208 },209 {210 name: "OverwritingCopyDirectoryToFile",211 precondition: [212 {fullPath:"/a", isDirectory: true},213 {fullPath:"/b"},214 ],215 tests: [216 function(helper) {helper.copy("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}217 ],218 postcondition: [219 {fullPath:"/a", isDirectory: true},220 {fullPath:"/b"},221 ],222 },223 {224 name: "OverwritingCopyFileToNonemptyDirectory",225 precondition: [226 {fullPath:"/a"},227 {fullPath:"/b", isDirectory: true},228 {fullPath:"/b/c"},229 ],230 tests: [231 function(helper) {helper.copy("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}232 ],233 postcondition: [234 {fullPath:"/a"},235 {fullPath:"/b", isDirectory: true},236 {fullPath:"/b/c"},237 ],238 },239 {240 name: "OverwritingCopyDirectoryToNonemptyDirectory",241 precondition: [242 {fullPath:"/a", isDirectory: true},243 {fullPath:"/a/b"},244 {fullPath:"/c", isDirectory: true},245 {fullPath:"/c/d"},246 ],247 tests: [248 function(helper) {helper.copy("/a","/","c",FileError.INVALID_MODIFICATION_ERR);}249 ],250 postcondition: [251 {fullPath:"/a", isDirectory: true},252 {fullPath:"/a/b"},253 {fullPath:"/c", isDirectory: true},254 {fullPath:"/c/d"},255 ],256 },...

Full Screen

Full Screen

op-move.js

Source:op-move.js Github

copy

Full Screen

1var testCases = [2 {3 name: 'MoveFileSimple',4 precondition: [5 {fullPath:'/a', isDirectory:true},6 {fullPath:'/a/b'}7 ],8 tests: [9 function(helper) { helper.move('/a/b', '/a', 'c'); }10 ],11 postcondition: [12 {fullPath:'/a', isDirectory:true},13 {fullPath:'/a/b', nonexistent:true},14 {fullPath:'/a/c'}15 ],16 },17 {18 name: 'MoveDirectorySimple',19 precondition: [20 {fullPath:'/a', isDirectory:true},21 {fullPath:'/a/b', isDirectory:true}22 ],23 tests: [24 function(helper) { helper.move('/a/b', '/a', 'c'); },25 ],26 postcondition: [27 {fullPath:'/a', isDirectory:true},28 {fullPath:'/a/b', nonexistent:true},29 {fullPath:'/a/c', isDirectory:true}30 ],31 },32 {33 name: 'MoveFileToDifferentDirectory',34 precondition: [35 {fullPath:'/a', isDirectory:true},36 {fullPath:'/a/b'},37 {fullPath:'/c', isDirectory:true}38 ],39 tests: [40 function(helper) { helper.move('/a/b', '/c', 'd'); },41 ],42 postcondition: [43 {fullPath:'/a', isDirectory:true},44 {fullPath:'/a/b', nonexistent:true},45 {fullPath:'/c/d'}46 ],47 },48 {49 name: 'MoveFileWithEmptyName',50 precondition: [51 {fullPath:'/a', isDirectory:true},52 {fullPath:'/a/b'},53 {fullPath:'/c', isDirectory:true},54 ],55 tests: [56 function(helper) { helper.move('/a/b', '/c', null); },57 ],58 postcondition: [59 {fullPath:'/a', isDirectory:true},60 {fullPath:'/a/b', nonexistent:true},61 {fullPath:'/c/b'}62 ],63 },64 {65 name: 'MoveFileWithEmptyNameToSameDirectory',66 precondition: [67 {fullPath:'/a', isDirectory:true},68 {fullPath:'/a/b'},69 ],70 tests: [71 function(helper) { helper.move('/a/b', '/a', null, FileError.INVALID_MODIFICATION_ERR); },72 ],73 postcondition: [74 {fullPath:'/a', isDirectory:true},75 {fullPath:'/a/b'},76 ],77 },78 {79 name: 'MoveFileWithSameName',80 precondition: [81 {fullPath:'/a', isDirectory:true},82 {fullPath:'/a/b'},83 ],84 tests: [85 function(helper) { helper.move('/a/b', '/a', 'b', FileError.INVALID_MODIFICATION_ERR); },86 ],87 postcondition: [88 {fullPath:'/a', isDirectory:true},89 {fullPath:'/a/b'},90 ],91 },92 {93 name: 'MoveForNonExistentEntry',94 precondition: [95 {fullPath:'/a', isDirectory:true},96 {fullPath:'/a/b'},97 {fullPath:'/c', isDirectory:true},98 ],99 tests: [100 function(helper) { helper.remove('/a/b'); },101 function(helper) { helper.move('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },102 ],103 postcondition: [104 {fullPath:'/a', isDirectory:true},105 {fullPath:'/c', isDirectory:true},106 ],107 },108 {109 name: 'MoveEntryToNonExistentDirectory',110 precondition: [111 {fullPath:'/a', isDirectory:true},112 {fullPath:'/a/b'},113 {fullPath:'/c', isDirectory:true},114 ],115 tests: [116 function(helper) { helper.remove('/c'); },117 function(helper) { helper.move('/a/b', '/c', 'b', FileError.NOT_FOUND_ERR); },118 ],119 postcondition: [120 {fullPath:'/a', isDirectory:true},121 {fullPath:'/a/b'},122 ],123 },124 {125 name: 'MoveEntryToItsChild',126 precondition: [127 {fullPath:'/a', isDirectory:true},128 {fullPath:'/a/b', isDirectory:true},129 {fullPath:'/a/b/c', isDirectory:true},130 ],131 tests: [132 function(helper) { helper.move('/a', '/a/b', 'd', FileError.INVALID_MODIFICATION_ERR); },133 function(helper) { helper.move('/a/b', '/a/b/c', 'd', FileError.INVALID_MODIFICATION_ERR); },134 ],135 postcondition: [136 {fullPath:'/a', isDirectory:true},137 {fullPath:'/a/b', isDirectory:true},138 {fullPath:'/a/b/c', isDirectory:true},139 ],140 },141 {142 name: 'MoveRecursive',143 precondition: [144 {fullPath:'/a', isDirectory:true},145 {fullPath:'/a/b', isDirectory:true},146 {fullPath:'/a/b/c'},147 {fullPath:'/a/b/d'},148 {fullPath:'/b', isDirectory:true},149 ],150 tests: [151 function(helper) { helper.move('/a', '/b', 'a'); },152 ],153 postcondition: [154 {fullPath:'/a', nonexistent:true},155 {fullPath:'/b/a', isDirectory:true},156 {fullPath:'/b/a/b', isDirectory:true},157 {fullPath:'/b/a/b/c'},158 {fullPath:'/b/a/b/d'},159 ],160 },161 {162 name: "OverwritingMoveFileToFile",163 precondition: [164 {fullPath:"/a"},165 {fullPath:"/b"},166 ],167 tests: [168 function(helper) {helper.move("/a","/","b");}169 ],170 postcondition: [171 {fullPath:"/b"},172 ],173 },174 {175 name: "OverwritingMoveDirectoryToEmptyDirectory",176 precondition: [177 {fullPath:"/a", isDirectory:true},178 {fullPath:"/a/b"},179 {fullPath:"/c", isDirectory:true},180 ],181 tests: [182 function(helper) {helper.move("/a","/","c");}183 ],184 postcondition: [185 {fullPath:"/c", isDirectory:true},186 {fullPath:"/c/b"},187 {fullPath:"/a", nonexistent:true},188 ],189 },190 {191 name: "OverwritingMoveFileToDirectory",192 precondition: [193 {fullPath:"/a"},194 {fullPath:"/b", isDirectory: true},195 ],196 tests: [197 function(helper) {helper.move("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}198 ],199 postcondition: [200 {fullPath:"/a"},201 {fullPath:"/b", isDirectory: true},202 ],203 },204 {205 name: "OverwritingMoveDirectoryToFile",206 precondition: [207 {fullPath:"/a", isDirectory: true},208 {fullPath:"/b"},209 ],210 tests: [211 function(helper) {helper.move("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}212 ],213 postcondition: [214 {fullPath:"/a", isDirectory: true},215 {fullPath:"/b"},216 ],217 },218 {219 name: "OverwritingMoveFileToNonemptyDirectory",220 precondition: [221 {fullPath:"/a"},222 {fullPath:"/b", isDirectory: true},223 {fullPath:"/b/c"},224 ],225 tests: [226 function(helper) {helper.move("/a","/","b",FileError.INVALID_MODIFICATION_ERR);}227 ],228 postcondition: [229 {fullPath:"/a"},230 {fullPath:"/b", isDirectory: true},231 {fullPath:"/b/c"},232 ],233 },234 {235 name: "OverwritingMoveDirectoryToNonemptyDirectory",236 precondition: [237 {fullPath:"/a", isDirectory: true},238 {fullPath:"/a/b"},239 {fullPath:"/c", isDirectory: true},240 {fullPath:"/c/d"},241 ],242 tests: [243 function(helper) {helper.move("/a","/","c",FileError.INVALID_MODIFICATION_ERR);}244 ],245 postcondition: [246 {fullPath:"/a", isDirectory: true},247 {fullPath:"/a/b"},248 {fullPath:"/c", isDirectory: true},249 {fullPath:"/c/d"},250 ],251 },...

Full Screen

Full Screen

fullscreen.js

Source:fullscreen.js Github

copy

Full Screen

1goog.provide('ol.control.FullScreen');2goog.require('ol.events');3goog.require('ol.events.EventType');4goog.require('ol');5goog.require('ol.control.Control');6goog.require('ol.dom');7goog.require('ol.css');8/**9 * @classdesc10 * Provides a button that when clicked fills up the full screen with the map.11 * The full screen source element is by default the element containing the map viewport unless12 * overriden by providing the `source` option. In which case, the dom13 * element introduced using this parameter will be displayed in full screen.14 *15 * When in full screen mode, a close button is shown to exit full screen mode.16 * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to17 * toggle the map in full screen mode.18 *19 *20 * @constructor21 * @extends {ol.control.Control}22 * @param {olx.control.FullScreenOptions=} opt_options Options.23 * @api stable24 */25ol.control.FullScreen = function(opt_options) {26 var options = opt_options ? opt_options : {};27 /**28 * @private29 * @type {string}30 */31 this.cssClassName_ = options.className !== undefined ? options.className :32 'ol-full-screen';33 var label = options.label !== undefined ? options.label : '\u2922';34 /**35 * @private36 * @type {Node}37 */38 this.labelNode_ = typeof label === 'string' ?39 document.createTextNode(label) : label;40 var labelActive = options.labelActive !== undefined ? options.labelActive : '\u00d7';41 /**42 * @private43 * @type {Node}44 */45 this.labelActiveNode_ = typeof labelActive === 'string' ?46 document.createTextNode(labelActive) : labelActive;47 var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';48 var button = document.createElement('button');49 button.className = this.cssClassName_ + '-' + ol.control.FullScreen.isFullScreen();50 button.setAttribute('type', 'button');51 button.title = tipLabel;52 button.appendChild(this.labelNode_);53 ol.events.listen(button, ol.events.EventType.CLICK,54 this.handleClick_, this);55 var cssClasses = this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE +56 ' ' + ol.css.CLASS_CONTROL + ' ' +57 (!ol.control.FullScreen.isFullScreenSupported() ? ol.css.CLASS_UNSUPPORTED : '');58 var element = document.createElement('div');59 element.className = cssClasses;60 element.appendChild(button);61 ol.control.Control.call(this, {62 element: element,63 target: options.target64 });65 /**66 * @private67 * @type {boolean}68 */69 this.keys_ = options.keys !== undefined ? options.keys : false;70 /**71 * @private72 * @type {Element|string|undefined}73 */74 this.source_ = options.source;75};76ol.inherits(ol.control.FullScreen, ol.control.Control);77/**78 * @param {Event} event The event to handle79 * @private80 */81ol.control.FullScreen.prototype.handleClick_ = function(event) {82 event.preventDefault();83 this.handleFullScreen_();84};85/**86 * @private87 */88ol.control.FullScreen.prototype.handleFullScreen_ = function() {89 if (!ol.control.FullScreen.isFullScreenSupported()) {90 return;91 }92 var map = this.getMap();93 if (!map) {94 return;95 }96 if (ol.control.FullScreen.isFullScreen()) {97 ol.control.FullScreen.exitFullScreen();98 } else {99 var element;100 if (this.source_) {101 element = typeof this.source_ === 'string' ?102 document.getElementById(this.source_) :103 this.source_;104 } else {105 element = map.getTargetElement();106 }107 if (this.keys_) {108 ol.control.FullScreen.requestFullScreenWithKeys(element);109 } else {110 ol.control.FullScreen.requestFullScreen(element);111 }112 }113};114/**115 * @private116 */117ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {118 var button = this.element.firstElementChild;119 var map = this.getMap();120 if (ol.control.FullScreen.isFullScreen()) {121 button.className = this.cssClassName_ + '-true';122 ol.dom.replaceNode(this.labelActiveNode_, this.labelNode_);123 } else {124 button.className = this.cssClassName_ + '-false';125 ol.dom.replaceNode(this.labelNode_, this.labelActiveNode_);126 }127 if (map) {128 map.updateSize();129 }130};131/**132 * @inheritDoc133 * @api stable134 */135ol.control.FullScreen.prototype.setMap = function(map) {136 ol.control.Control.prototype.setMap.call(this, map);137 if (map) {138 this.listenerKeys.push(ol.events.listen(ol.global.document,139 ol.control.FullScreen.getChangeType_(),140 this.handleFullScreenChange_, this)141 );142 }143};144/**145 * @return {boolean} Fullscreen is supported by the current platform.146 */147ol.control.FullScreen.isFullScreenSupported = function() {148 var body = document.body;149 return !!(150 body.webkitRequestFullscreen ||151 (body.mozRequestFullScreen && document.mozFullScreenEnabled) ||152 (body.msRequestFullscreen && document.msFullscreenEnabled) ||153 (body.requestFullscreen && document.fullscreenEnabled)154 );155};156/**157 * @return {boolean} Element is currently in fullscreen.158 */159ol.control.FullScreen.isFullScreen = function() {160 return !!(161 document.webkitIsFullScreen || document.mozFullScreen ||162 document.msFullscreenElement || document.fullscreenElement163 );164};165/**166 * Request to fullscreen an element.167 * @param {Node} element Element to request fullscreen168 */169ol.control.FullScreen.requestFullScreen = function(element) {170 if (element.requestFullscreen) {171 element.requestFullscreen();172 } else if (element.msRequestFullscreen) {173 element.msRequestFullscreen();174 } else if (element.mozRequestFullScreen) {175 element.mozRequestFullScreen();176 } else if (element.webkitRequestFullscreen) {177 element.webkitRequestFullscreen();178 }179};180/**181 * Request to fullscreen an element with keyboard input.182 * @param {Node} element Element to request fullscreen183 */184ol.control.FullScreen.requestFullScreenWithKeys = function(element) {185 if (element.mozRequestFullScreenWithKeys) {186 element.mozRequestFullScreenWithKeys();187 } else if (element.webkitRequestFullscreen) {188 element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);189 } else {190 ol.control.FullScreen.requestFullScreen(element);191 }192};193/**194 * Exit fullscreen.195 */196ol.control.FullScreen.exitFullScreen = function() {197 if (document.exitFullscreen) {198 document.exitFullscreen();199 } else if (document.msExitFullscreen) {200 document.msExitFullscreen();201 } else if (document.mozCancelFullScreen) {202 document.mozCancelFullScreen();203 } else if (document.webkitExitFullscreen) {204 document.webkitExitFullscreen();205 }206};207/**208 * @return {string} Change type.209 * @private210 */211ol.control.FullScreen.getChangeType_ = (function() {212 var changeType;213 return function() {214 if (!changeType) {215 var body = document.body;216 if (body.webkitRequestFullscreen) {217 changeType = 'webkitfullscreenchange';218 } else if (body.mozRequestFullScreen) {219 changeType = 'mozfullscreenchange';220 } else if (body.msRequestFullscreen) {221 changeType = 'MSFullscreenChange';222 } else if (body.requestFullscreen) {223 changeType = 'fullscreenchange';224 }225 }226 return changeType;227 };...

Full Screen

Full Screen

constants.js

Source:constants.js Github

copy

Full Screen

1'use strict';2import window from 'global/window';3import document from 'global/document';4import mejs from '../core/mejs';5export const NAV = window.navigator;6export const UA = NAV.userAgent.toLowerCase();7export const IS_IPAD = /ipad/i.test(UA) && !window.MSStream;8export const IS_IPHONE = /iphone/i.test(UA) && !window.MSStream;9export const IS_IPOD = /ipod/i.test(UA) && !window.MSStream;10export const IS_IOS = /ipad|iphone|ipod/i.test(UA) && !window.MSStream;11export const IS_ANDROID = /android/i.test(UA);12export const IS_IE = /(trident|microsoft)/i.test(NAV.appName);13export const IS_EDGE = ('msLaunchUri' in NAV && !('documentMode' in document));14export const IS_CHROME = /chrome/i.test(UA);15export const IS_FIREFOX = /firefox/i.test(UA);16export const IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;17export const IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);18export const HAS_MSE = ('MediaSource' in window);19export const SUPPORT_POINTER_EVENTS = (() => {20 const21 element = document.createElement('x'),22 documentElement = document.documentElement,23 getComputedStyle = window.getComputedStyle24 ;25 if (!('pointerEvents' in element.style)) {26 return false;27 }28 element.style.pointerEvents = 'auto';29 element.style.pointerEvents = 'x';30 documentElement.appendChild(element);31 let supports = getComputedStyle && getComputedStyle(element, '').pointerEvents === 'auto';32 element.remove();33 return !!supports;34})();35// for IE36const html5Elements = ['source', 'track', 'audio', 'video'];37let video;38for (let i = 0, total = html5Elements.length; i < total; i++) {39 video = document.createElement(html5Elements[i]);40}41// Test if browsers support HLS natively (right now Safari, Android's Chrome and Stock browsers, and MS Edge)42export const SUPPORTS_NATIVE_HLS = (IS_SAFARI || (IS_ANDROID && (IS_CHROME || IS_STOCK_ANDROID)) || (IS_IE && /edge/i.test(UA)));43// Detect native JavaScript fullscreen (Safari/Firefox only, Chrome still fails)44// iOS45let hasiOSFullScreen = (video.webkitEnterFullscreen !== undefined);46// W3C47let hasNativeFullscreen = (video.requestFullscreen !== undefined);48// OS X 10.5 can't do this even if it says it can :(49if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {50 hasNativeFullscreen = false;51 hasiOSFullScreen = false;52}53// webkit/firefox/IE11+54const hasWebkitNativeFullScreen = (video.webkitRequestFullScreen !== undefined);55const hasMozNativeFullScreen = (video.mozRequestFullScreen !== undefined);56const hasMsNativeFullScreen = (video.msRequestFullscreen !== undefined);57const hasTrueNativeFullScreen = (hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen);58let nativeFullScreenEnabled = hasTrueNativeFullScreen;59let fullScreenEventName = '';60let isFullScreen, requestFullScreen, cancelFullScreen;61// Enabled?62if (hasMozNativeFullScreen) {63 nativeFullScreenEnabled = document.mozFullScreenEnabled;64} else if (hasMsNativeFullScreen) {65 nativeFullScreenEnabled = document.msFullscreenEnabled;66}67if (IS_CHROME) {68 hasiOSFullScreen = false;69}70if (hasTrueNativeFullScreen) {71 if (hasWebkitNativeFullScreen) {72 fullScreenEventName = 'webkitfullscreenchange';73 } else if (hasMozNativeFullScreen) {74 fullScreenEventName = 'mozfullscreenchange';75 } else if (hasMsNativeFullScreen) {76 fullScreenEventName = 'MSFullscreenChange';77 }78 isFullScreen = () => {79 if (hasMozNativeFullScreen) {80 return document.mozFullScreen;81 } else if (hasWebkitNativeFullScreen) {82 return document.webkitIsFullScreen;83 } else if (hasMsNativeFullScreen) {84 return document.msFullscreenElement !== null;85 }86 };87 requestFullScreen = (el) => {88 if (hasWebkitNativeFullScreen) {89 el.webkitRequestFullScreen();90 } else if (hasMozNativeFullScreen) {91 el.mozRequestFullScreen();92 } else if (hasMsNativeFullScreen) {93 el.msRequestFullscreen();94 }95 };96 cancelFullScreen = () => {97 if (hasWebkitNativeFullScreen) {98 document.webkitCancelFullScreen();99 } else if (hasMozNativeFullScreen) {100 document.mozCancelFullScreen();101 } else if (hasMsNativeFullScreen) {102 document.msExitFullscreen();103 }104 };105}106export const HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;107export const HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;108export const HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;109export const HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;110export const HAS_IOS_FULLSCREEN = hasiOSFullScreen;111export const HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;112export const HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;113export const FULLSCREEN_EVENT_NAME = fullScreenEventName;114export {isFullScreen, requestFullScreen, cancelFullScreen};115mejs.Features = mejs.Features || {};116mejs.Features.isiPad = IS_IPAD;117mejs.Features.isiPod = IS_IPOD;118mejs.Features.isiPhone = IS_IPHONE;119mejs.Features.isiOS = mejs.Features.isiPhone || mejs.Features.isiPad;120mejs.Features.isAndroid = IS_ANDROID;121mejs.Features.isIE = IS_IE;122mejs.Features.isEdge = IS_EDGE;123mejs.Features.isChrome = IS_CHROME;124mejs.Features.isFirefox = IS_FIREFOX;125mejs.Features.isSafari = IS_SAFARI;126mejs.Features.isStockAndroid = IS_STOCK_ANDROID;127mejs.Features.hasMSE = HAS_MSE;128mejs.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;129mejs.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;130mejs.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;131mejs.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;132mejs.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;133mejs.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;134mejs.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;135mejs.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;136mejs.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;137mejs.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;138mejs.Features.isFullScreen = isFullScreen;139mejs.Features.requestFullScreen = requestFullScreen;...

Full Screen

Full Screen

jquery.sliderPro.fullScreen.js

Source:jquery.sliderPro.fullScreen.js Github

copy

Full Screen

1// Full Screen module for Slider Pro.2// 3// Adds the possibility to open the slider full-screen, using the HMTL5 FullScreen API.4;(function( window, $ ) {5 "use strict";6 var NS = 'FullScreen.' + $.SliderPro.namespace;7 var FullScreen = {8 // Indicates whether the slider is currently in full-screen mode9 isFullScreen: false,10 // Reference to the full-screen button11 $fullScreenButton: null,12 // Reference to a set of settings that influence the slider's size13 // before it goes full-screen14 sizeBeforeFullScreen: {},15 initFullScreen: function() {16 if ( ! ( document.fullscreenEnabled ||17 document.webkitFullscreenEnabled ||18 document.mozFullScreenEnabled ||19 document.msFullscreenEnabled ) ) {20 return;21 }22 23 this.on( 'update.' + NS, $.proxy( this._fullScreenOnUpdate, this ) );24 },25 // Create or remove the full-screen button depending on the value of the 'fullScreen' option26 _fullScreenOnUpdate: function() {27 if ( this.settings.fullScreen === true && this.$fullScreenButton === null ) {28 this._addFullScreen();29 } else if ( this.settings.fullScreen === false && this.$fullScreenButton !== null ) {30 this._removeFullScreen();31 }32 if ( this.settings.fullScreen === true ) {33 if ( this.settings.fadeFullScreen === true ) {34 this.$fullScreenButton.addClass( 'sp-fade-full-screen' );35 } else if ( this.settings.fadeFullScreen === false ) {36 this.$fullScreenButton.removeClass( 'sp-fade-full-screen' );37 }38 }39 },40 // Create the full-screen button41 _addFullScreen: function() {42 this.$fullScreenButton = $('<div class="sp-full-screen-button"></div>').appendTo( this.$slider );43 this.$fullScreenButton.on( 'click.' + NS, $.proxy( this._onFullScreenButtonClick, this ) );44 document.addEventListener( 'fullscreenchange', $.proxy( this._onFullScreenChange, this ) );45 document.addEventListener( 'mozfullscreenchange', $.proxy( this._onFullScreenChange, this ) );46 document.addEventListener( 'webkitfullscreenchange', $.proxy( this._onFullScreenChange, this ) );47 document.addEventListener( 'MSFullscreenChange', $.proxy( this._onFullScreenChange, this ) );48 },49 // Remove the full-screen button50 _removeFullScreen: function() {51 if ( this.$fullScreenButton !== null ) {52 this.$fullScreenButton.off( 'click.' + NS );53 this.$fullScreenButton.remove();54 this.$fullScreenButton = null;55 document.removeEventListener( 'fullscreenchange', this._onFullScreenChange );56 document.removeEventListener( 'mozfullscreenchange', this._onFullScreenChange );57 document.removeEventListener( 'webkitfullscreenchange', this._onFullScreenChange );58 document.removeEventListener( 'MSFullscreenChange', this._onFullScreenChange );59 }60 },61 // When the full-screen button is clicked, put the slider into full-screen mode, and62 // take it out of the full-screen mode when it's clicked again.63 _onFullScreenButtonClick: function() {64 if ( this.isFullScreen === false ) {65 if ( this.instance.requestFullScreen ) {66 this.instance.requestFullScreen();67 } else if ( this.instance.mozRequestFullScreen ) {68 this.instance.mozRequestFullScreen();69 } else if ( this.instance.webkitRequestFullScreen ) {70 this.instance.webkitRequestFullScreen();71 } else if ( this.instance.msRequestFullscreen ) {72 this.instance.msRequestFullscreen();73 }74 } else {75 if ( document.exitFullScreen ) {76 document.exitFullScreen();77 } else if ( document.mozCancelFullScreen ) {78 document.mozCancelFullScreen();79 } else if ( document.webkitCancelFullScreen ) {80 document.webkitCancelFullScreen();81 } else if ( document.msExitFullscreen ) {82 document.msExitFullscreen();83 }84 }85 },86 // This will be called whenever the full-screen mode changes.87 // If the slider is in full-screen mode, set it to 'full window', and if it's88 // not in full-screen mode anymore, set it back to the original size.89 _onFullScreenChange: function() {90 this.isFullScreen = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement ? true : false;91 if ( this.isFullScreen === true ) {92 this.sizeBeforeFullScreen = { forceSize: this.settings.forceSize, autoHeight: this.settings.autoHeight };93 this.$slider.addClass( 'sp-full-screen' );94 this.settings.forceSize = 'fullWindow';95 this.settings.autoHeight = false;96 } else {97 this.$slider.css( 'margin', '' );98 this.$slider.removeClass( 'sp-full-screen' );99 this.settings.forceSize = this.sizeBeforeFullScreen.forceSize;100 this.settings.autoHeight = this.sizeBeforeFullScreen.autoHeight;101 }102 this.resize();103 },104 // Destroy the module105 destroyFullScreen: function() {106 this.off( 'update.' + NS );107 this._removeFullScreen();108 },109 fullScreenDefaults: {110 // Indicates whether the full-screen button is enabled111 fullScreen: false,112 // Indicates whether the button will fade in only on hover113 fadeFullScreen: true114 }115 };116 $.SliderPro.addModule( 'FullScreen', FullScreen );...

Full Screen

Full Screen

Control.FullScreen.js

Source:Control.FullScreen.js Github

copy

Full Screen

1L.Control.FullScreen = L.Control.extend({2 options: {3 position: 'topleft',4 title: 'Full Screen',5 forceSeparateButton: false6 },7 8 onAdd: function (map) {9 // Do nothing if we can't10 if (!fullScreenApi.supportsFullScreen)11 return map.zoomControl ? map.zoomControl._container : L.DomUtil.create('div', '');12 13 var className = 'leaflet-control-zoom-fullscreen', container;14 15 if(map.zoomControl && !this.options.forceSeparateButton) {16 container = map.zoomControl._container;17 } else {18 container = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-bar leaflet-control');19 }20 21 this._createButton(this.options.title, className, container, this.toogleFullScreen, map);22 return container;23 },24 25 _createButton: function (title, className, container, fn, context) {26 var link = L.DomUtil.create('a', className, container);27 link.href = '#';28 link.title = title;29 L.DomEvent30 .addListener(link, 'click', L.DomEvent.stopPropagation)31 .addListener(link, 'click', L.DomEvent.preventDefault)32 .addListener(link, 'click', fn, context);33 34 L.DomEvent35 .addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)36 .addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)37 .addListener(container, fullScreenApi.fullScreenEventName, this._handleEscKey, context);38 39 L.DomEvent40 .addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)41 .addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)42 .addListener(document, fullScreenApi.fullScreenEventName, this._handleEscKey, context);43 return link;44 },45 46 toogleFullScreen: function () {47 this._exitFired = false;48 if (fullScreenApi.supportsFullScreen){49 var container = this._container;50 if(fullScreenApi.isFullScreen(container)){51 fullScreenApi.cancelFullScreen(container);52 this.invalidateSize();53 this.fire('exitFullscreen');54 this._exitFired = true;55 }56 else {57 fullScreenApi.requestFullScreen(container);58 this.invalidateSize();59 this.fire('enterFullscreen');60 }61 }62 },63 64 _handleEscKey: function () {65 if(!fullScreenApi.isFullScreen(this) && !this._exitFired){66 this.fire('exitFullscreen');67 this._exitFired = true;68 }69 }70});71L.Map.addInitHook(function () {72 if (this.options.fullscreenControl) {73 this.fullscreenControl = L.control.fullscreen(this.options.fullscreenControlOptions);74 this.addControl(this.fullscreenControl);75 }76});77L.control.fullscreen = function (options) {78 return new L.Control.FullScreen(options);79};80/* 81Native FullScreen JavaScript API82-------------83Assumes Mozilla naming conventions instead of W3C for now84source : http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/85*/86(function() {87 var 88 fullScreenApi = { 89 supportsFullScreen: false,90 isFullScreen: function() { return false; }, 91 requestFullScreen: function() {}, 92 cancelFullScreen: function() {},93 fullScreenEventName: '',94 prefix: ''95 },96 browserPrefixes = 'webkit moz o ms khtml'.split(' ');97 98 // check for native support99 if (typeof document.exitFullscreen != 'undefined') {100 fullScreenApi.supportsFullScreen = true;101 } else { 102 // check for fullscreen support by vendor prefix103 for (var i = 0, il = browserPrefixes.length; i < il; i++ ) {104 fullScreenApi.prefix = browserPrefixes[i];105 106 if (typeof document[fullScreenApi.prefix + 'CancelFullScreen' ] != 'undefined' ) {107 fullScreenApi.supportsFullScreen = true;108 109 break;110 }111 }112 }113 114 // update methods to do something useful115 if (fullScreenApi.supportsFullScreen) {116 fullScreenApi.fullScreenEventName = fullScreenApi.prefix + 'fullscreenchange';117 118 fullScreenApi.isFullScreen = function() {119 switch (this.prefix) { 120 case '':121 return document.fullScreen;122 case 'webkit':123 return document.webkitIsFullScreen;124 default:125 return document[this.prefix + 'FullScreen'];126 }127 }128 fullScreenApi.requestFullScreen = function(el) {129 return (this.prefix === '') ? el.requestFullscreen() : el[this.prefix + 'RequestFullScreen']();130 }131 fullScreenApi.cancelFullScreen = function(el) {132 return (this.prefix === '') ? document.exitFullscreen() : document[this.prefix + 'CancelFullScreen']();133 } 134 }135 // jQuery plugin136 if (typeof jQuery != 'undefined') {137 jQuery.fn.requestFullScreen = function() {138 139 return this.each(function() {140 var el = jQuery(this);141 if (fullScreenApi.supportsFullScreen) {142 fullScreenApi.requestFullScreen(el);143 }144 });145 };146 }147 // export api148 window.fullScreenApi = fullScreenApi; ...

Full Screen

Full Screen

jquery.fullscreen.js

Source:jquery.fullscreen.js Github

copy

Full Screen

1// jQuery.FullScreen plugin2// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy!3(function($) {4 function isFullScreen() {5 return document[!prefix ? 'fullScreen' :6 'webkit' === prefix ? 'webkitIsFullScreen' :7 prefix + 'FullScreen'];8 }9 function cancelFullScreen() {10 return document[prefix ? prefix + 'CancelFullScreen'11 : 'cancelFullScreen']();12 }13 var supported = typeof document.cancelFullScreen !== 'undefined'14 , prefixes = ['webkit', 'moz', 'o', 'ms', 'khtml']15 , prefix = ''16 , noop = function() {}17 , i18 ;19 if (!supported) {20 for (i = 0; prefix = prefixes[i]; i++) {21 if (typeof document[prefix + 'CancelFullScreen'] !== 'undefined') {22 supported = true;23 break;24 }25 }26 }27 if (supported) {28 $.fn.requestFullScreen = function() {29 return this.each(function() {30 return this[prefix ? prefix + 'RequestFullScreen'31 : 'requestFullScreen']();32 });33 };34 $.fn.fullScreenChange = function(fn) {35 var ar = [prefix + 'fullscreenchange'].concat([].slice.call(arguments, 0))36 , $e = $(this);37 return $e.bind.apply($e, ar);38 };39 $.FullScreen =40 { isFullScreen: isFullScreen41 , cancelFullScreen: cancelFullScreen42 , prefix: prefix43 , supported: supported44 };45 }46 else {47 $.fn.requestFullScreen = $.fn.fullScreenChange = noop;48 $.FullScreen =49 { isFullScreen: function() { return false; }50 , cancelFullScreen: noop51 , prefix: prefix52 , supported: supported53 };54 }...

Full Screen

Full Screen

normalizeUnits.js

Source:normalizeUnits.js Github

copy

Full Screen

1/*global require, exports */2var moment = require("../../moment");3exports.normalizeUnits = {4 "normalize units" : function (test) {5 test.expect(45);6 var fullKeys = ["year", "month", "isoweek", "week", "day", "hour", "minute", "second", "millisecond"],7 aliases = ["y", "M", "W", "w", "d", "h", "m", "s", "ms"],8 length = fullKeys.length,9 fullKey,10 fullKeyCaps,11 fullKeyPlural,12 fullKeyCapsPlural,13 alias,14 index;15 for (index = 0; index < length; index += 1) {16 fullKey = fullKeys[index];17 fullKeyCaps = fullKey.toUpperCase();18 fullKeyPlural = fullKey + "s";19 fullKeyCapsPlural = fullKeyCaps + "s";20 alias = aliases[index];21 test.equal(moment.normalizeUnits(fullKey), fullKey, "Testing full key " + fullKey);22 test.equal(moment.normalizeUnits(fullKeyCaps), fullKey, "Testing full key capitalised " + fullKey);23 test.equal(moment.normalizeUnits(fullKeyPlural), fullKey, "Testing full key plural " + fullKey);24 test.equal(moment.normalizeUnits(fullKeyCapsPlural), fullKey, "Testing full key capitalised and plural " + fullKey);25 test.equal(moment.normalizeUnits(alias), fullKey, "Testing alias " + fullKey);26 }27 test.done();28 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 cy.contains('type').click()4 cy.url().should('include', '/commands/actions')5 cy.get('.action-email')6 .type('

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 expect(true).to.equal(true)4 })5})6describe('My First Test', function() {7 it('Does not do much!', function() {8 expect(true).to.equal(true)9 })10})11describe('My First Test', function() {12 it('Does not do much!', function() {13 expect(true).to.equal(true)14 })15})16describe('My First Test', function() {17 it('Does not do much!', function() {18 expect(true).to.equal(true)19 })20})21test('foo', t => {22 t.pass();23});24test('foo', t => {25 t.pass();26});27QUnit.test( "hello test", function( assert ) {28 assert.ok( 1 == "1", "Passed!" );29});30exports.testSomething = function(test){31 test.expect(1);32 test.ok(true, "this assertion should pass");33 test.done();34};35registerSuite('foo', {36 'bar': function() {37 assert(true);38 }39});40describe('foo', function() {41 it('bar', function (done) {42 done();43 });44});45var vows = require('vows'),46 assert = require('assert');47vows.describe('Array').addBatch({48 'When using the Array module': {49 topic: function () {50 return Array;51 },52 'it should have the indexOf method': function (topic) {53 assert.isFunction(topic.indexOf);54 }55 }56}).export(module);57describe('My First Test', function() {58 it('Does not do much!', function() {59 expect(true).to.equal(true)60 })61})62describe('My First Test', function() {63 it('Does not do much!', function() {64 expect(true).to.equal(true)65 })66})

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 expect(true).to.equal(true)4 })5})6describe('My First Test', function() {7 it('Does not do much!', function() {8 expect(true).to.equal(true)9 })10})11describe('My First Test', function() {12 it('Does not do much!', function() {13 expect(true).to.equal(true)14 })15})16describe('My First Test', function() {17 it('Does not do much!', function() {18 expect(true).to.equal(true)19 })20})21describe('My First Test', function() {22 it('Does not do much!', function() {23 expect(true).to.equal(true)24 })25})26describe('My First Test', function() {27 it('Does not do much!', function() {28 expect(true).to.equal(true)29 })30})31describe('My First Test', function() {32 it('Does not do much!', function() {33 expect(true).to.equal(true)34 })35})36describe('My First Test', function() {37 it('Does not do much!', function() {38 expect(true).to.equal(true)39 })40})41describe('My First Test', function() {42 it('Does not do much!', function() {43 expect(true).to.equal(true)44 })45})46describe('My First Test', function() {47 it('Does not do much!', function() {48 expect(true).to.equal(true)49 })50})51describe('My First Test', function() {52 it('Does not do much!', function() {53 expect(true).to.equal(true)54 })55})56describe('My First Test', function() {57 it('Does not do much!', function() {58 expect(true).to.equal(true)59 })60})61describe('My First Test', function() {62 it('Does not do much!', function()

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 expect(true).to.equal(true)4 })5})6it('Does not do much!', function() {7 expect(true).to.equal(true)8})9describe('My First Test', function() {10 it('Does not do much!', function() {11 expect(true).to.equal(true)12 })13})14it('Does not do much!', function() {15 expect(true).to.equal(true)16})17describe('My First Test', function() {18 it('Does not do much!', function() {19 expect(true).to.equal(true)20 })21})22it('Does not do much!', function() {23 expect(true).to.equal(true)24})25describe('My First Test', function() {26 it('Does not do much!', function() {27 expect(true).to.equal(true)28 })29})30it('Does not do much!', function() {31 expect(true).to.equal(true)32})33describe('My First Test', function() {34 it('Does not do much!', function() {35 expect(true).to.equal(true)36 })37})38it('Does not do much!', function() {39 expect(true).to.equal(true)40})41QUnit.test('My First Test', function(assert) {42 assert.equal(true, true)43})44test('My First Test', function(assert) {45 assert.equal(true, true)46})47test('My First Test', function(t) {48 t.equal(true, true)49})50test('My First Test', function(t) {51 t.equal(true, true)52})53describe('My First Test', function() {54 it('Does not do much!', function() {55 expect(true).to.equal(true)56 })57})58it('Does

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 expect(true).to.equal(true)4 })5})6describe('My First Test', function() {7 it('Does not do much!', function() {8 expect(true).to.equal(true)9 })10})11describe('My First Test', function() {12 it('Does not do much!', function() {13 expect(true).to.equal(true)14 })15})16describe('My First Test', function() {17 it('Does not do much!', function() {18 expect(true).to.equal(true)19 })20})21describe('My First Test', function() {22 it('Does not do much!', function() {23 expect(true).to.equal(true)24 })25})26describe('My First Test', function() {27 it('Does not do much!', function() {28 expect(true).to.equal(true)29 })30})31describe('My First Test', function() {32 it('Does not do much!', function() {33 expect(true).to.equal(true)34 })35})36describe('My First Test', function() {37 it('Does not do much!', function() {38 expect(true).to.equal(true)39 })40})41describe('My First Test', function() {42 it('Does not do much!', function() {43 expect(true).to.equal(true)44 })45})46describe('My First Test', function() {47 it('Does not do much!', function() {48 expect(true).to.equal(true)49 })50})

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('My First Test', function() {2 it('Does not do much!', function() {3 expect(true).to.equal(true)4 })5})6describe('My First Test', function() {7 it('Does not do much!', function() {8 expect(true).to.equal(true)9 })10})

Full Screen

Using AI Code Generation

copy

Full Screen

1import {login} from '../support/login.js'2describe('Test', () => {3 it('Test', () => {4 login();5 })6})7export function login() {8}9You can use the following code to import the custom command in your support folder:10import './login.js'

Full Screen

Cypress Tutorial

Cypress is a renowned Javascript-based open-source, easy-to-use end-to-end testing framework primarily used for testing web applications. Cypress is a relatively new player in the automation testing space and has been gaining much traction lately, as evidenced by the number of Forks (2.7K) and Stars (42.1K) for the project. LambdaTest’s Cypress Tutorial covers step-by-step guides that will help you learn from the basics till you run automation tests on LambdaTest.

Chapters:

  1. What is Cypress? -
  2. Why Cypress? - Learn why Cypress might be a good choice for testing your web applications.
  3. Features of Cypress Testing - Learn about features that make Cypress a powerful and flexible tool for testing web applications.
  4. Cypress Drawbacks - Although Cypress has many strengths, it has a few limitations that you should be aware of.
  5. Cypress Architecture - Learn more about Cypress architecture and how it is designed to be run directly in the browser, i.e., it does not have any additional servers.
  6. Browsers Supported by Cypress - Cypress is built on top of the Electron browser, supporting all modern web browsers. Learn browsers that support Cypress.
  7. Selenium vs Cypress: A Detailed Comparison - Compare and explore some key differences in terms of their design and features.
  8. Cypress Learning: Best Practices - Take a deep dive into some of the best practices you should use to avoid anti-patterns in your automation tests.
  9. How To Run Cypress Tests on LambdaTest? - Set up a LambdaTest account, and now you are all set to learn how to run Cypress tests.

Certification

You can elevate your expertise with end-to-end testing using the Cypress automation framework and stay one step ahead in your career by earning a Cypress certification. Check out our Cypress 101 Certification.

YouTube

Watch this 3 hours of complete tutorial to learn the basics of Cypress and various Cypress commands with the Cypress testing at LambdaTest.

Run Cypress automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful