Ho appena iniziato con angularjs e ho bisogno di aiuto. Sto usando ngStorage per gestire l'archiviazione locale e il rapportatore alle specifiche e2e in un'app AngularJS.Test goniometro con ngStorage
describe('Test', function() {
beforeEach(function() {
browser.driver.manage().window().setSize(1280, 1024)
browser.get('http://localhost:9000/#/test/first-test')
})
it("keeps the alternative marked", function() {
element(by.id('element')).click()
browser.refresh()
expect(element(by.id('element')).isSelected()).toBe(true)
})
})
Risultato:
1) Test keeps the alternative marked
Message:
Expected false to be true.
Stacktrace:
Error: Failed expectation
at [object Object].<anonymous> (path/spec/test_spec.js:12:52)
penso che browser.refresh() cancella la memoria locale. C'è un modo per mantenerlo o un altro modo per testare la stessa cosa?
Grazie per l'avanzato.
Ho aggiunto un problema su github per ottenere informazioni più dettagliate su questo: https://github.com/gsklee/ngStorage/issues/226 – cayleyh