I'm trying to see Cypress in interactive mode when the Cypress tests are running in a docker container. This article explains how do it on Mac - https://www.cypress.io/blog/2019/05/02/run-cypress-with-a-single-docker-command/#Interactive-mode. I cannot get it to work however on my new linux mint OS install.
Following the article, I have set -
$ IP=172.17.0.1
$ xhost + $IP
$ export DISPLAY=172.17.0.1:0
Run Code Online (Sandbox Code Playgroud)
Which is the IP address on my local host machine on the Docker default bridge network.
This is my only set …
说我有,
class PersonNode(DjangoObjectType):
class Meta:
model = Person
fields = ('first_name', 'last_name', 'age',
'sex', 'alive', 'unique_identifier',)
filter_fields = ('first_name', 'last_name', 'age',
'sex', 'alive', 'unique_identifier',)
interfaces = (graphene.relay.Node,)
class PersonNodeInput(graphene.InputObjectType):
first_name = graphene.String()
last_name = graphene.String()
# rest of person model fields
class Valid(graphene.ObjectType):
ok = graphene.Boolean()
class Query(graphene.ObjectType):
validate_person = graphene.Field(Valid, args={
"data": PersonNodeInput()})
person = graphene.relay.Node.Field(PersonNode)
all_people = DjangoFilterConnectionField(PersonNode)
def resolve_validate_person(root, info, data):
print("resolve validate person")
return Valid(ok=True)
Run Code Online (Sandbox Code Playgroud)
是否可以避免写出PersonNodeInput?如果您可以对“DjangoInputObjectType”之类的内容进行子类化并在 Meta 属性中指定所需的模型和字段,那就太好了。