Blame | Last modification | View Log | Download
Feature: Webserver handlingThe Domoticz webserver should be able to handle different content types both compressed and uncompressedand should respect several headers as provided by the users BrowserBackground:Given Domoticz is runningAnd accessible on port 8080Scenario: Get uncompressed source in compressed formGiven I am a normal Domoticz userAnd my browser supports receiving compressed dataWhen I request the URI "/"Then the HTTP-return code should be "200"And the HTTP-header "Content-Type" should contain "text/html;charset=UTF-8"And the HTTP-header "Content-Encoding" should contain "gzip"Scenario: Get uncompressed source in uncompressed formGiven I am a normal Domoticz userAnd my browser does not supports receiving compressed dataWhen I request the URI "/index.html"Then the HTTP-return code should be "200"And the HTTP-header "Content-Type" should contain "text/html;charset=UTF-8"And the HTTP-header "Content-Encoding" should be absentScenario: Get compressed source in uncompressed formGiven I am a normal Domoticz userAnd my browser does not supports receiving compressed dataWhen I request the URI "/test/test1.html"Then the HTTP-return code should be "200"And I should receive the content saying "It Works!"And the HTTP-header "Content-Type" should contain "text/html;charset=UTF-8"And the HTTP-header "Content-Encoding" should be absentScenario: Get compressed source in compressed formGiven I am a normal Domoticz userAnd my browser supports receiving compressed dataWhen I request the URI "/test/test1.html"Then the HTTP-return code should be "200"And I should receive the content saying "It Works!"And the HTTP-header "Content-Type" should contain "text/html;charset=UTF-8"And the HTTP-header "Content-Encoding" should contain "gzip"Scenario: Get regular file without extensionGiven I am a normal Domoticz userWhen I request the URI "/test/test2"Then the HTTP-return code should be "200"And I should receive the content saying "A regular file without extension!"And the HTTP-header "Content-Length" should contain "34"And the HTTP-header "Content-Type" should be absentScenario: Validate standard Not Found replyGiven I am a normal Domoticz userWhen I request the URI "/idonotexist.png"Then the HTTP-return code should be "404"And the HTTP-header "Content-Type" should contain "text/html;charset=UTF-8"