How to use setChecked method in taiko

Best JavaScript code snippet using taiko

CheckItem.js

Source:CheckItem.js Github

copy

Full Screen

...139 describe("setChecked", function() {140 141 it("should set the checked state on the component", function(){142 makeItem();143 c.setChecked(true);144 expect(c.checked).toBe(true);145 146 c.setChecked(false);147 expect(c.checked).toBe(false);148 });149 150 describe("aria-checked attribute", function() {151 beforeEach(function() {152 makeItem();153 menu.show();154 c.setChecked(true);155 });156 157 it("should set aria-checked attribute", function() {158 expectAria('aria-checked', 'true');159 });160 161 it("should reset aria-checked attribute", function() {162 c.setChecked(false);163 164 expectAria('aria-checked', 'false');165 });166 });167 168 describe("element classes", function(){169 it("should add the checkedCls and remove uncheckedCls when checking", function(){170 makeItem();171 c.setChecked(true);172 expect(c.el.hasCls(c.checkedCls)).toBe(true);173 expect(c.el.hasCls(c.uncheckedCls)).toBe(false);174 }); 175 176 it("should add the uncheckedCls and remove checkedCls when unchecking", function(){177 makeItem({178 checked: true179 });180 c.setChecked(false);181 expect(c.el.hasCls(c.uncheckedCls)).toBe(true);182 expect(c.el.hasCls(c.checkedCls)).toBe(false);183 }); 184 });185 186 describe("events", function() {187 describe("no state change", function() {188 it("should not fire any events setting checked: false when not checked", function() {189 var called = false;190 makeItem();191 c.on('beforecheckchange', function(){192 called = true;193 });194 c.setChecked(false);195 expect(called).toBe(false); 196 }); 197 198 it("should not fire any events setting checked: true when checked", function() {199 var called = false;200 makeItem({201 checked: true202 });203 c.on('beforecheckchange', function(){204 called = true;205 });206 c.setChecked(true);207 expect(called).toBe(false);208 }); 209 }); 210 211 describe("supressEvents", function(){212 it("should not fire beforecheckchange", function(){213 var called = false;214 makeItem();215 c.on('beforecheckchange', function(){216 called = true;217 });218 c.setChecked(true, true);219 expect(called).toBe(false); 220 }); 221 222 it("should not fire checkchange", function(){223 var called = false;224 makeItem();225 c.on('checkchange', function(){226 called = true;227 });228 c.setChecked(true, true);229 expect(called).toBe(false); 230 }); 231 232 it("should not trigger a checkHandler", function(){233 var called = false;234 makeItem({235 checkHandler: function(){236 called = true;237 }238 });239 c.setChecked(true, true);240 expect(called).toBe(false); 241 })242 });243 244 describe("veto", function(){245 it("should not trigger a change if beforecheckchange returns false", function(){246 makeItem();247 c.on('beforecheckchange', function(){248 return false;249 });250 c.setChecked(true);251 expect(c.checked).toBe(false);252 })253 });254 255 describe("params", function(){256 it("should fire beforecheckchange with the item and the new checked state", function(){257 var comp, state;258 makeItem();259 c.on('beforecheckchange', function(arg1, arg2){260 comp = arg1;261 state = arg2;262 });263 c.setChecked(true);264 expect(comp).toBe(c);265 expect(state).toBe(true);266 }); 267 268 it("should fire checkchange with the item and the new checked state", function(){269 var comp, state;270 makeItem();271 c.on('checkchange', function(arg1, arg2){272 comp = arg1;273 state = arg2;274 });275 c.setChecked(true);276 expect(comp).toBe(c);277 expect(state).toBe(true);278 });279 280 it("should trigger checkHandler with the item and the new checked state", function(){281 var comp, state;282 makeItem({283 checkHandler: function(arg1, arg2){284 comp = arg1;285 state = arg2;286 }287 });288 c.setChecked(true);289 expect(comp).toBe(c);290 expect(state).toBe(true);291 });292 293 describe("checkHandler scope", function(){294 it("should default the scope to the component", function(){295 var scope;296 makeItem({297 checkHandler: function(){298 scope = this;299 }300 });301 c.setChecked(true);302 expect(scope).toBe(c);303 });304 305 it("should use a passed scope", function(){306 var o = {}, 307 scope;308 309 makeItem({310 scope: o,311 checkHandler: function(){312 scope = this;313 }314 });315 c.setChecked(true);316 expect(scope).toBe(o);317 });318 it("should be able to resolve to a ViewController", function(){319 makeItem({320 checkHandler: 'doFoo'321 });322 var ctrl = new Ext.app.ViewController({323 doFoo: function(){324 return true;325 }326 });327 var checkSpy = spyOn(ctrl, "doFoo");328 var ct = new Ext.container.Container({329 renderTo: Ext.getBody(),330 controller: ctrl,331 items: c332 });333 c.setChecked(true);334 expect(checkSpy).toHaveBeenCalled();335 ct.destroy();336 checkSpy = null;337 });338 });339 });340 });341 });342 describe("handler", function(){343 it("should default the scope to the component", function(){344 var scope;345 makeItem({346 handler: function(){347 scope = this;...

Full Screen

Full Screen

Tela_Avaliacao_Praiano.js

Source:Tela_Avaliacao_Praiano.js Github

copy

Full Screen

...13 14 <RadioButton15 value="first"16 status={ checked === 'first' ? 'checked' : 'unchecked' }17 onPress={() => setChecked('first')}18 />19 <Text>Sim</Text>20 <RadioButton21 value="second"22 status={ checked === 'second' ? 'checked' : 'unchecked' }23 onPress={() => setChecked('second')}24 />25 <Text>Não</Text>26 27 </View>28 29 <View style={styles.ViewBt2}>30 <View style={{marginHorizontal:10}}>31 <Button 32 title="Enviar"33 onPress={() => alert('Avaliação salva!!')}34 />35 </View>36 <View>37 <Button 38 title="Próxima"39 onPress={() => navigation.navigate('Pergunta 2')}40 />41 </View>42 </View>43 </View>44 );45 }46 function Pergunta_2({ navigation }) {47 const [checked, setChecked] = React.useState('');48 return (49 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>50 <Text style={styles.txt}>Qual o nível de higiene do estabelecimento?</Text>51 <View style={styles.ViewBt}>52 <RadioButton53 value="first"54 status={ checked === 'first' ? 'checked' : 'unchecked' }55 onPress={() => setChecked('first')}56 />57 <Text style={{padding:8}} >2</Text>58 <RadioButton59 value="second"60 status={ checked === 'second' ? 'checked' : 'unchecked' }61 onPress={() => setChecked('second')}62 />63 <Text style={{padding:8}}>4</Text>64 <RadioButton65 value="tree"66 status={ checked === 'tree' ? 'checked' : 'unchecked' }67 onPress={() => setChecked('tree')}68 />69 <Text style={{padding:8}}>6</Text>70 <RadioButton71 value="four"72 status={ checked === 'four' ? 'checked' : 'unchecked' }73 onPress={() => setChecked('four')}74 />75 <Text style={{padding:8}}>8</Text>76 <RadioButton77 value="five"78 status={ checked === 'five' ? 'checked' : 'unchecked' }79 onPress={() => setChecked('five')}80 />81 <Text style={{padding:8}}>10</Text>82 83 </View>84 <View style={styles.ViewBt2}>85 <View style={{marginHorizontal:10}}>86 <Button 87 title="Enviar"88 onPress={() => alert('Avaliação salva!')}89 />90 </View>91 <Button 92 title="Próxima"93 onPress={() => navigation.navigate('Pergunta 3')}94 />95 </View>96 </View>97 );98 }99 function Pergunta_3 ({ navigation }) {100 const [checked, setChecked] = React.useState('');101 return (102 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 103 <Text style={styles.txt}>O estabelecimento mantém lixeiras para uso?</Text>104 <View style={styles.check}>105 106 <RadioButton107 value="first"108 status={ checked === 'first' ? 'checked' : 'unchecked' }109 onPress={() => setChecked('first')}110 />111 <Text>Sim</Text>112 <RadioButton113 value="second"114 status={ checked === 'second' ? 'checked' : 'unchecked' }115 onPress={() => setChecked('second')}116 />117 <Text>Não</Text>118 </View>119 <View style={styles.ViewBt2}>120 <View style={{marginHorizontal:10}}>121 <Button 122 title="Enviar"123 onPress={() => alert('Avaliação salva!')}124 />125 </View>126 <Button 127 title="Próxima"128 onPress={() => navigation.navigate('Pergunta 4')}129 />130 </View>131 </View>132 );133 }134 function Pergunta_4 ({ navigation }) {135 const [checked, setChecked] = React.useState('');136 return (137 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 138 <Text style={styles.txt}>A quantidade de lixeiras disponíveis é suficiente para uso?</Text>139 <View style={styles.check}>140 <RadioButton141 value="first"142 status={ checked === 'first' ? 'checked' : 'unchecked' }143 onPress={() => setChecked('first')}144 />145 <Text>Sim</Text>146 <RadioButton147 value="second"148 status={ checked === 'second' ? 'checked' : 'unchecked' }149 onPress={() => setChecked('second')}150 />151 <Text>Não</Text>152 </View>153 <View style={styles.ViewBt2}>154 <View style={{marginHorizontal:10}}>155 <Button 156 title="Enviar"157 onPress={() => alert('Avaliação salva!')}158 />159 </View>160 <Button 161 title="Próxima"162 onPress={() => navigation.navigate('Pergunta 5')}163 />164 </View>165 </View>166 );167 }168 function Pergunta_5 ({ navigation }) {169 const [checked, setChecked] = React.useState('');170 return (171 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>172 <Text style={styles.txt}>O estabelecimento fornece material biodegradável? Canudos, copos de papel?</Text>173 <View style={styles.check}>174 <RadioButton175 value="first"176 status={ checked === 'first' ? 'checked' : 'unchecked' }177 onPress={() => setChecked('first')}178 />179 <Text>Sim</Text>180 <RadioButton181 value="second"182 status={ checked === 'second' ? 'checked' : 'unchecked' }183 onPress={() => setChecked('second')}184 />185 <Text>Não</Text>186 </View>187 <View style={styles.ViewBt2}>188 <View style={{marginHorizontal:10}}>189 <Button 190 title="Enviar"191 onPress={() => alert('Avaliação salva!')}192 />193 </View>194 <Button 195 title="Próxima"196 onPress={() => navigation.navigate('Pergunta 6')}197 />198 </View>199 </View>200 );201 }202 function Pergunta_6 ({ navigation }) {203 const [checked, setChecked] = React.useState('');204 return (205 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 206 <Text style={styles.txt}>A limpeza da areia quanto a lixos industrializados é satisfatória?</Text>207 <View style={styles.check}>208 <RadioButton209 value="first"210 status={ checked === 'first' ? 'checked' : 'unchecked' }211 onPress={() => setChecked('first')}212 />213 <Text>Sim</Text>214 <RadioButton215 value="second"216 status={ checked === 'second' ? 'checked' : 'unchecked' }217 onPress={() => setChecked('second')}218 />219 <Text>Não</Text>220 </View>221 <View style={styles.ViewBt2}>222 <View style={{marginHorizontal:10}}>223 <Button 224 title="Enviar"225 onPress={() => alert('Avaliação salva!')}226 />227 </View>228 <Button 229 title="Próxima"230 onPress={() => navigation.navigate('Pergunta 7')}231 />232 </View>233 </View>234 );235 }236 function Pergunta_7 ({ navigation }) {237 const [checked, setChecked] = React.useState('');238 239 return (240 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> 241 <Text style={styles.txt}> O estabelecimento passou alguma informação de concientização sobre o cuidado com as vidas marinhas?</Text>242 <View style={styles.check}>243 <RadioButton244 value="first"245 status={ checked === 'first' ? 'checked' : 'unchecked' }246 onPress={() => setChecked('first')}247 />248 <Text>Sim</Text>249 <RadioButton250 value="second"251 status={ checked === 'second' ? 'checked' : 'unchecked' }252 onPress={() => setChecked('second')}253 />254 <Text>Não</Text>255 </View>256 <View style={styles.ViewBt2}>257 <View style={{marginHorizontal:10}}>258 <Button 259 title="Enviar"260 onPress={() => alert('Avaliação salva!')}261 />262 </View>263 <Button 264 title="Próxima"265 onPress={() => navigation.navigate('Pergunta 8')}266 />267 </View>268 </View>269 );270 }271 function Pergunta_8 ({ navigation }) {272 const [checked, setChecked] = React.useState('');273 return (274 <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>275 <Text style={styles.txt}>Como você avalia esta experiência na sua vida?</Text>276 277 <View style={styles.check}>278 <RadioButton279 value="first"280 status={ checked === 'first' ? 'checked' : 'unchecked' }281 onPress={() => setChecked('first')}282 />283 <Text>Sem Valor</Text>284 <RadioButton285 value="second"286 status={ checked === 'second' ? 'checked' : 'unchecked' }287 onPress={() => setChecked('second')}288 />289 <Text>Pouco Valor</Text>290 <RadioButton291 value="tree"292 status={ checked === 'tree' ? 'checked' : 'unchecked' }293 onPress={() => setChecked('tree')}294 />295 <Text>Modificadora</Text>296 </View>297 <View style={styles.ViewBt2}>298 <View style={{marginHorizontal:10}}>299 <Button 300 title="Enviar"301 onPress={() => alert('Avaliação salva!')}302 />303 </View>304 <Button 305 title="Próxima"306 onPress={() => navigation.navigate('Crítica e Sugestões')}307 />...

Full Screen

Full Screen

csvexportpanel.js

Source:csvexportpanel.js Github

copy

Full Screen

...72 },73 uncheckAllBoxes: function()74 {75 this.$.allNonUSorCanadaCheckbox.setDisabled(false);76 this.$.allNonUSorCanadaCheckbox.setChecked(false);77 this.$.allCountriesCheckbox.setDisabled(false);78 this.$.allCountriesCheckbox.setChecked(false);79 this.get("countryCheckboxNames").forEach(enyo.bind(this, function(value, index, array) {80 this.$.newBoxesCountry.setCountryCheckbox(value, false);81 }));82 this.$.incompleteDocsNoFundsCheckbox.setChecked(false);83 this.$.incompleteDocsPartialFundsCheckbox.setChecked(false);84 this.$.incompleteDocsAllFundsCheckbox.setChecked(false);85 this.$.completeDocsNoFundsCheckbox.setChecked(false);86 this.$.completeDocsPartialFundsCheckbox.setChecked(false);87 this.$.completeCheckbox.setChecked(false);88 this.$.pendingCancellationCheckbox.setChecked(false);89 this.$.cancelledCheckbox.setChecked(false);90 this.$.closedCheckbox.setChecked(false);91 this.$.newCheckbox.setChecked(false);92 this.$.allStatusesCheckbox.setChecked(false);93 this.$.allStatusesCheckbox.setDisabled(false);94 this.$.allExceptCancelledStatusesCheckbox.setChecked(false);95 this.$.allExceptCancelledStatusesCheckbox.setDisabled(false);96 },97 checkBoxesForSubscription: function(inSender, inEvent)98 {99 // If all boxes are checked100 if (101 this.$.incompleteDocsNoFundsCheckbox.getValue() === true &&102 this.$.incompleteDocsPartialFundsCheckbox.getValue() === true &&103 this.$.incompleteDocsAllFundsCheckbox.getValue() === true &&104 this.$.completeDocsNoFundsCheckbox.getValue() === true &&105 this.$.completeDocsPartialFundsCheckbox.getValue() === true &&106 this.$.completeCheckbox.getValue() === true &&107 this.$.pendingCancellationCheckbox.getValue() === true &&108 this.$.cancelledCheckbox.getValue() === true &&109 this.$.closedCheckbox.getValue() === true &&110 this.$.newCheckbox.getValue() === true)111 {112 this.$.allStatusesCheckbox.setChecked(true);113 this.$.allStatusesCheckbox.setDisabled(true);114 this.$.allExceptCancelledStatusesCheckbox.setDisabled(false);115 this.$.allExceptCancelledStatusesCheckbox.setChecked(false);116 }117 // If all boxes except cancelled and pendingCancellation are checked118 else if (119 this.$.incompleteDocsNoFundsCheckbox.getValue() === true &&120 this.$.incompleteDocsPartialFundsCheckbox.getValue() === true &&121 this.$.incompleteDocsAllFundsCheckbox.getValue() === true &&122 this.$.completeDocsNoFundsCheckbox.getValue() === true &&123 this.$.completeDocsPartialFundsCheckbox.getValue() === true &&124 this.$.completeCheckbox.getValue() === true &&125 this.$.closedCheckbox.getValue() === true &&126 this.$.newCheckbox.getValue() === true)127 {128 this.$.allExceptCancelledStatusesCheckbox.setDisabled(true);129 this.$.allExceptCancelledStatusesCheckbox.setChecked(true);130 this.$.allStatusesCheckbox.setDisabled(false);131 this.$.allStatusesCheckbox.setChecked(false);132 }133 else134 {135 this.$.allStatusesCheckbox.setChecked(false);136 this.$.allStatusesCheckbox.setDisabled(false);137 this.$.allExceptCancelledStatusesCheckbox.setDisabled(false);138 this.$.allExceptCancelledStatusesCheckbox.setChecked(false);139 }140 },141 allCheckSubscription: function(inSender, inEvent)142 {143 this.$.incompleteDocsNoFundsCheckbox.setChecked(true);144 this.$.incompleteDocsPartialFundsCheckbox.setChecked(true);145 this.$.incompleteDocsAllFundsCheckbox.setChecked(true);146 this.$.completeDocsNoFundsCheckbox.setChecked(true);147 this.$.completeDocsPartialFundsCheckbox.setChecked(true);148 this.$.completeCheckbox.setChecked(true);149 this.$.pendingCancellationCheckbox.setChecked(true);150 this.$.cancelledCheckbox.setChecked(true);151 this.$.closedCheckbox.setChecked(true);152 this.$.newCheckbox.setChecked(true);153 this.$.allStatusesCheckbox.setDisabled(true);154 this.$.allExceptCancelledStatusesCheckbox.setDisabled(false);155 this.$.allExceptCancelledStatusesCheckbox.setChecked(false);156 },157 allNonCancelledCheck: function(inSender, inEvent)158 {159 this.$.incompleteDocsNoFundsCheckbox.setChecked(true);160 this.$.incompleteDocsPartialFundsCheckbox.setChecked(true);161 this.$.incompleteDocsAllFundsCheckbox.setChecked(true);162 this.$.completeDocsNoFundsCheckbox.setChecked(true);163 this.$.completeDocsPartialFundsCheckbox.setChecked(true);164 this.$.completeCheckbox.setChecked(true);165 this.$.pendingCancellationCheckbox.setChecked(false);166 this.$.cancelledCheckbox.setChecked(false);167 this.$.closedCheckbox.setChecked(true);168 this.$.newCheckbox.setChecked(true);169 this.$.allExceptCancelledStatusesCheckbox.setDisabled(true);170 this.$.allStatusesCheckbox.setDisabled(false);171 this.$.allStatusesCheckbox.setChecked(false);172 },173 allCheckCountries: function(inSender, inEvent)174 {175 this.get("countryCheckboxNames").forEach(enyo.bind(this, function(value, index, array) {176 this.$.newBoxesCountry.setCountryCheckbox(value, true);177 }));178 this.$.allNonUSorCanadaCheckbox.setDisabled(false);179 this.$.allNonUSorCanadaCheckbox.setChecked(false);180 this.$.allCountriesCheckbox.setDisabled(true);181 this.$.allCountriesCheckbox.setChecked(true);182 },183 nonCanUSACheckCountries: function(inSender, inEvent)184 {185 this.get("countryCheckboxNames").forEach(enyo.bind(this, function(value, index, array) {186 if (value === "USA" || value === "CAN")187 {188 this.$.newBoxesCountry.setCountryCheckbox(value, false);189 }190 else191 {192 this.$.newBoxesCountry.setCountryCheckbox(value, true);193 }194 }));195 this.$.allCountriesCheckbox.setDisabled(false);196 this.$.allCountriesCheckbox.setChecked(false);197 this.$.allNonUSorCanadaCheckbox.setDisabled(true);198 this.$.allNonUSorCanadaCheckbox.setChecked(true);199 },200 handleNeitherChecked: function(inSender, inEvent)201 {202 this.$.allCountriesCheckbox.setDisabled(false);203 this.$.allCountriesCheckbox.setChecked(false);204 this.$.allNonUSorCanadaCheckbox.setDisabled(false);205 this.$.allNonUSorCanadaCheckbox.setChecked(false);206 },207 handleGenerateFromCheckBoxesCSVFile: function(inSender, inEvent)208 {209 var filteredCollection = this.get("subscriptionCollection");210 var outputForCSV = [];211 if (this.get("checkBoxArrayCountries").length < 1) { alertify.error("You must select at least one country"); return; }212 if (this.get("checkBoxArray").length < 1) { alertify.error("You must select at least one status"); return; }213 this.get("checkBoxArray").forEach(enyo.bind(this, function(item) {214 // Filter collection to return complete subscribers only.215 var results = filteredCollection.filter(enyo.bind(this, function(value, index, array){216 var Testcountry = value.get("contactInfo").addressInfo.country;217 var subInfo = value.get("subscriptionInfo");218 return subInfo.subscriptionStatus === item && this.get("checkBoxArrayCountries").indexOf(Testcountry) !== -1;219 }));...

Full Screen

Full Screen

ProductPage.js

Source:ProductPage.js Github

copy

Full Screen

...74 <div class="dropdown-content">75 <div className="painting_categories design">76 <p>Categories</p>77 <div className="h">78 <Checkbox value="abstraction" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>79 <label for="1"className="label">Abstraction</label>80 </div> 81 <div className="h">82 <Checkbox value="animals" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>83 <label for="2"className="label">Animals</label>84 </div> 85 <div className="h">86 <Checkbox value="conceptual" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>87 <label for="3"className="label">Conceptual</label>88 </div>89 <div className="h">90 <Checkbox value="landscape" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>91 <label for="4"className="label">Landscape</label>92 </div>93 <div className="h">94 <Checkbox value="nature" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>95 <label for="5"className="label">Nature</label>96 </div>97 <div className="h">98 <Checkbox value="nude" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>99 <label for="6"className="label">Nude</label>100 </div>101 <div className="h">102 <Checkbox value="potrait" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>103 <label for="7"className="label">Potrait</label>104 </div> 105 </div>106 <div className="painting_styles design">107 <p>Styles</p>108 <div className="h">109 <Checkbox value="fine art" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>110 <label for="8"className="label">Fine Art</label>111 </div>112 <div className="h">113 <Checkbox value="pop art" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>114 <label for="9"className="label">Pop Art</label>115 </div>116 <div className="h">117 <Checkbox value="realism" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>118 <label for="10"className="label">Realism</label>119 </div>120 <div className="h">121 <Checkbox value="semi abstract" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>122 <label for="11"className="label">Semi Abstract</label>123 </div>124 <div className="h">125 <Checkbox value="symbolic" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>126 <label for="12"className="label">Symbolic</label>127 </div>128 <div className="h">129 <Checkbox value="sketch" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>130 <label for="13"className="label">Sketch</label>131 </div>132 </div>133 <div className="painting_techniques design">134 <p>Techniques</p>135 <div className="h">136 <Checkbox value="oil color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>137 <label for="14"className="label">Oil Color</label>138 </div>139 <div className="h">140 <Checkbox value="acrylic color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>141 <label for="15"className="label">Acrylic Color</label>142 </div>143 <div className="h">144 <Checkbox value="pencil color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>145 <label for="16"className="label">Pencil Color</label>146 </div>147 <div className="h">148 <Checkbox value="pencil sketch" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>149 <label for="17"className="label">Pencil Sketch</label>150 </div>151 </div>152 <div className="painting_mediums design">153 <p>Mediums</p>154 <div className="h">155 <Checkbox value="canvas" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>156 <label for="18"className="label">Canvas</label>157 </div>158 <div className="h">159 <Checkbox value="paper" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>160 <label for="19"className="label">Paper</label>161 </div>162 <div className="h">163 <Checkbox value="digital" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>164 <label for="20"className="label">Digital</label>165 </div>166 <div className="h">167 <Checkbox value="print" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>168 <label for="21"className="label">Print</label>169 </div>170 </div> 171 </div>172 </div> 173 <div className="products_list">174 <div className="sort">175 <p>Sort By</p>176 <div className="dropdown">177 <select value={dropdown} onChange={(e)=>{setDropdown(e.target.value)}} onClick={dropChange}>178 <option value="default">Default</option>179 <option value="LtoH">Price(low to high)</option>180 <option value="HtoL">Price(high to low)</option>181 </select> 182 </div>183 </div>184 </div>185 </div> 186 <div className="products_list_bottom">187 <div className="filter_lists">188 <div className="painting_categories design">189 <p>Categories</p>190 <div className="h">191 <Checkbox value="abstraction" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>192 <label for="1"className="label">Abstraction</label>193 </div> 194 <div className="h">195 <Checkbox value="animals" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>196 <label for="2"className="label">Animals</label>197 </div> 198 <div className="h">199 <Checkbox value="conceptual" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>200 <label for="3"className="label">Conceptual</label>201 </div>202 <div className="h">203 <Checkbox value="landscape" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>204 <label for="4"className="label">Landscape</label>205 </div>206 <div className="h">207 <Checkbox value="nature" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>208 <label for="5"className="label">Nature</label>209 </div>210 <div className="h">211 <Checkbox value="nude" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>212 <label for="6"className="label">Nude</label>213 </div>214 <div className="h">215 <Checkbox value="potrait" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>216 <label for="7"className="label">Potrait</label>217 </div> 218 </div>219 <div className="painting_styles design">220 <p>Styles</p>221 <div className="h">222 <Checkbox value="fine art" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>223 <label for="8"className="label">Fine Art</label>224 </div>225 <div className="h">226 <Checkbox value="pop art" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>227 <label for="9"className="label">Pop Art</label>228 </div>229 <div className="h">230 <Checkbox value="realism" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>231 <label for="10"className="label">Realism</label>232 </div>233 <div className="h">234 <Checkbox value="semi abstract" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>235 <label for="11"className="label">Semi Abstract</label>236 </div>237 <div className="h">238 <Checkbox value="symbolic" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>239 <label for="12"className="label">Symbolic</label>240 </div>241 <div className="h">242 <Checkbox value="sketch" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>243 <label for="13"className="label">Sketch</label>244 </div>245 </div>246 <div className="painting_techniques design">247 <p>Techniques</p>248 <div className="h">249 <Checkbox value="oil color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>250 <label for="14"className="label">Oil Color</label>251 </div>252 <div className="h">253 <Checkbox value="acrylic color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>254 <label for="15"className="label">Acrylic Color</label>255 </div>256 <div className="h">257 <Checkbox value="pencil color" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>258 <label for="16"className="label">Pencil Color</label>259 </div>260 <div className="h">261 <Checkbox value="pencil sketch" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>262 <label for="17"className="label">Pencil Sketch</label>263 </div>264 </div>265 <div className="painting_mediums design">266 <p>Mediums</p>267 <div className="h">268 <Checkbox value="canvas" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>269 <label for="18"className="label">Canvas</label>270 </div>271 <div className="h">272 <Checkbox value="paper" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>273 <label for="19"className="label">Paper</label>274 </div>275 <div className="h">276 <Checkbox value="digital" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>277 <label for="20"className="label">Digital</label>278 </div>279 <div className="h">280 <Checkbox value="print" onClick={()=>setChecked(!checked)} onChange={(e)=>addToFilter(e)}/>281 <label for="21"className="label">Print</label>282 </div>283 </div>284 </div> 285 <div className="products_listing">286 <div className="product_list">287 {dropdown.includes("HtoL") || checked ? 288 dropHtoL.map((product) => (289 <Product290 id={product.id}291 title={product.title}292 image={product.image}293 price={product.price} 294 info={product.info}...

Full Screen

Full Screen

StepTwo.js

Source:StepTwo.js Github

copy

Full Screen

...39 </View>40 <CheckBox41 title={t('ASMA')}42 checked={data.clinico_asma}43 onPress={() => setChecked('clinico_asma')}44 />45 <CheckBox46 title={t('HIPERTENSÃO ARTERIAL')}47 checked={data.clinico_cardiovascular}48 onPress={() => setChecked('clinico_cardiovascular')}49 />50 <CheckBox51 title={t('DPOC (ENFISEMA)')}52 checked={data.clinico_dpoc_enfisema}53 onPress={() => setChecked('clinico_dpoc_enfisema')}54 />55 <CheckBox56 title={t('ALTERAÇÃO COLESTEROL/TRIGLICÉRIDES')}57 checked={data.clinico_alteracao_colesterol}58 onPress={() => setChecked('clinico_alteracao_colesterol')}59 />60 <CheckBox61 title={t('DIABETES')}62 checked={data.morbidade_diabetes}63 onPress={() => setChecked('morbidade_diabetes')}64 />65 <CheckBox66 title={t('DOENÇAS HEPÁTICAS')}67 checked={data.clinico_doencas_hepaticas}68 onPress={() => setChecked('clinico_doencas_hepaticas')}69 />70 {data.clinico_doencas_hepaticas_qual && (71 <TextInput72 label={t('Qual')}73 style={{ width: 200 }}74 mode="outlined"75 autoCapitalize="none"76 error=""77 onChangeText={(text) =>78 setInput('clinico_doencas_hepaticas_qual', text)79 }80 value={data.clinico_doencas_hepaticas_qual}81 />82 )}83 <CheckBox84 title={t('NEOPLASIA / CÂNCER')}85 checked={data.clinico_neoplasia_cancer}86 onPress={() => setChecked('clinico_neoplasia_cancer')}87 />88 {data.clinico_neoplasia_cancer_qual && (89 <TextInput90 label={t('Qual')}91 style={{ width: 200 }}92 mode="outlined"93 autoCapitalize="none"94 error=""95 onChangeText={(text) =>96 setInput('clinico_neoplasia_cancer_qual', text)97 }98 value={data.clinico_neoplasia_cancer_qual}99 />100 )}101 <CheckBox102 title={t('OBESIDADE')}103 checked={data.clinico_obesidade}104 onPress={() => setChecked('clinico_obesidade')}105 />106 <CheckBox107 title={t('OUTROS')}108 checked={data.clinico_outros}109 onPress={() => setChecked('clinico_outros')}110 />111 {data.clinico_outros && (112 <TextInput113 label={t('Qual')}114 style={{ width: 200 }}115 mode="outlined"116 autoCapitalize="none"117 error=""118 onChangeText={(text) => setInput('clinico_outros_observacao', text)}119 value={data.clinico_outros_observacao}120 />121 )}122 <CheckBox123 title={t('INSUFICIÊNCIA RENAL')}124 checked={data.clinico_insuficiencia_renal}125 onPress={() => setChecked('clinico_insuficiencia_renal')}126 />127 <CheckBox128 title={t('DOENÇAS REUMATOLÓGICAS')}129 checked={data.clinico_doencas_reumatologicas}130 onPress={() => setChecked('clinico_doencas_reumatologicas')}131 />132 {data.clinico_doencas_reumatologicas_qual && (133 <TextInput134 label={t('Qual')}135 style={{ width: 200 }}136 mode="outlined"137 autoCapitalize="none"138 error=""139 onChangeText={(text) =>140 setInput('clinico_doencas_reumatologicas_qual', text)141 }142 value={data.clinico_doencas_reumatologicas_qual}143 />144 )}145 <CheckBox146 title={t('RINITE')}147 checked={data.clinico_rinite}148 onPress={() => setChecked('clinico_rinite')}149 />150 <CheckBox151 title={t('APNEIA DO SONO')}152 checked={data.clinico_apneia_do_sone}153 onPress={() => setChecked('clinico_apneia_do_sone')}154 />155 </View>156 );157};158const RenderES = ({ data, setChecked, setInput }) => {159 const { t, i18n } = useTranslation();160 return (161 <View>162 <View163 style={{164 marginLeft: 5,165 marginTop: 15,166 flexDirection: 'row',167 flexWrap: 'wrap',168 }}169 >170 <Text style={{ fontSize: 17 }}>{t('Selecione as ')}</Text>171 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>172 {t('doenças associadas')}173 </Text>174 </View>175 <CheckBox176 title={t('APNEIA DO SONO')}177 checked={data.clinico_apneia_do_sone}178 onPress={() => setChecked('clinico_apneia_do_sone')}179 />180 <CheckBox181 title={t('ASMA')}182 checked={data.clinico_asma}183 onPress={() => setChecked('clinico_asma')}184 />185 <CheckBox186 title={t('ALTERAÇÃO COLESTEROL/TRIGLICÉRIDES')}187 checked={data.clinico_alteracao_colesterol}188 onPress={() => setChecked('clinico_alteracao_colesterol')}189 />190 <CheckBox191 title={t('DIABETES')}192 checked={data.morbidade_diabetes}193 onPress={() => setChecked('morbidade_diabetes')}194 />195 <CheckBox196 title={t('DPOC (ENFISEMA)')}197 checked={data.clinico_dpoc_enfisema}198 onPress={() => setChecked('clinico_dpoc_enfisema')}199 />200 <CheckBox201 title={t('DOENÇAS HEPÁTICAS')}202 checked={data.clinico_doencas_hepaticas}203 onPress={() => setChecked('clinico_doencas_hepaticas')}204 />205 {data.clinico_doencas_hepaticas_qual && (206 <TextInput207 label={t('Qual')}208 style={{ width: 200 }}209 mode="outlined"210 autoCapitalize="none"211 error=""212 onChangeText={(text) =>213 setInput('clinico_doencas_hepaticas_qual', text)214 }215 value={data.clinico_doencas_hepaticas_qual}216 />217 )}218 <CheckBox219 title={t('DOENÇAS REUMATOLÓGICAS')}220 checked={data.clinico_doencas_reumatologicas}221 onPress={() => setChecked('clinico_doencas_reumatologicas')}222 />223 {data.clinico_doencas_reumatologicas_qual && (224 <TextInput225 label={t('Qual')}226 style={{ width: 200 }}227 mode="outlined"228 autoCapitalize="none"229 error=""230 onChangeText={(text) =>231 setInput('clinico_doencas_reumatologicas_qual', text)232 }233 value={data.clinico_doencas_reumatologicas_qual}234 />235 )}236 <CheckBox237 title={t('HIPERTENSÃO ARTERIAL')}238 checked={data.clinico_cardiovascular}239 onPress={() => setChecked('clinico_cardiovascular')}240 />241 <CheckBox242 title={t('INSUFICIÊNCIA RENAL')}243 checked={data.clinico_insuficiencia_renal}244 onPress={() => setChecked('clinico_insuficiencia_renal')}245 />246 <CheckBox247 title={t('NEOPLASIA / CÂNCER')}248 checked={data.clinico_neoplasia_cancer}249 onPress={() => setChecked('clinico_neoplasia_cancer')}250 />251 {data.clinico_neoplasia_cancer_qual && (252 <TextInput253 label={t('Qual')}254 style={{ width: 200 }}255 mode="outlined"256 autoCapitalize="none"257 error=""258 onChangeText={(text) =>259 setInput('clinico_neoplasia_cancer_qual', text)260 }261 value={data.clinico_neoplasia_cancer_qual}262 />263 )}264 <CheckBox265 title={t('OBESIDADE')}266 checked={data.clinico_obesidade}267 onPress={() => setChecked('clinico_obesidade')}268 />269 <CheckBox270 title={t('OUTROS')}271 checked={data.clinico_outros}272 onPress={() => setChecked('clinico_outros')}273 />274 {data.clinico_outros && (275 <TextInput276 label={t('Qual')}277 style={{ width: 200 }}278 mode="outlined"279 autoCapitalize="none"280 error=""281 onChangeText={(text) => setInput('clinico_outros_observacao', text)}282 value={data.clinico_outros_observacao}283 />284 )}285 <CheckBox286 title={t('RINITE')}287 checked={data.clinico_rinite}288 onPress={() => setChecked('clinico_rinite')}289 />290 </View>291 );292};293const RenderPT = ({ data, setChecked, setInput }) => {294 const { t, i18n } = useTranslation();295 return (296 <View>297 <View298 style={{299 marginLeft: 5,300 marginTop: 15,301 flexDirection: 'row',302 flexWrap: 'wrap',303 }}304 >305 <Text style={{ fontSize: 17 }}>{t('Selecione as ')}</Text>306 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>307 {t('doenças associadas')}308 </Text>309 </View>310 <CheckBox311 title={t('ALTERAÇÃO COLESTEROL/TRIGLICÉRIDES')}312 checked={data.clinico_alteracao_colesterol}313 onPress={() => setChecked('clinico_alteracao_colesterol')}314 />315 <CheckBox316 title={t('APNEIA DO SONO')}317 checked={data.clinico_apneia_do_sone}318 onPress={() => setChecked('clinico_apneia_do_sone')}319 />320 <CheckBox321 title={t('ASMA')}322 checked={data.clinico_asma}323 onPress={() => setChecked('clinico_asma')}324 />325 <CheckBox326 title={t('DIABETES')}327 checked={data.morbidade_diabetes}328 onPress={() => setChecked('morbidade_diabetes')}329 />330 <CheckBox331 title={t('DOENÇAS HEPÁTICAS')}332 checked={data.clinico_doencas_hepaticas}333 onPress={() => setChecked('clinico_doencas_hepaticas')}334 />335 {data.clinico_doencas_hepaticas_qual && (336 <TextInput337 label={t('Qual')}338 style={{ width: 200 }}339 mode="outlined"340 autoCapitalize="none"341 error=""342 onChangeText={(text) =>343 setInput('clinico_doencas_hepaticas_qual', text)344 }345 value={data.clinico_doencas_hepaticas_qual}346 />347 )}348 <CheckBox349 title={t('DOENÇAS REUMATOLÓGICAS')}350 checked={data.clinico_doencas_reumatologicas}351 onPress={() => setChecked('clinico_doencas_reumatologicas')}352 />353 {data.clinico_doencas_reumatologicas_qual && (354 <TextInput355 label={t('Qual')}356 style={{ width: 200 }}357 mode="outlined"358 autoCapitalize="none"359 error=""360 onChangeText={(text) =>361 setInput('clinico_doencas_reumatologicas_qual', text)362 }363 value={data.clinico_doencas_reumatologicas_qual}364 />365 )}366 <CheckBox367 title={t('DPOC (ENFISEMA)')}368 checked={data.clinico_dpoc_enfisema}369 onPress={() => setChecked('clinico_dpoc_enfisema')}370 />371 <CheckBox372 title={t('HIPERTENSÃO ARTERIAL')}373 checked={data.clinico_cardiovascular}374 onPress={() => setChecked('clinico_cardiovascular')}375 />376 <CheckBox377 title={t('INSUFICIÊNCIA RENAL')}378 checked={data.clinico_insuficiencia_renal}379 onPress={() => setChecked('clinico_insuficiencia_renal')}380 />381 <CheckBox382 title={t('NEOPLASIA / CÂNCER')}383 checked={data.clinico_neoplasia_cancer}384 onPress={() => setChecked('clinico_neoplasia_cancer')}385 />386 {data.clinico_neoplasia_cancer_qual && (387 <TextInput388 label={t('Qual')}389 style={{ width: 200 }}390 mode="outlined"391 autoCapitalize="none"392 error=""393 onChangeText={(text) =>394 setInput('clinico_neoplasia_cancer_qual', text)395 }396 value={data.clinico_neoplasia_cancer_qual}397 />398 )}399 <CheckBox400 title={t('OBESIDADE')}401 checked={data.clinico_obesidade}402 onPress={() => setChecked('clinico_obesidade')}403 />404 <CheckBox405 title={t('OUTROS')}406 checked={data.clinico_outros}407 onPress={() => setChecked('clinico_outros')}408 />409 {data.clinico_outros && (410 <TextInput411 label={t('Qual')}412 style={{ width: 200 }}413 mode="outlined"414 autoCapitalize="none"415 error=""416 onChangeText={(text) => setInput('clinico_outros_observacao', text)}417 value={data.clinico_outros_observacao}418 />419 )}420 <CheckBox421 title={t('RINITE')}422 checked={data.clinico_rinite}423 onPress={() => setChecked('clinico_rinite')}424 />425 </View>426 );427};...

Full Screen

Full Screen

StepOne.js

Source:StepOne.js Github

copy

Full Screen

...48 </View>49 <CheckBox50 title={t('CANSAÇO / FALTA DE AR')}51 checked={data.sintoma_cansaco_falta_de_ar}52 onPress={() => setChecked('sintoma_cansaco_falta_de_ar')}53 />54 <CheckBox55 title={t('CORIZA/CONGESTÃO NASAL')}56 checked={data.sintoma_corisa_congestao_nasal}57 onPress={() => setChecked('sintoma_corisa_congestao_nasal')}58 />59 <CheckBox60 title={t('FRAQUEZA')}61 checked={data.sintoma_adinamia_fraqueza}62 onPress={() => setChecked('sintoma_adinamia_fraqueza')}63 />64 <CheckBox65 title={t('DIARREIA')}66 checked={data.sintoma_diarreia}67 onPress={() => setChecked('sintoma_diarreia')}68 />69 <CheckBox70 title={t('DOR DE CABEÇA')}71 checked={data.sintoma_cefaleia_dor_de_cabeca}72 onPress={() => setChecked('sintoma_cefaleia_dor_de_cabeca')}73 />74 <CheckBox75 title={t('DOR NO CORPO')}76 checked={data.sintoma_dor_no_corpo}77 onPress={() => setChecked('sintoma_dor_no_corpo')}78 />79 <CheckBox80 title={t('ESCARRO')}81 checked={data.sintoma_expectoracao}82 onPress={() => setChecked('sintoma_expectoracao')}83 />84 <CheckBox85 title={t('FALTA DE APETITE')}86 checked={data.sintoma_falta_de_apetite}87 onPress={() => setChecked('sintoma_falta_de_apetite')}88 />89 <CheckBox90 title={t('FEBRE')}91 checked={data.sintoma_febre}92 onPress={() => setChecked('sintoma_febre')}93 />94 <CheckBox95 title={t('NÁUSEA/VÔMITOS')}96 checked={data.sintoma_nausea_vomitos}97 onPress={() => setChecked('sintoma_nausea_vomitos')}98 />99 <CheckBox100 title={t('TOSSE')}101 checked={data.sintoma_tosse}102 onPress={() => setChecked('sintoma_tosse')}103 />104 </View>105 );106};107const RenderEN = ({ data, setChecked, setInput }) => {108 const { t } = useTranslation();109 return (110 <View>111 <View112 style={{113 marginLeft: 5,114 marginTop: 15,115 flexDirection: 'row',116 flexWrap: 'wrap',117 }}118 >119 <Text style={{ fontSize: 17 }}>{t('Selecione os ')}</Text>120 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>{t('sinais ')}</Text>121 <Text style={{ fontSize: 17 }}>{t('e ')}</Text>122 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>123 {t('sintomas ')}124 </Text>125 <Text style={{ fontSize: 17 }}>{t('apresentados')}</Text>126 </View>127 <CheckBox128 title={t('DOR NO CORPO')}129 checked={data.sintoma_dor_no_corpo}130 onPress={() => setChecked('sintoma_dor_no_corpo')}131 />132 <CheckBox133 title={t('CORIZA/CONGESTÃO NASAL')}134 checked={data.sintoma_corisa_congestao_nasal}135 onPress={() => setChecked('sintoma_corisa_congestao_nasal')}136 />137 <CheckBox138 title={t('TOSSE')}139 checked={data.sintoma_tosse}140 onPress={() => setChecked('sintoma_tosse')}141 />142 <CheckBox143 title={t('DIARREIA')}144 checked={data.sintoma_diarreia}145 onPress={() => setChecked('sintoma_diarreia')}146 />147 <CheckBox148 title={t('FEBRE')}149 checked={data.sintoma_febre}150 onPress={() => setChecked('sintoma_febre')}151 />152 <CheckBox153 title={t('DOR DE CABEÇA')}154 checked={data.sintoma_cefaleia_dor_de_cabeca}155 onPress={() => setChecked('sintoma_cefaleia_dor_de_cabeca')}156 />157 <CheckBox158 title={t('FALTA DE APETITE')}159 checked={data.sintoma_falta_de_apetite}160 onPress={() => setChecked('sintoma_falta_de_apetite')}161 />162 <CheckBox163 title={t('NÁUSEA/VÔMITOS')}164 checked={data.sintoma_nausea_vomitos}165 onPress={() => setChecked('sintoma_nausea_vomitos')}166 />167 <CheckBox168 title={t('ESCARRO')}169 checked={data.sintoma_expectoracao}170 onPress={() => setChecked('sintoma_expectoracao')}171 />172 <CheckBox173 title={t('CANSAÇO / FALTA DE AR')}174 checked={data.sintoma_cansaco_falta_de_ar}175 onPress={() => setChecked('sintoma_cansaco_falta_de_ar')}176 />177 <CheckBox178 title={t('FRAQUEZA')}179 checked={data.sintoma_adinamia_fraqueza}180 onPress={() => setChecked('sintoma_adinamia_fraqueza')}181 />182 </View>183 );184};185const RenderPT = ({ data, setChecked, setInput }) => {186 const { t } = useTranslation();187 return (188 <View>189 <View190 style={{191 marginLeft: 5,192 marginTop: 15,193 flexDirection: 'row',194 flexWrap: 'wrap',195 }}196 >197 <Text style={{ fontSize: 17 }}>{t('Selecione os ')}</Text>198 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>{t('sinais ')}</Text>199 <Text style={{ fontSize: 17 }}>{t('e ')}</Text>200 <Text style={{ fontSize: 17, fontWeight: 'bold' }}>201 {t('sintomas ')}202 </Text>203 <Text style={{ fontSize: 17 }}>{t('apresentados')}</Text>204 </View>205 <CheckBox206 title={t('CANSAÇO / FALTA DE AR')}207 checked={data.sintoma_cansaco_falta_de_ar}208 onPress={() => setChecked('sintoma_cansaco_falta_de_ar')}209 />210 <CheckBox211 title={t('CORIZA/CONGESTÃO NASAL')}212 checked={data.sintoma_corisa_congestao_nasal}213 onPress={() => setChecked('sintoma_corisa_congestao_nasal')}214 />215 <CheckBox216 title={t('DIARREIA')}217 checked={data.sintoma_diarreia}218 onPress={() => setChecked('sintoma_diarreia')}219 />220 <CheckBox221 title={t('DOR DE CABEÇA')}222 checked={data.sintoma_cefaleia_dor_de_cabeca}223 onPress={() => setChecked('sintoma_cefaleia_dor_de_cabeca')}224 />225 <CheckBox226 title={t('DOR NO CORPO')}227 checked={data.sintoma_dor_no_corpo}228 onPress={() => setChecked('sintoma_dor_no_corpo')}229 />230 <CheckBox231 title={t('ESCARRO')}232 checked={data.sintoma_expectoracao}233 onPress={() => setChecked('sintoma_expectoracao')}234 />235 <CheckBox236 title={t('FALTA DE APETITE')}237 checked={data.sintoma_falta_de_apetite}238 onPress={() => setChecked('sintoma_falta_de_apetite')}239 />240 <CheckBox241 title={t('FEBRE')}242 checked={data.sintoma_febre}243 onPress={() => setChecked('sintoma_febre')}244 />245 <CheckBox246 title={t('FRAQUEZA')}247 checked={data.sintoma_adinamia_fraqueza}248 onPress={() => setChecked('sintoma_adinamia_fraqueza')}249 />250 <CheckBox251 title={t('NÁUSEA/VÔMITOS')}252 checked={data.sintoma_nausea_vomitos}253 onPress={() => setChecked('sintoma_nausea_vomitos')}254 />255 <CheckBox256 title={t('TOSSE')}257 checked={data.sintoma_tosse}258 onPress={() => setChecked('sintoma_tosse')}259 />260 </View>261 );262};...

Full Screen

Full Screen

tables.checkall.js

Source:tables.checkall.js Github

copy

Full Screen

1/*2* tablesaw: A set of plugins for responsive tables3* Check all Checkbox: checkbox in header cell selects all checkboxes in the same table column.4* Copyright (c) 2013 Filament Group, Inc.5* MIT License6*/7(function() {8 var pluginName = "tablesawCheckAll";9 function CheckAll(tablesaw) {10 this.tablesaw = tablesaw;11 this.$table = tablesaw.$table;12 this.attr = "data-tablesaw-checkall";13 this.checkAllSelector = "[" + this.attr + "]";14 this.forceCheckedSelector = "[" + this.attr + "-checked]";15 this.forceUncheckedSelector = "[" + this.attr + "-unchecked]";16 this.checkboxSelector = 'input[type="checkbox"]';17 this.$triggers = null;18 this.$checkboxes = null;19 if (this.$table.data(pluginName)) {20 return;21 }22 this.$table.data(pluginName, this);23 this.init();24 }25 CheckAll.prototype._filterCells = function($checkboxes) {26 return $checkboxes27 .filter(function() {28 return !$(this).closest("tr").is("[data-tablesaw-subrow],[data-tablesaw-ignorerow]");29 })30 .find(this.checkboxSelector)31 .not(this.checkAllSelector);32 };33 // With buttons you can use a scoping selector like: data-tablesaw-checkall="#my-scoped-id input[type='checkbox']"34 CheckAll.prototype.getCheckboxesForButton = function(button) {35 return this._filterCells($($(button).attr(this.attr)));36 };37 CheckAll.prototype.getCheckboxesForCheckbox = function(checkbox) {38 return this._filterCells($($(checkbox).closest("th")[0].cells));39 };40 CheckAll.prototype.init = function() {41 var self = this;42 this.$table.find(this.checkAllSelector).each(function() {43 var $trigger = $(this);44 if ($trigger.is(self.checkboxSelector)) {45 self.addCheckboxEvents(this);46 } else {47 self.addButtonEvents(this);48 }49 });50 };51 CheckAll.prototype.addButtonEvents = function(trigger) {52 var self = this;53 // Update body checkboxes when header checkbox is changed54 $(trigger).on("click", function(event) {55 event.preventDefault();56 var $checkboxes = self.getCheckboxesForButton(this);57 var allChecked = true;58 $checkboxes.each(function() {59 if (!this.checked) {60 allChecked = false;61 }62 });63 var setChecked;64 if ($(this).is(self.forceCheckedSelector)) {65 setChecked = true;66 } else if ($(this).is(self.forceUncheckedSelector)) {67 setChecked = false;68 } else {69 setChecked = allChecked ? false : true;70 }71 $checkboxes.each(function() {72 this.checked = setChecked;73 $(this).trigger("change." + pluginName);74 });75 });76 };77 CheckAll.prototype.addCheckboxEvents = function(trigger) {78 var self = this;79 // Update body checkboxes when header checkbox is changed80 $(trigger).on("change", function() {81 var setChecked = this.checked;82 self.getCheckboxesForCheckbox(this).each(function() {83 this.checked = setChecked;84 });85 });86 var $checkboxes = self.getCheckboxesForCheckbox(trigger);87 // Update header checkbox when body checkboxes are changed88 $checkboxes.on("change." + pluginName, function() {89 var checkedCount = 0;90 $checkboxes.each(function() {91 if (this.checked) {92 checkedCount++;93 }94 });95 var allSelected = checkedCount === $checkboxes.length;96 trigger.checked = allSelected;97 // only indeterminate if some are selected (not all and not none)98 trigger.indeterminate = checkedCount !== 0 && !allSelected;99 });100 };101 // on tablecreate, init102 $(document).on(Tablesaw.events.create, function(e, tablesaw) {103 new CheckAll(tablesaw);104 });...

Full Screen

Full Screen

TimeFilterHooks.js

Source:TimeFilterHooks.js Github

copy

Full Screen

1import { useState } from 'react'2export default function useHooks() {3 const [checked2020, setchecked2020] = useState(false)4 const [checked2019, setchecked2019] = useState(false)5 const [checked2018, setchecked2018] = useState(false)6 const [checked2017, setchecked2017] = useState(false)7 const [checked2016, setchecked2016] = useState(false)8 const [checked2015, setchecked2015] = useState(false)9 const [checkedJan, setcheckedJan] = useState(false)10 const [checkedFeb, setcheckedFeb] = useState(false)11 const [checkedMar, setcheckedMar] = useState(false)12 const [checkedApr, setcheckedApr] = useState(false)13 const [checkedMay, setcheckedMay] = useState(false)14 const [checkedJun, setcheckedJun] = useState(false)15 const [checkedJul, setcheckedJul] = useState(false)16 const [checkedAug, setcheckedAug] = useState(false)17 const [checkedSept, setcheckedSept] = useState(false)18 const [checkedOct, setcheckedOct] = useState(false)19 const [checkedNov, setcheckedNov] = useState(false)20 const [checkedDec, setcheckedDec] = useState(false)21 const clickHandler1 = (arg) => {22 switch (arg) {23 case 2020:24 setchecked2020(!checked2020)25 break26 case 2019:27 setchecked2019(!checked2019)28 break29 case 2018:30 setchecked2018(!checked2018)31 break32 case 2017:33 setchecked2017(!checked2017)34 break35 case 2016:36 setchecked2016(!checked2016)37 break38 case 2015:39 setchecked2015(!checked2015)40 break41 default:42 break43 }44 }45 const clickHandler2 = (arg) => {46 switch (arg) {47 case 'Jan':48 setcheckedJan(!checkedJan)49 break50 case 'Feb':51 setcheckedFeb(!checkedFeb)52 break53 case 'Mar':54 setcheckedMar(!checkedMar)55 break56 case 'Apr':57 setcheckedApr(!checkedApr)58 break59 case 'May':60 setcheckedMay(!checkedMay)61 break62 case 'Jun':63 setcheckedJun(!checkedJun)64 break65 case 'Jul':66 setcheckedJul(!checkedJul)67 break68 case 'Aug':69 setcheckedAug(!checkedAug)70 break71 case 'Sept':72 setcheckedSept(!checkedSept)73 break74 case 'Oct':75 setcheckedOct(!checkedOct)76 break77 case 'Nov':78 setcheckedNov(!checkedNov)79 break80 case 'Dec':81 setcheckedDec(!checkedDec)82 break83 default:84 break85 }86 }87 return {88 checked2020,89 checked2019,90 checked2018,91 checked2017,92 checked2016,93 checked2015,94 checkedJan,95 checkedFeb,96 checkedMar,97 checkedApr,98 checkedMay,99 checkedJun,100 checkedJul,101 checkedAug,102 checkedSept,103 checkedOct,104 checkedNov,105 checkedDec,106 clickHandler1,107 clickHandler2108 }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, setChecked, closeBrowser } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await setChecked("I have a bike", true);6 await setChecked("I have a car", true);7 await setChecked("I have a bike", false);8 } catch (e) {9 console.error(e);10 } finally {11 await closeBrowser();12 }13})();14{ Error: Evaluation failed: TypeError: Cannot read property 'checked' of null15 at ExecutionContext._evaluateInternal (/Users/xyz/taiko/node_modules/puppeteer/lib/ExecutionContext.js:122:13)16 at runMicrotasks (<anonymous>)17 at processTicksAndRejections (internal/process/task_queues.js:85:5)18 at async ExecutionContext.evaluate (/Users/xyz/taiko/node_modules/puppeteer/lib/ExecutionContext.js:48:12)19 at async setChecked (/Users/xyz/taiko/lib/taiko.js:1440:23)20at ExecutionContext._evaluateInternal (/Users/xyz/taiko/node_modules/puppeteer/lib/ExecutionContext.js:122:13)21at runMicrotasks (<anonymous>)22at processTicksAndRejections (internal/process/task_queues.js:85:5)23at async ExecutionContext.evaluate (/Users/xyz/taiko/node_modules/puppeteer/lib/ExecutionContext.js:48:12)24at async setChecked (/Users/xyz/taiko/lib/taiko.js:1440:23)' }25I am also facing the same issue. I am using taiko 1.0.0 (Chromium:

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, closeBrowser, setChecked } = require('taiko');2(async () => {3 try {4 await openBrowser({ headless: false });5 await goto("google.com");6 await setChecked("I'm Feeling Lucky", true);7 } catch (e) {8 console.error(e);9 } finally {10 await closeBrowser();11 }12})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, setChecked, closeBrowser } = require('taiko');2(async () => {3 try {4 await openBrowser({ headless: false });5 await setChecked("I have a bike", true);6 await setChecked("I have a bike", false);7 } catch (e) {8 console.error(e);9 } finally {10 await closeBrowser();11 }12})();

Full Screen

Using AI Code Generation

copy

Full Screen

1(async () => {2 try {3 await openBrowser();4 await switchToFrame("iframeResult");5 await setChecked("I have a bike", true);6 await setChecked("I have a car", true);7 await setChecked("I have a bike", false);8 await setChecked("I have a car", false);9 } catch (e) {10 console.error(e);11 } finally {12 await closeBrowser();13 }14})();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, setChecked, closeBrowser, $ } = require('taiko');2(async () => {3 try {4 await openBrowser({ headless: false });5 } catch (e) {6 console.error(e);7 } finally {8 await closeBrowser();9 }10})();11Version: 0.5.3 (Chromium: 73.0.3683.0)

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, write, closeBrowser, setChecked } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await write("checkbox", into("Search"));6 await press("Enter");7 await click("Checkboxes");8 await setChecked("input[value='2']", true);9 } catch (e) {10 console.error(e);11 } finally {12 await closeBrowser();13 }14})();15const { openBrowser, goto, write, closeBrowser, uncheck } = require('taiko');16(async () => {17 try {18 await openBrowser();19 await write("checkbox", into("Search"));20 await press("Enter");21 await click("Checkboxes");22 await uncheck("input[value='2']");23 } catch (e) {24 console.error(e);25 } finally {26 await closeBrowser();27 }28})();29const { openBrowser, goto, write, closeBrowser, isChecked } = require('taiko');30(async () => {31 try {32 await openBrowser();33 await write("checkbox", into("Search"));34 await press("Enter");35 await click("Checkboxes");36 let result = await isChecked("input[value='2']");37 console.log(result);38 } catch (e) {39 console.error(e);40 } finally {41 await closeBrowser();42 }43})();44const { openBrowser, goto, write, closeBrowser, select } = require('taiko');45(async () => {46 try {47 await openBrowser();48 await write("select", into("Search"));49 await press("Enter");50 await click("Select");51 await select("Option 2", from("select"));52 } catch (e) {53 console.error(e);54 } finally {55 await closeBrowser();56 }57})();58const { openBrowser, goto, write, closeBrowser, deselect } = require('taiko');

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, closeBrowser, setChecked, checkBox, button } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await setChecked(checkBox({ id: "vehicle1" }), false);6 await setChecked(checkBox({ id: "vehicle2" }), true);7 await setChecked(checkBox({ id: "vehicle3" }), false);8 await setChecked(checkBox({ id: "vehicle1" }), true);9 await setChecked(checkBox({ id: "vehicle2" }), false);10 await setChecked(checkBox({ id: "vehicle3" }), true);11 await click(button("Submit"));12 } catch (e) {13 console.error(e);14 } finally {15 await closeBrowser();16 }17})();18const { openBrowser, goto, closeBrowser, check, checkBox, button } = require('taiko');19(async () => {20 try {21 await openBrowser();22 await check(checkBox({ id: "vehicle1" }), false);23 await check(checkBox({ id: "vehicle2" }), true);24 await check(checkBox({ id: "vehicle3" }), false);25 await check(checkBox({ id: "vehicle1" }), true);26 await check(checkBox({ id: "vehicle2" }), false);27 await check(checkBox({ id: "vehicle3" }), true);28 await click(button("Submit"));29 } catch (e) {30 console.error(e);31 } finally {32 await closeBrowser();33 }34})();35const { openBrowser, goto, closeBrowser, uncheck, checkBox, button } = require('taiko');36(async () => {37 try {38 await openBrowser();39 await uncheck(checkBox({ id: "vehicle1" }), false);40 await uncheck(checkBox({ id: "vehicle2" }), true);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { openBrowser, goto, write, closeBrowser, setChecked, isChecked, uncheck, click } = require('taiko');2(async () => {3 try {4 await openBrowser({headless:false});5 await write("Taiko",into("Search"));6 await setChecked("I agree to the Terms and Conditions",below("Email"));7 await click("Submit",below("Email"));8 await uncheck("I agree to the Terms and Conditions",below("Email"));9 await click("Submit",below("Email"));10 await closeBrowser();11 } catch (error) {12 console.error(error);13 }14})();15openBrowser({headless:true});16const { openBrowser, goto, write, closeBrowser, setChecked, isChecked, uncheck, click } = require('taiko');17(async () => {18 try {19 await openBrowser({headless:false});20 await write("Taiko",into("Search"));21 await setChecked("I agree to the Terms and Conditions",below("Email"));22 await click("Submit",below("Email"));23 await uncheck("I agree to the Terms and Conditions",below("Email"));24 await click("Submit",below("Email"));25 await closeBrowser();26 } catch (error) {27 console.error(error);28 }29})();30openBrowser()31openBrowser({headless:true});32goto()

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 taiko 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