How to use isVisible method in ghostjs

Best JavaScript code snippet using ghostjs

11-admin.js

Source:11-admin.js Github

copy

Full Screen

...34 it('the first title should be Rocket.Chat', () => {35 admin.infoRocketChatTableTitle.getText().should.equal('Rocket.Chat');36 });37 it('should show the rocket chat table', () => {38 admin.infoRocketChatTable.isVisible().should.be.true;39 });40 it('the second title should be Commit', () => {41 admin.infoCommitTableTitle.getText().should.equal('Commit');42 });43 it('should show the Commit table', () => {44 admin.infoCommitTable.isVisible().should.be.true;45 });46 it('the first title should be Runtime_Environment', () => {47 admin.infoRuntimeTableTitle.getText().should.equal('Runtime_Environment');48 });49 it('should show the Runtime_Environment table', () => {50 admin.infoRuntimeTable.isVisible().should.be.true;51 });52 it('the first title should be Build_Environment', () => {53 admin.infoBuildTableTitle.getText().should.equal('Build_Environment');54 });55 it('should show the Build_Environment table', () => {56 admin.infoBuildTable.isVisible().should.be.true;57 });58 });59 describe('rooms', () => {60 before(() => {61 admin.roomsLink.waitForVisible(5000);62 admin.roomsLink.click();63 admin.roomsFilter.waitForVisible(5000);64 });65 after(() => {66 admin.infoLink.click();67 });68 describe('render', () => {69 it('should show the search form', () => {70 admin.roomsSearchForm.isVisible().should.be.true;71 });72 it('should show the rooms Filter', () => {73 admin.roomsFilter.isVisible().should.be.true;74 });75 it('should show the channel checkbox', () => {76 admin.roomsChannelsCheckbox.isVisible().should.be.true;77 });78 it('should show the direct messsage checkbox', () => {79 admin.roomsDirectCheckbox.isVisible().should.be.true;80 });81 it('should show the Private channel checkbox', () => {82 admin.roomsPrivateCheckbox.isVisible().should.be.true;83 });84 it('should show the general channel', () => {85 admin.roomsGeneralChannel.isVisible().should.be.true;86 });87 });88 describe('filter text', () => {89 before(() => {90 admin.roomsFilter.click();91 admin.roomsFilter.setValue('general');92 });93 after(() => {94 admin.roomsFilter.click();95 admin.roomsFilter.setValue('');96 });97 it('should show the general channel', () => {98 admin.roomsGeneralChannel.isVisible().should.be.true;99 });100 });101 describe('filter text with wrong channel', () => {102 before(() => {103 admin.roomsFilter.click();104 admin.roomsFilter.setValue('something else');105 });106 after(() => {107 admin.roomsFilter.click();108 admin.roomsFilter.setValue('');109 });110 it('should not show the general channel', () => {111 admin.roomsGeneralChannel.isVisible().should.be.false;112 });113 });114 describe('filter checkbox', () => {115 var checkbox = 1;116 before(() => {117 admin.roomsFilter.setValue('');118 //add value triggers a key event that changes search±±±±±±±±±119 admin.roomsFilter.addValue(' ');120 admin.roomsGeneralChannel.waitForVisible(5000);121 });122 beforeEach(() => {123 switch (checkbox) {124 case 1:125 admin.roomsChannelsCheckbox.click();126 break;127 case 2:128 admin.roomsDirectCheckbox.click();129 break;130 case 3:131 admin.roomsPrivateCheckbox.click();132 break;133 }134 });135 afterEach(() => {136 switch (checkbox) {137 case 1:138 admin.roomsChannelsCheckbox.click();139 checkbox ++;140 break;141 case 2:142 admin.roomsDirectCheckbox.click();143 checkbox ++;144 break;145 case 3:146 admin.roomsPrivateCheckbox.click();147 break;148 }149 });150 it('should show the general channel', () => {151 admin.roomsGeneralChannel.isVisible().should.be.true;152 });153 it('should not show the general channel', () => {154 admin.roomsGeneralChannel.isVisible().should.be.false;155 });156 it('should not show the general channel', () => {157 admin.roomsGeneralChannel.isVisible().should.be.false;158 });159 });160 });161 describe('users', () => {162 before(() => {163 admin.usersLink.waitForVisible(5000);164 admin.usersLink.click();165 admin.usersFilter.waitForVisible(5000);166 });167 after(() => {168 admin.infoLink.click();169 });170 it('should show the search form', () => {171 admin.usersFilter.isVisible().should.be.true;172 });173 it.skip('should show rocket.cat', () => {174 //it cant find the user if there is too many users175 admin.usersRocketCat.isVisible().should.be.true;176 });177 describe('filter text', () => {178 before(() => {179 admin.usersFilter.click();180 admin.usersFilter.setValue('Rocket.Cat');181 });182 after(() => {183 admin.usersFilter.click();184 admin.usersFilter.setValue('');185 });186 it('should show rocket.cat', () => {187 admin.usersRocketCat.waitForVisible();188 admin.usersRocketCat.isVisible().should.be.true;189 });190 });191 describe('filter text with wrong user', () => {192 before(() => {193 admin.usersFilter.click();194 admin.usersFilter.setValue('something else');195 });196 after(() => {197 admin.usersFilter.click();198 admin.usersFilter.setValue('');199 });200 it('should not show rocket.cat', () => {201 admin.usersRocketCat.isVisible().should.be.false;202 });203 });204 describe('users flex tab ', () => {205 describe('send invitation', () => {206 before(() => {207 flexTab.usersSendInvitationTab.waitForVisible(5000);208 flexTab.usersSendInvitationTab.click();209 flexTab.usersSendInvitationTextArea.waitForVisible(5000);210 });211 after(() => {212 flexTab.usersSendInvitationTab.waitForVisible(5000);213 flexTab.usersSendInvitationTab.click();214 flexTab.usersSendInvitationTextArea.waitForVisible(5000, true);215 });216 it('should show the send invitation text area', () => {217 flexTab.usersSendInvitationTextArea.isVisible().should.be.true;218 });219 it('should show the cancel button', () => {220 flexTab.usersButtonCancel.isVisible().should.be.true;221 });222 it('should show the send button', () => {223 flexTab.usersSendInvitationSend.isVisible().should.be.true;224 });225 });226 describe('create user ', () => {227 before(() => {228 flexTab.usersAddUserTab.waitForVisible(5000);229 flexTab.usersAddUserTab.click();230 flexTab.usersAddUserName.waitForVisible(5000);231 });232 after(() => {233 flexTab.usersAddUserTab.waitForVisible(5000);234 flexTab.usersAddUserTab.click();235 flexTab.usersAddUserName.waitForVisible(5000, true);236 });237 it('should show the name field', () => {238 flexTab.usersAddUserName.isVisible().should.be.true;239 });240 it('should show the username field', () => {241 flexTab.usersAddUserUsername.isVisible().should.be.true;242 });243 it('should show the email field', () => {244 flexTab.usersAddUserEmail.isVisible().should.be.true;245 });246 it('should show the verified checkbox', () => {247 flexTab.usersAddUserVerifiedCheckbox.isVisible().should.be.true;248 });249 it('should show the password field', () => {250 flexTab.usersAddUserPassword.isVisible().should.be.true;251 });252 it('should show the random password button', () => {253 flexTab.usersAddUserRandomPassword.isVisible().should.be.true;254 });255 it('should show the require password change button', () => {256 flexTab.usersAddUserChangePasswordCheckbox.isVisible().should.be.true;257 });258 it('should show the role dropdown', () => {259 flexTab.usersAddUserRole.isVisible().should.be.true;260 });261 it('should show the join default channel checkbox', () => {262 flexTab.usersAddUserDefaultChannelCheckbox.isVisible().should.be.true;263 });264 it('should show the send welcome checkbox', () => {265 flexTab.usersAddUserWelcomeEmailCheckbox.isVisible().should.be.true;266 });267 it('should show the save button', () => {268 flexTab.usersButtonSave.isVisible().should.be.true;269 });270 it('should show the cancel button', () => {271 flexTab.usersButtonCancel.isVisible().should.be.true;272 });273 });274 });275 });276 describe('roles', () => {277 before(() =>{278 admin.permissionsLink.waitForVisible(5000);279 admin.permissionsLink.click();280 admin.rolesPermissionGrid.waitForVisible(5000);281 });282 after(() => {283 admin.infoLink.click();284 });285 it('should show the permissions grid', () => {286 admin.rolesPermissionGrid.isVisible().should.be.true;287 });288 it('should show the new role button', () => {289 admin.rolesNewRolesButton.isVisible().should.be.true;290 });291 it('should show the admin link', () => {292 admin.rolesAdmin.isVisible().should.be.true;293 });294 describe('new role', () => {295 before(() => {296 admin.rolesNewRolesButton.waitForVisible(5000);297 admin.rolesNewRolesButton.click();298 admin.rolesReturnLink.waitForVisible(5000);299 });300 after(() => {301 admin.rolesReturnLink.click();302 });303 it('should show the return to permissions', () => {304 admin.rolesReturnLink.isVisible().should.be.true;305 });306 it('should show the new role name field', () => {307 admin.rolesNewRoleName.isVisible().should.be.true;308 });309 it('should show the new role description field', () => {310 admin.rolesNewRoleDesc.isVisible().should.be.true;311 });312 it('should show the new role scope', () => {313 admin.rolesNewRoleScope.isVisible().should.be.true;314 });315 });316 describe('admin role', () => {317 before(() => {318 admin.rolesAdmin.waitForVisible(5000);319 admin.rolesAdmin.click();320 admin.usersInternalAdmin.waitForVisible(5000);321 });322 after(() => {323 admin.rolesReturnLink.click();324 });325 it('should show internal admin', () => {326 admin.usersInternalAdmin.isVisible().should.be.true;327 });328 });329 });330 describe('general settings', () => {331 before(() => {332 admin.generalLink.waitForVisible(5000);333 admin.generalLink.click();334 admin.generalSiteUrl.waitForVisible(5000);335 });336 describe('general', () => {337 it('should show site url field', () => {338 admin.generalSiteUrl.isVisible().should.be.true;339 });340 it('should change site url field', () => {341 admin.generalSiteUrl.setValue('something');342 });343 it('should show the reset button', () => {344 admin.generalSiteUrlReset.waitForVisible(5000);345 admin.generalSiteUrlReset.isVisible().should.be.true;346 });347 it('should click the reset button', () => {348 admin.generalSiteUrlReset.click();349 });350 it('the site url field should be different from the last input', () => {351 admin.generalSiteUrl.getText().should.not.equal('something');352 });353 it('should show site name field', () => {354 admin.generalSiteName.isVisible().should.be.true;355 });356 it('should change site name field', () => {357 admin.generalSiteName.setValue('something');358 });359 it('should show the reset button', () => {360 admin.generalSiteNameReset.waitForVisible(5000);361 admin.generalSiteNameReset.isVisible().should.be.true;362 });363 it('should click the reset button', () => {364 admin.generalSiteNameReset.click();365 });366 it('the name field should be different from the last input', () => {367 admin.generalSiteName.getText().should.not.equal('something');368 });369 it('should show language field', () => {370 admin.generalLanguage.isVisible().should.be.true;371 });372 it('should change the language ', () => {373 admin.generalLanguage.click();374 admin.generalLanguagePtOption.waitForVisible(5000);375 admin.generalLanguagePtOption.click();376 });377 it('should show the reset button', () => {378 admin.generalLanguageReset.waitForVisible(5000);379 admin.generalLanguageReset.isVisible().should.be.true;380 });381 it('should click the reset button', () => {382 admin.generalLanguageReset.click();383 });384 it('should show invalid self signed certs checkboxes', () => {385 admin.generalSelfSignedCertsFalse.isVisible().should.be.true;386 admin.generalSelfSignedCertsTrue.isVisible().should.be.true;387 });388 it('should change the invalid self signed certs checkboxes', () => {389 admin.generalSelfSignedCertsTrue.click();390 });391 it('should show the reset button', () => {392 admin.generalSelfSignedCertsReset.waitForVisible(5000);393 admin.generalSelfSignedCertsReset.isVisible().should.be.true;394 });395 it('should click the reset button', () => {396 admin.generalSelfSignedCertsReset.click();397 });398 it('should show favorite rooms checkboxes', () => {399 admin.generalFavoriteRoomFalse.isVisible().should.be.true;400 admin.generalFavoriteRoomTrue.isVisible().should.be.true;401 });402 it('should change the favorite rooms checkboxes', () => {403 admin.generalFavoriteRoomFalse.click();404 });405 it('should show the reset button', () => {406 admin.generalFavoriteRoomReset.waitForVisible(5000);407 admin.generalFavoriteRoomReset.isVisible().should.be.true;408 });409 it('should click the reset button', () => {410 admin.generalFavoriteRoomReset.click();411 });412 it('should show cdn prefix field', () => {413 admin.generalCdnPrefix.isVisible().should.be.true;414 });415 it('should change site url field', () => {416 admin.generalCdnPrefix.setValue('something');417 });418 it('should show the reset button', () => {419 admin.generalCdnPrefixReset.waitForVisible(5000);420 admin.generalCdnPrefixReset.isVisible().should.be.true;421 });422 it('should click the reset button', () => {423 admin.generalCdnPrefixReset.click();424 });425 it('should show the force SSL checkboxes', () => {426 admin.generalForceSSLTrue.isVisible().should.be.true;427 admin.generalForceSSLFalse.isVisible().should.be.true;428 });429 it('should change the force ssl checkboxes', () => {430 admin.generalForceSSLTrue.click();431 });432 it('should show the reset button', () => {433 admin.generalForceSSLReset.waitForVisible(5000);434 admin.generalForceSSLReset.isVisible().should.be.true;435 });436 it('should click the reset button', () => {437 admin.generalForceSSLReset.click();438 });439 it('should show google tag id field', () => {440 admin.generalGoogleTagId.isVisible().should.be.true;441 });442 it('should change google tag id field', () => {443 admin.generalGoogleTagId.setValue('something');444 });445 it('should show the reset button', () => {446 admin.generalGoogleTagIdReset.waitForVisible(5000);447 admin.generalGoogleTagIdReset.isVisible().should.be.true;448 });449 it('should click the reset button', () => {450 admin.generalGoogleTagIdReset.click();451 });452 it('should show bugsnag key field', () => {453 admin.generalBugsnagKey.isVisible().should.be.true;454 });455 it('should change bugsnag key id field', () => {456 admin.generalBugsnagKey.setValue('something');457 });458 it('should show the reset button', () => {459 admin.generalBugsnagKeyReset.waitForVisible(5000);460 admin.generalBugsnagKeyReset.isVisible().should.be.true;461 });462 it('should click the reset button', () => {463 admin.generalBugsnagKeyReset.click();464 });465 });466 describe('iframe', () => {467 before(() => {468 admin.generalButtonExpandIframe.waitForVisible(5000);469 admin.generalButtonExpandIframe.click();470 admin.generalIframeSendTrue.waitForVisible(5000);471 admin.generalIframeSendTrue.scroll();472 });473 it('should show iframe send checkboxes', () => {474 admin.generalIframeSendTrue.isVisible().should.be.true;475 admin.generalIframeSendFalse.isVisible().should.be.true;476 });477 it('should show send origin field', () => {478 admin.generalIframeSendTargetOrigin.isVisible().should.be.true;479 });480 it('should show iframe send checkboxes', () => {481 admin.generalIframeRecieveFalse.isVisible().should.be.true;482 admin.generalIframeRecieveTrue.isVisible().should.be.true;483 });484 it('should show send origin field', () => {485 admin.generalIframeRecieveOrigin.isVisible().should.be.true;486 });487 });488 describe('notifications', () => {489 before(() => {490 admin.generalButtonExpandNotifications.waitForVisible(5000);491 admin.generalButtonExpandNotifications.click();492 admin.generalNotificationDuration.waitForVisible(5000);493 admin.generalNotificationDuration.scroll();494 });495 it('should show the notifications durations field', () => {496 admin.generalNotificationDuration.isVisible().should.be.true;497 });498 });499 describe('rest api', () => {500 before(() => {501 admin.generalButtonExpandRest.waitForVisible(5000);502 admin.generalButtonExpandRest.click();503 admin.generalRestApiUserLimit.waitForVisible(5000);504 admin.generalRestApiUserLimit.scroll();505 });506 it('should show the API user add limit field', () => {507 admin.generalRestApiUserLimit.isVisible().should.be.true;508 });509 });510 describe('reporting', () => {511 before(() => {512 admin.generalButtonExpandReporting.waitForVisible(5000);513 admin.generalButtonExpandReporting.click();514 admin.generalReportingTrue.waitForVisible(5000);515 admin.generalReportingTrue.scroll();516 });517 it('should show the report to rocket.chat checkboxes', () => {518 admin.generalReportingTrue.isVisible().should.be.true;519 admin.generalReportingFalse.isVisible().should.be.true;520 });521 });522 describe('stream cast', () => {523 before(() => {524 admin.generalButtonExpandStreamCast.waitForVisible(5000);525 admin.generalButtonExpandStreamCast.click();526 admin.generalStreamCastAdress.waitForVisible(5000);527 admin.generalStreamCastAdress.scroll();528 });529 it('should show the stream cast adress field', () => {530 admin.generalStreamCastAdress.isVisible().should.be.true;531 });532 });533 describe('stream cast', () => {534 before(() => {535 admin.generalButtonExpandUTF8.waitForVisible(5000);536 admin.generalButtonExpandUTF8.click();537 admin.generalUTF8Regex.waitForVisible(5000);538 admin.generalUTF8Regex.scroll();539 });540 it('should show the utf8 regex field', () => {541 admin.generalUTF8Regex.isVisible().should.be.true;542 });543 it('should show the utf8 names slug checkboxes', () => {544 admin.generalUTF8NamesSlugTrue.isVisible().should.be.true;545 admin.generalUTF8NamesSlugFalse.isVisible().should.be.true;546 });547 });548 });549 });...

Full Screen

Full Screen

reveal.js

Source:reveal.js Github

copy

Full Screen

1jQuery(document).ready(function() {2 var isVisible = {}3 //solutions variables4 isVisible.brainstorm = true;5 isVisible.organize = true;6 isVisible.plan = true;7 isVisible.execute = true;8 9 //video variables10 isVisible.ziba = true;11 isVisible.sensorlink = true;12 isVisible.ekso = true;13 isVisible.edc = true;14 isVisible.sharepoint = true;15 16 function removeIframes(){17 jQuery('div#view-sensorlink iframe').remove();18 jQuery('div#view-ziba iframe').remove();19 jQuery('div#view-ekso iframe').remove();20 jQuery('div#view-edc iframe').remove();21 jQuery('div#view-sharepoint iframe').remove();22 }23 24 //solutions functions25 jQuery("a#click-brainstorm").click(function(event) {26 event.preventDefault();27 jQuery('div#view-brainstorm').show();28 jQuery('a#click-brainstorm').addClass('active');29 isVisible.brainstorm = true;30 if (isVisible.organize = true) {31 jQuery('div#view-organize').hide();32 jQuery('a#click-organize').removeClass('active');33 isVisible.organize = false;34 }35 if (isVisible.plan = true) {36 jQuery('div#view-plan').hide();37 jQuery('a#click-plan').removeClass('active');38 isVisible.plan = false;39 }40 if (isVisible.execute = true) {41 jQuery('div#view-execute').hide();42 jQuery('a#click-execute').removeClass('active');43 isVisible.execute = false;44 }45 }); 46 jQuery("a#click-organize").click(function(event) {47 event.preventDefault();48 jQuery('div#view-organize').show();49 jQuery('a#click-organize').addClass('active');50 isVisible.organize = true;51 if (isVisible.brainstorm = true) {52 jQuery('div#view-brainstorm').hide();53 jQuery('a#click-brainstorm').removeClass('active');54 isVisible.brainstorm = false;55 }56 if (isVisible.plan = true) {57 jQuery('div#view-plan').hide();58 jQuery('a#click-plan').removeClass('active');59 isVisible.plan = false;60 }61 if (isVisible.execute = true) {62 jQuery('div#view-execute').hide();63 jQuery('a#click-execute').removeClass('active');64 isVisible.execute = false;65 }66 }); 67 68 jQuery("a#click-plan").click(function(event) {69 event.preventDefault();70 jQuery('div#view-plan').show();71 jQuery('a#click-plan').addClass('active');72 isVisible.plan = true;73 if (isVisible.brainstorm = true) {74 jQuery('div#view-brainstorm').hide();75 jQuery('a#click-brainstorm').removeClass('active');76 isVisible.brainstorm = false;77 }78 if (isVisible.organize = true) {79 jQuery('div#view-organize').hide();80 jQuery('a#click-organize').removeClass('active');81 isVisible.organize = false;82 }83 if (isVisible.execute = true) {84 jQuery('div#view-execute').hide();85 jQuery('a#click-execute').removeClass('active');86 isVisible.execute = false;87 }88 });89 90 jQuery("a#click-execute").click(function(event) {91 event.preventDefault();92 jQuery('div#view-execute').show();93 jQuery('a#click-execute').addClass('active');94 isVisible.execute = true;95 if (isVisible.brainstorm = true) {96 jQuery('div#view-brainstorm').hide();97 jQuery('a#click-brainstorm').removeClass('active');98 isVisible.brainstorm = false;99 }100 if (isVisible.organize = true) {101 jQuery('div#view-organize').hide();102 jQuery('a#click-organize').removeClass('active');103 isVisible.organize = false;104 }105 if (isVisible.plan = true) {106 jQuery('div#view-plan').hide();107 jQuery('a#click-plan').removeClass('active');108 isVisible.plan = false;109 }110 });111 //video functions112 113 jQuery("a#click-sensorlink").click(function(event) {114 event.preventDefault();115 jQuery('div#view-sensorlink').show();116 removeIframes();117 jQuery('a#click-sensorlink').addClass('active');118 jQuery('img#sensorlink-inactive').replaceWith('<img src="/img/thumbnail-sensorlink-active.png" id="sensorlink-active" alt="Sensorlink">');119 isVisible.sensorlink = true;120 if (isVisible.ziba = true) {121 jQuery('div#view-ziba').hide();122 jQuery('a#click-ziba').removeClass('active');123 jQuery('img#ziba-active').replaceWith('<img src="/img/thumbnail-ziba-inactive.png" id="ziba-inactive" alt="Ziba">');124 isVisible.ziba = false;125 }126 if (isVisible.ekso = true) {127 jQuery('div#view-ekso').hide();128 jQuery('a#click-ekso').removeClass('active');129 jQuery('img#ekso-active').replaceWith('<img src="/img/thumbnail-ekso-inactive.png" id="ekso-inactive" alt="Ekso">');130 isVisible.ekso = false;131 }if (isVisible.edc = true) {132 jQuery('div#view-edc').hide();133 jQuery('a#click-edc').removeClass('active');134 jQuery('img#edc-active').replaceWith('<img src="/img/thumbnail-edc-inactive.png" id="edc-inactive" alt="EDC">');135 isVisible.edc = false;136 }137 if (isVisible.sharepoint = true) {138 jQuery('div#view-sharepoint').hide();139 jQuery('a#click-sharepoint').removeClass('active');140 jQuery('img#sharepoint-active').replaceWith('<img src="/img/thumbnail-sharepoint-inactive.png" id="sharepoint-inactive" alt="Sharepoint">');141 isVisible.sharepoint = false;142 }143 });144 jQuery("a#click-ziba").click(function(event) {145 event.preventDefault();146 jQuery('div#view-ziba').show();147 removeIframes();148 jQuery('a#click-ziba').addClass('active');149 jQuery('img#ziba-inactive').replaceWith('<img src="/img/thumbnail-ziba-active.png" id="ziba-active" alt="Ziba">');150 isVisible.ziba = true;151 if (isVisible.sensorlink = true) {152 jQuery('div#view-sensorlink').hide();153 jQuery('a#click-sensorlink').removeClass('active');154 jQuery('img#sensorlink-active').replaceWith('<img src="/img/thumbnail-sensorlink-inactive.png" id="sensorlink-inactive" alt="Sensorlink">');155 isVisible.sensorlink = false;156 }157 if (isVisible.ekso = true) {158 jQuery('div#view-ekso').hide();159 jQuery('a#click-ekso').removeClass('active');160 jQuery('img#ekso-active').replaceWith('<img src="/img/thumbnail-ekso-inactive.png" id="ekso-inactive" alt="Ekso">');161 isVisible.ekso = false;162 }163 if (isVisible.edc = true) {164 jQuery('div#view-edc').hide();165 jQuery('a#click-edc').removeClass('active');166 jQuery('img#edc-active').replaceWith('<img src="/img/thumbnail-edc-inactive.png" id="edc-inactive" alt="EDC">');167 isVisible.edc = false;168 }169 if (isVisible.sharepoint = true) {170 jQuery('div#view-sharepoint').hide();171 jQuery('a#click-sharepoint').removeClass('active');172 jQuery('img#sharepoint-active').replaceWith('<img src="/img/thumbnail-sharepoint-inactive.png" id="sharepoint-inactive" alt="Sharepoint">');173 isVisible.sharepoint = false;174 }175 });176 177 178 jQuery("a#click-ekso").click(function(event) {179 event.preventDefault();180 jQuery('div#view-ekso').show();181 removeIframes();182 jQuery('a#click-ekso').addClass('active');183 jQuery('img#ekso-inactive').replaceWith('<img src="/img/thumbnail-ekso-active.png" id="ekso-active" alt="Ekso">');184 isVisible.ekso = true;185 if (isVisible.ziba = true) {186 jQuery('div#view-ziba').hide();187 jQuery('a#click-ziba').removeClass('active');188 jQuery('img#ziba-active').replaceWith('<img src="/img/thumbnail-ziba-inactive.png" id="ziba-inactive" alt="Ziba">');189 isVisible.ziba = false;190 }191 if (isVisible.sensorlink = true) {192 jQuery('div#view-sensorlink').hide();193 jQuery('a#click-sensorlink').removeClass('active');194 jQuery('img#sensorlink-active').replaceWith('<img src="/img/thumbnail-sensorlink-inactive.png" id="sensorlink-inactive" alt="Sensorlink">');195 isVisible.sensorlink = false;196 }197 if (isVisible.edc = true) {198 jQuery('div#view-edc').hide();199 jQuery('a#click-edc').removeClass('active');200 jQuery('img#edc-active').replaceWith('<img src="/img/thumbnail-edc-inactive.png" id="edc-inactive" alt="EDC">');201 isVisible.edc = false;202 }203 if (isVisible.sharepoint = true) {204 jQuery('div#view-sharepoint').hide();205 jQuery('a#click-sharepoint').removeClass('active');206 jQuery('img#sharepoint-active').replaceWith('<img src="/img/thumbnail-sharepoint-inactive.png" id="sharepoint-inactive" alt="Sharepoint">');207 isVisible.sharepoint = false;208 }209 });210 211 jQuery("a#click-edc").click(function(event) {212 event.preventDefault();213 jQuery('div#view-edc').show();214 removeIframes();215 jQuery('a#click-edc').addClass('active');216 jQuery('img#edc-inactive').replaceWith('<img src="/img/thumbnail-edc-active.png" id="edc-active" alt="EDC">');217 isVisible.edc = true;218 if (isVisible.ziba = true) {219 jQuery('div#view-ziba').hide();220 jQuery('a#click-ziba').removeClass('active');221 jQuery('img#ziba-active').replaceWith('<img src="/img/thumbnail-ziba-inactive.png" id="ziba-inactive" alt="Ziba">');222 isVisible.ziba = false;223 }224 if (isVisible.sensorlink = true) {225 jQuery('div#view-sensorlink').hide();226 jQuery('a#click-sensorlink').removeClass('active');227 jQuery('img#sensorlink-active').replaceWith('<img src="/img/thumbnail-sensorlink-inactive.png" id="sensorlink-inactive" alt="Sensorlink">');228 isVisible.sensorlink = false;229 }230 if (isVisible.ekso = true) {231 jQuery('div#view-ekso').hide();232 jQuery('a#click-ekso').removeClass('active');233 jQuery('img#ekso-active').replaceWith('<img src="/img/thumbnail-ekso-inactive.png" id="ekso-inactive" alt="Ekso">');234 isVisible.ekso = false;235 }236 if (isVisible.sharepoint = true) {237 jQuery('div#view-sharepoint').hide();238 jQuery('a#click-sharepoint').removeClass('active');239 jQuery('img#sharepoint-active').replaceWith('<img src="/img/thumbnail-sharepoint-inactive.png" id="sharepoint-inactive" alt="Sharepoint">');240 isVisible.sharepoint = false;241 }242 });243 244 jQuery("a#click-sharepoint").click(function(event) {245 event.preventDefault();246 jQuery('div#view-sharepoint').show();247 removeIframes();248 jQuery('a#click-sharepoint').addClass('active');249 jQuery('img#sharepoint-inactive').replaceWith('<img src="/img/thumbnail-sharepoint-active.png" id="sharepoint-active" alt="Sharepoint">');250 isVisible.sharepoint = true;251 if (isVisible.ziba = true) {252 jQuery('div#view-ziba').hide();253 jQuery('a#click-ziba').removeClass('active');254 jQuery('img#ziba-active').replaceWith('<img src="/img/thumbnail-ziba-inactive.png" id="ziba-inactive" alt="Ziba">');255 isVisible.ziba = false;256 }257 if (isVisible.sensorlink = true) {258 jQuery('div#view-sensorlink').hide();259 jQuery('a#click-sensorlink').removeClass('active');260 jQuery('img#sensorlink-active').replaceWith('<img src="/img/thumbnail-sensorlink-inactive.png" id="sensorlink-inactive" alt="Sensorlink">');261 isVisible.sensorlink = false;262 }263 if (isVisible.ekso = true) {264 jQuery('div#view-ekso').hide();265 jQuery('a#click-ekso').removeClass('active');266 jQuery('img#ekso-active').replaceWith('<img src="/img/thumbnail-ekso-inactive.png" id="ekso-inactive" alt="Ekso">');267 isVisible.ekso = false;268 }269 if (isVisible.edc = true) {270 jQuery('div#view-edc').hide();271 jQuery('a#click-edc').removeClass('active');272 jQuery('img#edc-active').replaceWith('<img src="/img/thumbnail-edc-inactive.png" id="edc-inactive" alt="EDC">');273 isVisible.edc = false;274 }275 });276 ...

Full Screen

Full Screen

04-main-elements-render.js

Source:04-main-elements-render.js Github

copy

Full Screen

...14 });15 describe('side nav bar', () => {16 describe('render', () => {17 it('should show the logged username', () => {18 sideNav.accountBoxUserName.isVisible().should.be.true;19 });20 it('should show the logged user avatar', () => {21 sideNav.accountBoxUserAvatar.isVisible().should.be.true;22 });23 it('should show the new channel button', () => {24 sideNav.newChannelBtn.isVisible().should.be.true;25 });26 it('should show the plus icon', () => {27 sideNav.newChannelIcon.isVisible().should.be.true;28 });29 it('should show the "More Channels" button', () => {30 sideNav.moreChannels.isVisible().should.be.true;31 });32 it('should show the new direct message button', () => {33 sideNav.newDirectMessageBtn.isVisible().should.be.true;34 });35 it('should show "general" channel', () => {36 sideNav.general.isVisible().should.be.true;37 });38 it('should show spotlight search bar', () => {39 sideNav.spotlightSearch.isVisible().should.be.true;40 });41 it.skip('should not show eye icon on general', () => {42 sideNav.channelHoverIcon.isVisible().should.be.true;43 });44 });45 describe('spotlight search render', () => {46 it('should show spotlight search bar', () => {47 sideNav.spotlightSearch.isVisible().should.be.true;48 });49 it('should click the spotlight and show the channel list', () => {50 sideNav.spotlightSearch.waitForVisible(5000);51 sideNav.spotlightSearch.click();52 sideNav.spotlightSearchPopUp.waitForVisible(5000);53 sideNav.spotlightSearchPopUp.isVisible().should.be.true;54 });55 it('when the spotlight loses focus the list should disappear', () => {56 sideNav.spotlightSearchPopUp.waitForVisible(5000);57 sideNav.spotlightSearchPopUp.isVisible().should.be.true;58 mainContent.messageInput.click();59 sideNav.spotlightSearchPopUp.waitForVisible(5000, true);60 sideNav.spotlightSearchPopUp.isVisible().should.be.false;61 });62 it('should add text to the spotlight and show the channel list', () => {63 sideNav.spotlightSearch.waitForVisible(5000);64 sideNav.spotlightSearch.setValue('rocket.cat');65 sideNav.spotlightSearchPopUp.waitForVisible(5000);66 sideNav.spotlightSearchPopUp.isVisible().should.be.true;67 });68 it('the text on the spotlight and the list should disappear when lost focus', () => {69 sideNav.spotlightSearchPopUp.waitForVisible(5000);70 sideNav.spotlightSearchPopUp.isVisible().should.be.true;71 mainContent.messageInput.click();72 sideNav.spotlightSearchPopUp.waitForVisible(5000, true);73 sideNav.spotlightSearchPopUp.isVisible().should.be.false;74 sideNav.spotlightSearch.getText().should.equal('');75 });76 });77 });78 describe('user options', () => {79 describe('render', () => {80 before(() => {81 sideNav.accountBoxUserName.click();82 sideNav.userOptions.waitForVisible(5000);83 });84 after(() => {85 sideNav.accountBoxUserName.click();86 });87 it('should show user options', () => {88 sideNav.userOptions.isVisible().should.be.true;89 });90 it('should show online button', () => {91 sideNav.statusOnline.isVisible().should.be.true;92 });93 it('should show away button', () => {94 sideNav.statusAway.isVisible().should.be.true;95 });96 it('should show busy button', () => {97 sideNav.statusBusy.isVisible().should.be.true;98 });99 it('should show offline button', () => {100 sideNav.statusOffline.isVisible().should.be.true;101 });102 it('should show settings button', () => {103 sideNav.account.isVisible().should.be.true;104 });105 it('should show logout button', () => {106 sideNav.logout.isVisible().should.be.true;107 });108 });109 });110 describe('main content', () => {111 describe('render', () => {112 before(()=> {113 sideNav.logout.waitForVisible(5000, true);114 sideNav.getChannelFromList('general').waitForVisible(5000);115 sideNav.openChannel('general');116 });117 it('should show the title of the channel', () => {118 mainContent.channelTitle.isVisible().should.be.true;119 });120 it('should show the empty favorite star', () => {121 mainContent.emptyFavoriteStar.isVisible().should.be.true;122 });123 it('clicks the star', () => {124 mainContent.emptyFavoriteStar.click();125 });126 it('should not show the empty favorite star', () => {127 mainContent.favoriteStar.isVisible().should.be.true;128 });129 it('clicks the star', () => {130 mainContent.favoriteStar.click();131 });132 it('should show the message input bar', () => {133 mainContent.messageInput.isVisible().should.be.true;134 });135 it('should show the file attachment button', () => {136 mainContent.fileAttachmentBtn.isVisible().should.be.true;137 });138 it('should show the audio recording button', () => {139 mainContent.recordBtn.isVisible().should.be.true;140 });141 it('should show the video call button', () => {142 mainContent.videoCamBtn.isVisible().should.be.true;143 });144 it('should not show the send button', () => {145 mainContent.sendBtn.isVisible().should.be.false;146 });147 it('should show the emoji button', () => {148 mainContent.emojiBtn.isVisible().should.be.true;149 });150 it('adds some text to the input', () => {151 mainContent.addTextToInput('Some Text');152 });153 it('should show the send button', () => {154 mainContent.sendBtn.isVisible().should.be.true;155 });156 it('should not show the file attachment button', () => {157 mainContent.fileAttachmentBtn.isVisible().should.be.false;158 });159 it('should not show the audio recording button', () => {160 mainContent.recordBtn.isVisible().should.be.false;161 });162 it('should not show the video call button', () => {163 mainContent.videoCamBtn.isVisible().should.be.false;164 });165 it('should show the last message', () => {166 mainContent.lastMessage.isVisible().should.be.true;167 });168 it('the last message should be from the loged user', () => {169 mainContent.lastMessageUser.getText().should.equal(username);170 });171 it('should not show the Admin tag', () => {172 mainContent.lastMessageUserTag.isVisible().should.be.false;173 });174 });175 });176 describe('flextab usage', () => {177 describe('render', () => {178 before(()=> {179 sideNav.getChannelFromList('general').waitForVisible(5000);180 sideNav.openChannel('general');181 });182 describe('Room Info Tab', () => {183 before(()=> {184 flexTab.channelTab.click();185 });186 after(()=> {187 flexTab.channelTab.click();188 });189 it('should show the room info button', () => {190 flexTab.channelTab.isVisible().should.be.true;191 });192 it('should show the room info tab content', () => {193 flexTab.channelSettings.waitForVisible(5000);194 flexTab.channelSettings.isVisible().should.be.true;195 });196 it('should show the room name', ()=> {197 flexTab.firstSetting.waitForVisible();198 flexTab.firstSetting.getText().should.equal('general');199 });200 });201 describe('Search Tab', () => {202 before(()=> {203 flexTab.searchTab.click();204 });205 after(()=> {206 flexTab.searchTab.click();207 });208 it('should show the message search button', () => {209 flexTab.searchTab.isVisible().should.be.true;210 });211 it('should show the message tab content', () => {212 flexTab.searchTabContent.isVisible().should.be.true;213 });214 });215 describe('Members Tab', () => {216 before(()=> {217 flexTab.membersTab.click();218 });219 after(()=> {220 flexTab.membersTab.click();221 });222 it('should show the members tab button', () => {223 flexTab.membersTab.isVisible().should.be.true;224 });225 it('should show the members content', () => {226 flexTab.membersTabContent.isVisible().should.be.true;227 });228 it.skip('should show the members search bar', () => {229 flexTab.userSearchBar.isVisible().should.be.true;230 });231 it.skip('should show the show all link', () => {232 flexTab.showAll.isVisible().should.be.true;233 });234 });235 describe('Notifications Tab', () => {236 before(()=> {237 flexTab.notificationsTab.click();238 });239 after(()=> {240 flexTab.notificationsTab.click();241 });242 it('should show the notifications button', () => {243 flexTab.notificationsTab.isVisible().should.be.true;244 });245 it('should show the notifications Tab content', () => {246 flexTab.notificationsSettings.isVisible().should.be.true;247 });248 });249 describe('Files Tab', () => {250 before(()=> {251 flexTab.filesTab.click();252 });253 after(()=> {254 flexTab.filesTab.click();255 });256 it('should show the files button', () => {257 flexTab.filesTab.isVisible().should.be.true;258 });259 it('should show the files Tab content', () => {260 flexTab.filesTabContent.isVisible().should.be.true;261 });262 });263 describe('Mentions Tab', () => {264 before(()=> {265 flexTab.mentionsTab.click();266 });267 after(()=> {268 flexTab.mentionsTab.click();269 });270 it('should show the mentions button', () => {271 flexTab.mentionsTab.isVisible().should.be.true;272 });273 it('should show the mentions Tab content', () => {274 flexTab.mentionsTabContent.isVisible().should.be.true;275 });276 });277 describe('Starred Messages Tab', () => {278 before(()=> {279 flexTab.starredTab.click();280 });281 after(()=> {282 flexTab.starredTab.click();283 });284 it('should show the starred messages button', () => {285 flexTab.starredTab.isVisible().should.be.true;286 });287 it('should show the starred messages Tab content', () => {288 flexTab.starredTabContent.isVisible().should.be.true;289 });290 });291 describe('Pinned Messages Tab', () => {292 before(()=> {293 flexTab.pinnedTab.click();294 });295 after(()=> {296 flexTab.pinnedTab.click();297 });298 it('should show the pinned button', () => {299 flexTab.pinnedTab.isVisible().should.be.true;300 });301 it('should show the pinned messages Tab content', () => {302 flexTab.pinnedTabContent.isVisible().should.be.true;303 });304 });305 });306 });...

Full Screen

Full Screen

styles.js

Source:styles.js Github

copy

Full Screen

1import styled, { css } from "styled-components";2import { colors } from "../../styles/colors";3export const Container = styled.div`4 width: 100%;5 position: sticky;6 top: 0;7 @media only screen and (max-width: 768px) {8 /* <--FULL SCREEN--> */9 background-color: ${({ isVisible }) => (isVisible ? "" : "#fff")};10 justify-content: ${({ isVisible }) => (isVisible ? "" : "center")};11 width: ${({ isVisible }) => (isVisible ? "" : "100vw")};12 height: ${({ isVisible }) => (isVisible ? "" : "100vh")};13 top: ${({ isVisible }) => (isVisible ? "" : "0")};14 left: ${({ isVisible }) => (isVisible ? "" : "0")};15 z-index: ${({ isVisible }) => (isVisible ? "" : "9999")};16 }17`;18export const MenuContainer = styled.div`19 height: 80px;20 display: flex;21 align-items: center;22 justify-content: center;23 background-color: ${colors.headerBackground};24 transition: 0.3s;25 /* (max-width: 768px) */26 @media only screen and (max-width: 768px) {27 height: 64px;28 transition: 0.3s;29 }30 @media only screen and (max-width: 768px) {31 /* <--FULL SCREEN--> */32 display: ${({ isVisible }) => (isVisible ? "" : "none")};33 }34`;35export const MenuContent = styled.div`36 max-width: 1248px;37 width: 100%;38 display: flex;39 align-items: center;40 justify-content: space-between;41 padding: 0 24px 0 24px;42 position: relative;43`;44export const Logo = styled.div`45 font: 700 36px Archivo;46 color: white;47 transition: 0.3s;48 /* (max-width: 768px) */49 @media only screen and (max-width: 768px) {50 font: 700 24px Archivo;51 transition: 0.3s;52 }53`;54export const ProfileMenu = styled.nav`55 display: flex;56 justify-content: space-between;57 img {58 margin-right: 24px;59 }60`;61export const Profile = styled.div`62 display: flex;63 align-items: center;64 cursor: pointer;65 justify-content: space-between;66 img {67 margin-right: 0;68 }69 span {70 margin: 0 8px 0 0;71 color: ${colors.textInvert};72 text-overflow: ellipsis;73 white-space: nowrap;74 overflow: hidden;75 width: 192px;76 /* (max-width: 768px) */77 @media only screen and (max-width: 768px) {78 font-size: 12px;79 width: 112px;80 transition: 0.3s;81 }82 /* (max-width: 512px) */83 @media only screen and (max-width: 512px) {84 display: none;85 }86 }87 img {88 /* (max-width: 768px) */89 @media only screen and (max-width: 768px) {90 height: 32px;91 }92 }93`;94export const Menu = styled.nav`95 position: absolute;96 top: calc(100% + 40px);97 right: 16px;98 width: 256px;99 background-color: ${colors.headerBackground};100 color: ${colors.textInvert};101 border-radius: 8px;102 padding: 12px 0 12px 0;103 visibility: hidden;104 opacity: 0;105 transition: visibility 0s, opacity 0.1s linear;106 z-index: 2;107 a:visited {108 color: #fff;109 }110 ${({ isActive }) =>111 isActive &&112 css`113 visibility: visible;114 opacity: 1;115 `}116 /* (max-width: 512px) */117 @media only screen and (max-width: 512px) {118 width: 100%;119 right: 0;120 border-radius: 0px;121 top: calc(100% + 16px);122 box-shadow: rgba(0, 0, 0, 0.44) 0px 5px 20px;123 }124 div {125 position: absolute;126 top: -6px;127 right: 19px;128 height: 16px;129 width: 16px;130 background-color: tomato;131 transform: rotate(45deg);132 border-radius: 2px;133 background-color: ${colors.headerBackground};134 /* (max-width: 512px) */135 @media only screen and (max-width: 512px) {136 display: none;137 }138 }139 ul {140 list-style: none;141 display: flex;142 flex-direction: column;143 }144`;145export const MenuItem = styled.a`146 padding: 12px 24px;147 width: 100%;148 display: flex;149 align-items: center;150 justify-content: space-between;151 cursor: pointer;152`;153export const NavContainer = styled.div`154 width: 100%;155 position: sticky;156 top: 0;157 height: 64px;158 display: flex;159 align-items: center;160 justify-content: center;161 background-color: #fff;162 @media only screen and (max-width: 768px) {163 /* <--FULL SCREEN--> */164 height: ${({ isVisible }) => (isVisible ? "64px" : "100vh")};165 }166`;167export const NavContent = styled.nav`168 max-width: 1248px;169 width: 100%;170 display: flex;171 align-items: center;172 padding: 0 24px 0 24px;173 ul {174 display: flex;175 list-style: none;176 align-items: center;177 }178 ul a {179 &:visited {180 color: ${colors.text};181 }182 }183 ul li {184 color: rgba(0, 0, 0, 0.2);185 transition: 0.3s;186 }187 ul li:hover {188 color: ${colors.text};189 transition: 0.3s;190 }191 ul li,192 span {193 margin-right: 16px;194 line-height: 64px;195 }196 span {197 text-transform: uppercase;198 font: 700 18px Archivo;199 }200 @media only screen and (max-width: 768px) {201 /* <--FULL SCREEN--> */202 ul {203 flex-direction: column;204 display: ${({ isVisible }) => (isVisible ? "none" : "flex")};205 z-index: ${({ isVisible }) => (isVisible ? "" : "9999")};206 text-align: ${({ isVisible }) => (isVisible ? "" : "center")};207 margin: ${({ isVisible }) => (isVisible ? "" : "auto")};208 font-size: ${({ isVisible }) => (isVisible ? "" : "32px")};209 }210 span {211 display: ${({ isVisible }) => (isVisible ? "" : "none")};212 }213 }214`;215export const NavItem = styled.li`216 width: 112px;217 display: flex;218 justify-content: center;219`;220export const Tab = styled.div`221 @media (max-width: 768px) {222 width: 40px;223 height: 30px;224 margin: 0 24px 0 0;225 position: ${({ isVisible }) => (isVisible ? "" : "absolute")};226 top: ${({ isVisible }) => (isVisible ? "" : "80px")};227 right: ${({ isVisible }) => (isVisible ? "" : "-4px")};228 div:nth-child(1) {229 background-color: ${({ isVisible }) =>230 isVisible ? "#303030" : "#303030"};231 height: 5px;232 width: 100%;233 margin: 0 auto 6px;234 transition-duration: 0.3s;235 border-radius: 8px;236 transform: ${({ isVisible }) =>237 isVisible ? "" : "rotate(45deg) translate(7px, 7px)"};238 }239 div:nth-child(2) {240 background-color: #303030;241 height: 5px;242 border-radius: 8px;243 width: 100%;244 margin: 0 auto 6px;245 transition-duration: 0.3s;246 opacity: ${({ isVisible }) => (isVisible ? "" : "0")};247 }248 div:nth-child(3) {249 background-color: ${({ isVisible }) =>250 isVisible ? "#303030" : "#303030"};251 height: 5px;252 border-radius: 8px;253 width: 100%;254 margin: 0 auto 6px;255 transition-duration: 0.3s;256 transform: ${({ isVisible }) =>257 isVisible ? "" : "rotate(-45deg) translate(8px, -9px)"};258 }259 }...

Full Screen

Full Screen

Sprite.js

Source:Sprite.js Github

copy

Full Screen

...22 afterEach(function () {23 Ext.destroy(sprite, surface, container);24 });25 it("should return true if the sprite belongs to a visible parent, false otherwise", function () {26 expect(sprite.isVisible()).toBe(true);27 surface.remove(sprite);28 expect(sprite.isVisible()).toBe(false);29 var instancing = new Ext.draw.sprite.Instancing({30 template: sprite31 });32 surface.add(instancing);33 expect(sprite.isVisible()).toBe(true);34 instancing.destroy();35 });36 it("should return false if the sprite belongs to a parent that doesn't belong to a surface", function () {37 var instancing = new Ext.draw.sprite.Instancing({38 template: sprite39 });40 expect(sprite.isVisible()).toBe(false);41 });42 it("should return false in case the sprite is hidden", function () {43 sprite.hide();44 expect(sprite.isVisible()).toBe(false);45 });46 it("should return false in case the sprite has no fillStyle and strokeStyle, true otherwise", function () {47 sprite.setAttributes({48 fillStyle: none49 });50 expect(sprite.isVisible()).toBe(true);51 sprite.setAttributes({52 fillStyle: rgba_none53 });54 expect(sprite.isVisible()).toBe(true);55 sprite.setAttributes({56 fillStyle: 'red',57 strokeStyle: none58 });59 expect(sprite.isVisible()).toBe(true);60 sprite.setAttributes({61 strokeStyle: rgba_none62 });63 expect(sprite.isVisible()).toBe(true);64 sprite.setAttributes({65 fillStyle: none,66 strokeStyle: none67 });68 expect(sprite.isVisible()).toBe(false);69 sprite.setAttributes({70 fillStyle: none,71 strokeStyle: rgba_none72 });73 expect(sprite.isVisible()).toBe(false);74 sprite.setAttributes({75 fillStyle: rgba_none,76 strokeStyle: none77 });78 expect(sprite.isVisible()).toBe(false);79 sprite.setAttributes({80 fillStyle: rgba_none,81 strokeStyle: rgba_none82 });83 expect(sprite.isVisible()).toBe(false);84 });85 it("should return false if the globalAlpha attribute is zero", function () {86 sprite.setAttributes({87 globalAlpha: 088 });89 expect(sprite.isVisible()).toBe(false);90 });91 it("should return false if both fill and stroke are completely transparent, true otherwise", function () {92 sprite.setAttributes({93 fillOpacity: 0,94 strokeOpacity: 095 });96 expect(sprite.isVisible()).toBe(false);97 sprite.setAttributes({98 fillOpacity: 0,99 strokeOpacity: 0.01100 });101 expect(sprite.isVisible()).toBe(true);102 sprite.setAttributes({103 fillOpacity: 0.01,104 strokeOpacity: 0105 });106 expect(sprite.isVisible()).toBe(true);107 });108 });109 describe("hitTest", function () {110 var sprite, surface, container;111 beforeEach(function () {112 container = new Ext.draw.Container({113 renderTo: Ext.getBody()114 });115 surface = new Ext.draw.Surface();116 sprite = new Ext.draw.sprite.Circle({117 hidden: false,118 globalAlpha: 1,119 fillOpacity: 1,120 strokeOpacity: 1,...

Full Screen

Full Screen

tags.js

Source:tags.js Github

copy

Full Screen

1//import shop from '../../store'2//import Tools from '../../common/Tools'3// initial state4const state = () => ({5 tags: [6 {7 "name": "Administrators",8 "description": "<fjpqdjpojdpjdpojdposdpk,pck,pqpijdpiqjzpifdqjzpodjkpodjzqoidjjdqpijdpiqndpijzqpoidjqpzoijd",9 "isVisible": false,10 "path": {11 "GET": {12 "findOne": "/administrators/{administratorID}",13 "findAll": "/administrators"14 },15 "POST": "",16 "UPDATE": "",17 "CREATE": "",18 "DELETE": ""19 }20 },21 {22 "name": "Administrator Roles",23 "isVisible": false24 },25 {26 "name": "Agent Deployment Scripts",27 "isVisible": false28 },29 {30 "name": "Agent Version Controls",31 "isVisible": false32 },33 {34 "name": "Agent Version Control Profiles",35 "isVisible": false36 },37 {38 "name": "Anti-Malware Configurations",39 "isVisible": false40 },41 {42 "name": "API Keys",43 "isVisible": false44 },45 {46 "name": "API Usage",47 "isVisible": false48 },49 {50 "name": "Global Rules",51 "isVisible": false52 },53 {54 "name": "Application Types",55 "isVisible": false56 },57 {58 "name": "AWS Connectors",59 "isVisible": false60 },61 {62 "name": "AWS Connector Settings",63 "isVisible": false64 },65 {66 "name": "Certificates",67 "isVisible": false68 },69 {70 "name": "Computers",71 "isVisible": false72 },73 {74 "name": "Computer Firewall Rule Assignments",75 "isVisible": false76 },77 {78 "name": "Computer Firewall Rule Details",79 "isVisible": false80 },81 {82 "name": "Computer Groups",83 "isVisible": false84 },85 {86 "name": "Computer Integrity Monitoring Rule Assignments & Recommendations",87 "isVisible": false88 },89 {90 "name": "Computer Integrity Monitoring Rule Details",91 "isVisible": false92 },93 {94 "name": "Computer Intrusion Prevention Rule Assignments & Recommendations",95 "isVisible": false96 },97 {98 "name": "Computer Intrusion Prevention Application Type Details",99 "isVisible": false100 },101 {102 "name": "Computer Intrusion Prevention Rule Details",103 "isVisible": false104 },105 {106 "name": "Computer Log Inspection Rule Assignments & Recommendations",107 "isVisible": false108 },109 {110 "name": "Computer Log Inspection Rule Details",111 "isVisible": false112 },113 {114 "name": "Contacts",115 "isVisible": false116 },117 {118 "name": "Directory Lists",119 "isVisible": false120 },121 {122 "name": "Event Based Tasks",123 "isVisible": false124 },125 {126 "name": "File Extension Lists",127 "isVisible": false128 },129 {130 "name": "File Lists",131 "isVisible": false132 },133 {134 "name": "Firewall Rules",135 "isVisible": false136 },137 {138 "name": "GCP Connector Actions",139 "isVisible": false140 },141 {142 "name": "GCP Connectors",143 "isVisible": false144 },145 {146 "name": "Integrity Monitoring Rules",147 "isVisible": false148 },149 {150 "name": "Interface Types",151 "isVisible": false152 },153 {154 "name": "Intrusion Prevention Rules",155 "isVisible": false156 },157 {158 "name": "IP Lists",159 "isVisible": false160 },161 {162 "name": "Log Inspection Rules"163 },164 {165 "name": "MAC Lists"166 },167 {168 "name": "Policies"169 },170 {171 "name": "Policy Firewall Rule Assignments"172 },173 {174 "name": "Policy Firewall Rule Details"175 },176 {177 "name": "Policy Integrity Monitoring Rule Assignments & Recommendations"178 },179 {180 "name": "Policy Integrity Monitoring Rule Details"181 },182 {183 "name": "Policy Intrusion Prevention Rule Assignments & Recommendations"184 },185 {186 "name": "Policy Intrusion Prevention Application Type Details"187 },188 {189 "name": "Policy Intrusion Prevention Rule Details"190 },191 {192 "name": "Policy Log Inspection Rule Assignments & Recommendations"193 },194 {195 "name": "Policy Log Inspection Rule Details"196 },197 {198 "name": "Port Lists"199 },200 {201 "name": "Report Templates"202 },203 {204 "name": "Contexts"205 },206 {207 "name": "Rulesets"208 },209 {210 "name": "Schedules"211 },212 {213 "name": "Scheduled Tasks"214 },215 {216 "name": "Scripts"217 },218 {219 "name": "System Settings"220 },221 {222 "name": "Software Changes"223 },224 {225 "name": "Software Inventories"226 },227 {228 "name": "Stateful Configurations"229 },230 {231 "name": "Tenants"232 }233 ],234})235// getters236const getters = {237 tags: (state) => state.tags,238}239// mutations240const mutations = {241 setLoading (state, isLoading) {242 state.loading = isLoading243 }244}245// actions246const actions = {247 setLoading ({ commit }, payload) {248 commit('setLoading', payload)249 }250}251export default {252 namespaced: true,253 state,254 getters,255 actions,256 mutations...

Full Screen

Full Screen

ds-validation.js

Source:ds-validation.js Github

copy

Full Screen

1$(document).ready(function(){2 setVisibleDSTypeCarbon(false);3 setVisibleDSTypeMongo(false);4 setVisibleDSTypeCSV(false);5 setVisibleDSTypeRDBMS(true);6 7 //--- Start of Data Source Type ---//8 $("#ds-dstype-select").change(function() {9 if ($(this).val() == "carbon_ds") {10 setVisibleDSTypeRDBMS(false);11 setVisibleDSTypeMongo(false);12 setVisibleDSTypeCSV(false);13 setVisibleDSTypeCarbon(true);14 15 } else if ($(this).val() == "rdbms_ds") {16 setVisibleDSTypeMongo(false);17 setVisibleDSTypeCarbon(false);18 setVisibleDSTypeCSV(false);19 setVisibleDSTypeRDBMS(true);20 21 } else if ($(this).val() == "mongodb_ds") {22 setVisibleDSTypeRDBMS(false);23 setVisibleDSTypeCarbon(false);24 setVisibleDSTypeCSV(false);25 setVisibleDSTypeMongo(true);26 27 } else if ($(this).val() == "csv") {28 setVisibleDSTypeRDBMS(false);29 setVisibleDSTypeCarbon(false);30 setVisibleDSTypeMongo(false);31 setVisibleDSTypeCSV(true);32 33 }34 });35 $("#ds-dstype-select").trigger("change");36 //--- End of Data Source Type ---//37 38 //--- Start of Data Source Type 2 ---//39 $("#ds-dstype-2-select").change(function() {40 if ($(this).val() == "external_ds") {41 setVisibleDSType2Ext(true);42 setVisibleDSType2Default(false);43 } else if ($(this).val() == "default_ds") {44 setVisibleDSType2Ext(false);45 setVisibleDSType2Default(true);46 }47 });48 $("#ds-dstype-2-select").trigger("change");49 //--- End of Data Source Type 2 ---//50 51});52function setVisibleDSTypeCSV(isVisible) {53 $('#ds-csv-file-location-inputgroup').toggle(isVisible);54 $('#ds-col-separator-inputgroup').toggle(isVisible);55 $('#ds-start-row-inputgroup').toggle(isVisible);56 $('#ds-max-read-rows-inputgroup').toggle(isVisible);57 $('#ds-col-header-input').toggle(isVisible);58 $('#ds-header-row-inputgroup').toggle(isVisible);59}60function setVisibleDSTypeMongo(isVisible) {61 $('#ds-server-inputgroup').toggle(isVisible);62 $('#ds-mongo-dbname-inputgroup').toggle(isVisible);63 $('#ds-auth-method-input').toggle(isVisible);64 $('#ds-username-inputgroup').toggle(isVisible);65 $('#ds-password-formgroup').toggle(isVisible);66 $('#ds-write-concern-input').toggle(isVisible);67 $('#ds-read-pref-input').toggle(isVisible);68 $('#ds-con-timeout-inputgroup').toggle(isVisible);69 $('#ds-max-wait-inputgroup').toggle(isVisible);70 $('#ds-socket-timeout-inputgroup').toggle(isVisible);71 $('#ds-connections-inputgroup').toggle(isVisible);72 $('#ds-threads-for-mul-inputgroup').toggle(isVisible);73}74function setVisibleDSTypeRDBMS(isVisible) {75 $('#ds-db-engine-formgroup').toggle(isVisible);76 $('#ds-config-params-collapse').toggle(isVisible);77 $('#ds-dynamic-auth-collapse').toggle(isVisible);78 $('#ds-test-conn-btn-formgroup').toggle(isVisible);79 $('#ds-dstype-2-select').toggle(isVisible);80 $('#ds-test-con-collapse-group').toggle(isVisible);81 $('#ds-db-engine-select').attr('required', isVisible);82 83 if (isVisible) {84 if ($("#ds-dstype-2-select").val() == "external_ds") {85 setVisibleDSType2Ext(true);86 setVisibleDSType2Default(false);87 } else if ($("#ds-dstype-2-select").val() == "default_ds") {88 setVisibleDSType2Ext(false);89 setVisibleDSType2Default(true);90 }91 } else {92 setVisibleDSType2Ext(isVisible);93 setVisibleDSType2Default(isVisible);94 }95 96}97function setVisibleDSTypeCarbon(isVisible) {98 $('#ds-ds-name-inputgroup').toggle(isVisible);99 $('#ds-ds-name-input').attr('required', isVisible);100}101function setVisibleDSType2Ext(isVisible) {102 $('#ds-class-name-inputgroup').toggle(isVisible);103 $('#ds-class-name-input').attr('required', isVisible);104 $('#ds-ext-prop-group').toggle(isVisible);105}106function setVisibleDSType2Default(isVisible) {107 $('#ds-driver-class-inputgroup').toggle(isVisible);108 $('#ds-driver-class-input').attr('required', isVisible);109 $('#ds-url-inputgroup').toggle(isVisible);110 $('#ds-url-input').attr('required', isVisible);111 $('#ds-username-inputgroup').toggle(isVisible);112 $('#ds-password-formgroup').toggle(isVisible);...

Full Screen

Full Screen

useBlockAnimations.js

Source:useBlockAnimations.js Github

copy

Full Screen

...67 const [animation, setAnimation] = useState(undefined);68 const [isVisible, setisVisible] = useState(false);69 const { direction, animateType } = item;70 useEffect(() => {71 setisVisible(see);72 }, [see]);73 useEffect(() => {74 if (direction === 'right' && animateType === 'fade') {75 setAnimation(fadeRight(isVisible));76 } else if (direction === 'left' && animateType === 'fade') {77 setAnimation(fadeLeft(isVisible));78 } else if (direction === 'up' && animateType === 'fade') {79 setAnimation(fadeUp(isVisible));80 } else if (direction === 'down' && animateType === 'fade') {81 setAnimation(fadeDown(isVisible));82 } else if (direction === 'down' && animateType === 'expand') {83 setAnimation(expandDown(isVisible));84 } else if (direction === 'up' && animateType === 'expand') {85 setAnimation(expandUp(isVisible));...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2var assert = require('assert');3 return ghost.isVisible('#gbqfbb');4}).then(function(isVisible) {5 assert.equal(isVisible, true);6}).then(function() {7 return ghost.close();8}).catch(function(err) {9 console.log(err);10 ghost.close();11});

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2 ghost.isVisible('input[name="q"]', function(err, visible) {3 console.log('input[name="q"] is visible? ' + visible);4 ghost.exit();5 });6});7### ghostjs#isInViewport(selector, callback)8var ghost = require('ghostjs');9 ghost.isInViewport('input[name="q"]', function(err, visible) {10 console.log('input[name="q"] is visible? ' + visible);11 ghost.exit();12 });13});14### ghostjs#isDisabled(selector, callback)15var ghost = require('ghostjs');16 ghost.isDisabled('input[name="q"]', function(err, disabled) {17 console.log('input[name="q"] is disabled? ' + disabled);18 ghost.exit();19 });20});21### ghostjs#isReadOnly(selector, callback)22var ghost = require('ghostjs');23 ghost.isReadOnly('input[name="q"]', function(err, readOnly) {24 console.log('input[name="q"] is read only? ' + readOnly);25 ghost.exit();26 });27});28### ghostjs#isEditable(selector, callback)29var ghost = require('ghostjs');30 ghost.isEditable('input[name="q"]', function(err, editable) {31 console.log('input[name="q"] is editable? ' + editable);32 ghost.exit();33 });34});35### ghostjs#isExisting(selector, callback)

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2.then(function() {3 return ghost.isVisible('input[name="q"]');4})5.then(function(isVisible) {6 if(isVisible) {7 console.log('Element is visible');8 } else {9 console.log('Element is not visible');10 }11})12.then(function() {13 return ghost.close();14});

Full Screen

Using AI Code Generation

copy

Full Screen

1const ghost = require('ghostjs');2const assert = require('assert');3(async () => {4 let visible = await ghost.isVisible('#hplogo');5 assert(visible);6 visible = await ghost.isVisible('#notthere');7 assert(!visible);8 await ghost.close();9})();10const ghost = require('ghostjs');11const assert = require('assert');12(async () => {13 await ghost.waitForElement('#hplogo');14 let visible = await ghost.isVisible('#hplogo');15 assert(visible);16 await ghost.close();17})();18const ghost = require('ghostjs');19const assert = require('assert');20(async () => {21 await ghost.waitForVisible('#hplogo');22 let visible = await ghost.isVisible('#hplogo');23 assert(visible);24 await ghost.close();25})();26const ghost = require('ghostjs');27const assert = require('assert');28(async () => {29 await ghost.waitForInvisible('#notthere');30 let visible = await ghost.isVisible('#notthere');31 assert(!visible);32 await ghost.close();33})();34const ghost = require('ghostjs');35const assert = require('assert');

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2 .type('input[name=q]', 'Ghostjs')3 .click('input[name=btnG]')4 .isVisible('div#resultStats', function(err, visible) {5 console.log('resultStats div is visible: ' + visible);6 })7 .end();8### ghost.open(url, [callback])9});10### ghost.open(url, [options], [callback])11});12### ghost.open(url, [options], [settings], [callback])13});14### ghost.end([callback])15ghost.end(function(err) {16});17### ghost.end([options], [callback])18ghost.end({exit: false}, function(err) {19});20ghost.page.onConsoleMessage = function(msg) {21 console.log(msg);22};23### ghost.injectJs(path, [callback])24ghost.injectJs('jquery.js', function(err) {25});26### ghost.evaluate(fn, [callback])27ghost.evaluate(function

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2 ghost.isVisible('#gbqfq', function(err, visible) {3 console.log('search input is visible: ', visible);4 });5});6var ghost = require('ghostjs');7 ghost.isNotVisible('#gbqfq', function(err, visible) {8 console.log('search input is not visible: ', visible);9 });10});11var ghost = require('ghostjs');12 ghost.isNotVisible('#gbqfq', function(err, visible) {13 console.log('search input is not visible: ', visible);14 });15});16var ghost = require('ghostjs');17 ghost.isNotVisible('#gbqfq', function(err, visible) {18 console.log('search input is not visible: ', visible);19 });20});21var ghost = require('ghostjs');22 ghost.isNotVisible('#gbqfq', function(err, visible) {23 console.log('search input is not visible: ', visible);24 });25});26var ghost = require('ghostjs');27 ghost.isNotVisible('#gbqfq', function(err, visible) {28 console.log('search input is not visible: ', visible);29 });30});31var ghost = require('ghostjs');32 ghost.isNotVisible('#gbqfq', function(err, visible) {33 console.log('search input is not visible: ', visible);34 });35});36var ghost = require('ghostjs');37 ghost.isNotVisible('#gbqfq', function(err, visible) {38 console.log('search input is not visible: ', visible);39 });40});

Full Screen

Using AI Code Generation

copy

Full Screen

1var ghost = require('ghostjs');2 ghost.isVisible('#gbqfbb', function(error, visible) {3 });4});5ghost.exit();6var ghost = require('ghostjs');7 ghost.isHidden('#gbqfbb', function(error, hidden) {8 });9});10ghost.exit();11var ghost = require('ghostjs');12 ghost.isVisible('#gbqfbb', function(error, visible) {13 });14});15ghost.exit();16var ghost = require('ghostjs');17 ghost.isHidden('#gbqfbb', function(error, hidden) {18 });19});20ghost.exit();21var ghost = require('ghostjs');22 ghost.isVisible('#gbqfbb', function(error, visible) {23 });24});25ghost.exit();26var ghost = require('ghostjs');27 ghost.isHidden('#gbqfbb', function(error, hidden) {28 });29});30ghost.exit();31var ghost = require('ghostjs');32 ghost.isVisible('#gbqfbb', function(error, visible) {33 });34});35ghost.exit();36var ghost = require('ghostjs');37 ghost.isHidden('#gbqfbb', function(error, hidden) {38 console.log(hidden

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run ghostjs 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