Skip to content

Commit

Permalink
test(server): change acceptance tests to work with the new ui
Browse files Browse the repository at this point in the history
BREAKING CHANGE: change acceptance tests to work with the new ui
  • Loading branch information
bastean committed May 22, 2024
1 parent 738bf51 commit 8df4c59
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 112 deletions.
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ go 1.22

require (
github.com/JGLTechnologies/gin-rate-limit v1.5.4
github.com/a-h/templ v0.2.663
github.com/brianvoe/gofakeit/v7 v7.0.2
github.com/a-h/templ v0.2.697
github.com/brianvoe/gofakeit/v7 v7.0.3
github.com/cucumber/godog v0.14.1
github.com/gin-contrib/secure v1.0.0
github.com/gin-contrib/secure v1.1.0
github.com/gin-contrib/sessions v1.0.1
github.com/gin-gonic/gin v1.9.1
github.com/gin-gonic/gin v1.10.0
github.com/go-playground/validator/v10 v10.20.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.6.0
github.com/playwright-community/playwright-go v0.4201.1
github.com/rabbitmq/amqp091-go v1.9.0
github.com/rabbitmq/amqp091-go v1.10.0
github.com/stretchr/testify v1.9.0
go.mongodb.org/mongo-driver v1.15.0
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.23.0
golang.org/x/text v0.15.0
)

