Cobular / distest

A library used to do integration testing on discord bots
MIT License
29 stars 8 forks source link

Add Embed Support #25

Closed tooxo closed 4 years ago

tooxo commented 4 years ago

Not in a useable state yet. View this as very early stage, updates will follow.

tooxo commented 4 years ago

Tests should now perform correctly. Test-Prove Image This Builds only fail, because I cant edit the travis environment variables.

Cobular commented 4 years ago

Yeah, I'll work out what's wrong with them and then get this PR in. Thanks a ton for your contribution! If you don't mind documenting how it works, that would be fantastic!

Cobular commented 4 years ago

Update: Travis won't let PRs from forks use encrypted variables, which is how I store the bot credentials. I'll see if it will let me run it and be ok, but if you know how to make this work let me know. image

tooxo commented 4 years ago

If you don't mind documenting how it works, that would be fantastic!

Is there a specific way you want it to be documented? Full Text, Docstring etc?

tooxo commented 4 years ago

Added Support for Image, Thumbnail, Video and Author attributes. Tests should also work accordingly.

tooxo commented 4 years ago

You can also look at my travis build, which builds correctly. https://travis-ci.com/tooxo/distest/builds/128603178

Cobular commented 4 years ago

If you don't mind documenting how it works, that would be fantastic!

Is there a specific way you want it to be documented? Full Text, Docstring etc?

Documentation in docstring looks good for assert_embed_equals, but could you go into more detail about the attributes_to_prove param? Maybe an example or two?


You can also look at my travis build, which builds correctly. https://travis-ci.com/tooxo/distest/builds/128603178

Sound good, once the documentation is done, I'll approve the PR. Once the changes to the travis yml are back in develop, I'll update the environment variables.

Rade0nFighter commented 4 years ago

Hey! This is an awesome and much needed feature, is there anything I can do to help get it over the line?

Rade0nFighter commented 4 years ago

@tooxo @JakeCover Bump :)

tooxo commented 4 years ago

@rade0 Thank you for your patience, appreciate it. Didn't touch this repo for a long time, but I remember stopping working on it, because I wasn't entirely sure how to structure the feature.

For now its, I think, still working, and if you want to compare an embed you can compare all of it or just some attributes.

I don't have any intentions in working on it anymore, I instead implemented a feature in my bot, that, for tests, the bot doesn't use embeds, but thats obviously not ideal. If you want to take over from here, I can add you as a contributer on my fork and help you getting started.

Cobular commented 4 years ago

@tooxo @JakeCover Bump :)

I should be working on this more soon, I just got really busy but now thanks to covid19 I have more time! If you want to help in some way, feel free to help out and take tooxo up on their offer on contributions, I'll take a look at this probably today or tomorrow.

Rade0nFighter commented 4 years ago

Awesome thank you both! @JakeCover I'll wait for you to give it the once over and if anything needs doing I'm your man ๐Ÿ˜€

Cobular commented 4 years ago

Just tested it, looks good! Now I need to figure out how to get the bot tokens into travis on forks, sounds like a problem for future me!

Rade0nFighter commented 4 years ago

Nice one! Will give it a whirl.

(Donโ€™t worry I also rely on my own future me quite a lot ๐Ÿ˜‚)

Rade0nFighter commented 4 years ago

Just to confirm it works a charm, and the embed stuff is really nicely done. Thanks dude!