require (
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic v1.11.7 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
Expand All @@ -38,7 +38,7 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gorilla/context v1.1.2 // indirect
Expand Down Expand Up @@ -69,10 +69,10 @@ require (
github.com/youmark/pkcs8 v0.0.0-20240424034433-3c2c7870ae76 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
google.golang.org/protobuf v1.34.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
23 changes: 23 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@ github.com/JGLTechnologies/gin-rate-limit v1.5.4 h1:1hIaXIdGM9MZFZlXgjWJLpxaK0WH
github.com/JGLTechnologies/gin-rate-limit v1.5.4/go.mod h1:mGEhNzlHEg/Tk+KH/mKylZLTfDjACnx7MVYaAlj07eU=
github.com/a-h/templ v0.2.663 h1:aa0WMm27InkYHGjimcM7us6hJ6BLhg98ZbfaiDPyjHE=
github.com/a-h/templ v0.2.663/go.mod h1:SA7mtYwVEajbIXFRh3vKdYm/4FYyLQAtPH1+KxzGPA8=
github.com/a-h/templ v0.2.697 h1:OILxtWvD0NRJaoCOiZCopRDPW8paroKlGsrAiHLykNE=
github.com/a-h/templ v0.2.697/go.mod h1:5cqsugkq9IerRNucNsI4DEamdHPsoGMQy99DzydLhM8=
github.com/brianvoe/gofakeit/v7 v7.0.2 h1:jzYT7Ge3RDHw7J1CM1kwu0OQywV9vbf2qSGxBS72TCY=
github.com/brianvoe/gofakeit/v7 v7.0.2/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA=
github.com/brianvoe/gofakeit/v7 v7.0.3 h1:tGCt+eYfhTMWE1ko5G2EO1f/yE44yNpIwUb4h32O0wo=
github.com/brianvoe/gofakeit/v7 v7.0.3/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic v1.11.7 h1:k/l9p1hZpNIMJSk37wL9ltkcpqLfIho1vYthi4xT2t4=
github.com/bytedance/sonic v1.11.7/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
Expand Down Expand Up @@ -38,12 +44,16 @@ github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uq
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/gin-contrib/secure v1.0.0 h1:NjPAx+bHQFtjwR/HZMTAblXI493N2fZSOMmUL/m9PZE=
github.com/gin-contrib/secure v1.0.0/go.mod h1:WnnA5hyfqYSWhzmhAmk1j7hv2BE5nKugJTtob83d1EA=
github.com/gin-contrib/secure v1.1.0 h1:wy/psCWbgUBDCLH13KgB/m06NHXb1jczSTRp+H2hK7E=
github.com/gin-contrib/secure v1.1.0/go.mod h1:LtEfyy326NRwgkUq8ac6npf845L0L9B8yfEaLcxMHIc=
github.com/gin-contrib/sessions v1.0.1 h1:3hsJyNs7v7N8OtelFmYXFrulAf6zSR7nW/putcPEHxI=
github.com/gin-contrib/sessions v1.0.1/go.mod h1:ouxSFM24/OgIud5MJYQJLpy6AwxQ5EYO9yLhbtObGkM=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
Expand All @@ -58,6 +68,8 @@ github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
Expand Down Expand Up @@ -130,6 +142,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rabbitmq/amqp091-go v1.9.0 h1:qrQtyzB4H8BQgEuJwhmVQqVHB9O4+MNDJCCAcpc3Aoo=
github.com/rabbitmq/amqp091-go v1.9.0/go.mod h1:+jPrT9iY2eLjRaMSRHUhc3z14E/l85kv/f+6luSD3pc=
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
Expand Down Expand Up @@ -169,6 +183,7 @@ go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUS
go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
Expand All @@ -179,8 +194,12 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand All @@ -190,6 +209,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -227,6 +248,8 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4=
google.golang.org/protobuf v1.34.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
6 changes: 6 additions & 0 deletions pkg/cmd/server/features/page/default.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Default Redirect

Scenario: Check the correct redirect for not found page
Given I am on /non-existing page
Then redirect me to / page
And the page title should be codexGO
5 changes: 0 additions & 5 deletions pkg/cmd/server/features/status/homePage.feature

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/cmd/server/features/status/notFoundPage.feature

This file was deleted.

21 changes: 21 additions & 0 deletions pkg/cmd/server/features/user/create.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Create a new User account

Scenario: Create a valid non existing account
Given I am on / page
Then I fill the Email with create@example.com
* I fill the Username with create
* I fill the Password with create@example
* I fill the Confirm Password with create@example
* I check the I agree to the terms and conditions
* I click the Sign up button
And I see account created notification

Scenario: Create already existing account
Given I am on / page
Then I fill the Email with create@example.com
* I fill the Username with create
* I fill the Password with create@example
* I fill the Confirm Password with create@example
* I check the I agree to the terms and conditions
* I click the Sign up button
But I see already registered notification
37 changes: 23 additions & 14 deletions pkg/cmd/server/features/user/delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@ Feature: Delete a User account

Scenario: Create a valid non existing account
Given I am on / page
Then I click the Create tab
* I fill the Email with delete@example.com
Then I fill the Email with delete@example.com
* I fill the Username with delete
* I fill the Password with 12345678
* I click the Create button
And I see Successfully Created notification
* I fill the Password with delete@example
* I fill the Confirm Password with delete@example
* I check the I agree to the terms and conditions
* I click the Sign up button
And I see account created notification

Scenario: Delete a valid existing account
Scenario: Login a valid existing account
Given I am on / page
Then I fill the Email with delete@example.com
* I fill the Password with 12345678
* I click the Login button
* I am on /dashboard page
* I click the Delete tab
* I click the Delete button
* I accept the delete confirm
And I am on / page
Then I click on the Sign in button
* I fill the Email with delete@example.com
* I fill the Password with delete@example
* I click the Sign in button
* I see logged in notification
And redirect me to /dashboard page

Scenario: Delete a valid existing account
Given I am on /dashboard page
Then I open the account menu
* I click on the Delete button
* I fill the Password with delete@example
* I fill the Confirm Password with delete@example
* I click the Approve button
* I see account deleted notification
And redirect me to / page
28 changes: 16 additions & 12 deletions pkg/cmd/server/features/user/login.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@ Feature: Login a User account

Scenario: Create a valid non existing account
Given I am on / page
Then I click the Create tab
* I fill the Email with login@example.com
Then I fill the Email with login@example.com
* I fill the Username with login
* I fill the Password with 12345678
* I click the Create button
And I see Successfully Created notification
* I fill the Password with login@example
* I fill the Confirm Password with login@example
* I check the I agree to the terms and conditions
* I click the Sign up button
And I see account created notification

Scenario: Login a valid existing account
Given I am on / page
Then I fill the Email with login@example.com
* I fill the Password with 12345678
* I click the Login button
And I am on /dashboard page
Then I click on the Sign in button
* I fill the Email with login@example.com
* I fill the Password with login@example
* I click the Sign in button
* I see logged in notification
And redirect me to /dashboard page

Scenario: Login a valid non existing account
Given I am on / page
Then I fill the Email with non-existing@example.com
Then I click on the Sign in button
* I fill the Email with non-existing@example.com
* I fill the Password with non-existing
* I click the Login button
And I see Not Found non-existing@example.com notification
* I click the Sign in button
But I see not found notification
19 changes: 0 additions & 19 deletions pkg/cmd/server/features/user/register.feature

This file was deleted.

35 changes: 21 additions & 14 deletions pkg/cmd/server/features/user/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,29 @@ Feature: Update a User account

Scenario: Create a valid non existing account
Given I am on / page
Then I click the Create tab
* I fill the Email with update@example.com
Then I fill the Email with update@example.com
* I fill the Username with update
* I fill the Password with 12345678
* I click the Create button
And I see Successfully Created notification
* I fill the Password with update@example
* I fill the Confirm Password with update@example
* I check the I agree to the terms and conditions
* I click the Sign up button
And I see account created notification

Scenario: Update a valid existing account
Scenario: Login a valid existing account
Given I am on / page
Then I fill the Email with update@example.com
* I fill the Password with 12345678
* I click the Login button
* I am on /dashboard page
* I fill the Email with updated@example.com
Then I click on the Sign in button
* I fill the Email with update@example.com
* I fill the Password with update@example
* I click the Sign in button
* I see logged in notification
And redirect me to /dashboard page

Scenario: Update a valid existing account
Given I am on /dashboard page
Then I fill the Email with updated@example.com
* I fill the Username with updated
* I fill the Current Password with 12345678
* I fill the New Password with 87654321
* I fill the Current Password with update@example
* I fill the New Password with example@update
* I fill the Confirm Password with example@update
* I click the Update button
And I see Successfully Updated notification
And I see account updated notification
2 changes: 1 addition & 1 deletion pkg/cmd/server/handler/form/user.create.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ func UserCreate() gin.HandlerFunc {
return
}

c.JSON(http.StatusCreated, reply.JSON(true, "Account created", reply.Payload{}))
c.JSON(http.StatusCreated, reply.JSON(true, "account created", reply.Payload{}))
}
}
2 changes: 1 addition & 1 deletion pkg/cmd/server/handler/form/user.delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ func UserDelete() gin.HandlerFunc {
return
}

c.JSON(http.StatusOK, reply.JSON(true, "Account deleted", reply.Payload{}))
c.JSON(http.StatusOK, reply.JSON(true, "account deleted", reply.Payload{}))
}
}
2 changes: 1 addition & 1 deletion pkg/cmd/server/handler/form/user.login.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ func UserLogin() gin.HandlerFunc {

session.Save()

c.JSON(http.StatusOK, reply.JSON(true, "Logged in", reply.Payload{}))
c.JSON(http.StatusOK, reply.JSON(true, "logged in", reply.Payload{}))
}
}
2 changes: 1 addition & 1 deletion pkg/cmd/server/handler/form/user.update.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ func UserUpdate() gin.HandlerFunc {
return
}

c.JSON(http.StatusOK, reply.JSON(true, "Account updated", reply.Payload{}))
c.JSON(http.StatusOK, reply.JSON(true, "account updated", reply.Payload{}))
}
}
Loading

0 comments on commit 8df4c59

Please sign in to comment.